- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how do I know which which oracle instance crea...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2006 10:40 AM
тАО06-05-2006 10:40 AM
Although there are columns called "CPID", and "LPID", I could not find the process id under these two columns by using ps -ef. what is CPID, and LPID?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2006 10:57 AM
тАО06-05-2006 10:57 AM
Re: how do I know which which oracle instance created this share memory?
CPID = The process ID of the Creator of the shared segment.
LPID = The process ID of the Last process attaching or detaching from the shared segment.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2006 04:38 PM
тАО06-05-2006 04:38 PM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-05-2006 08:07 PM
тАО06-05-2006 08:07 PM
Re: how do I know which which oracle instance created this share memory?
and then compare the SGA size with ipcs -mb to see which segment size matches the SGA and then you can corelate the Oracle database instance and the segment ID,
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 01:07 AM
тАО06-06-2006 01:07 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 01:08 AM
тАО06-06-2006 01:08 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 02:31 AM
тАО06-06-2006 02:31 AM
Re: how do I know which which oracle instance created this share memory?
But, short of that, the easiest way is to review the ipcs display and look at the time the memory chunks were allocated. These will match up nicely with the start times in the alert log of each database, and figuring out which database has which memory area becomes quite simple at that point.... UNLESS you happened to start two databases in the same minute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 03:44 AM
тАО06-08-2006 03:44 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:09 AM
тАО06-08-2006 04:09 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:24 AM
тАО06-08-2006 04:24 AM
Re: how do I know which which oracle instance created this share memory?
I have a few questions and would like to confirm with you.
1. I thought these Oracle segments listed here by usimg ipcs -ma are corresponding to each one of SGA. But, from your previous response, you seemed like these segments should have been removed because of processes who created/used the segment is gone. I am not sure that is the correct statement, because I can not find any one of CPID/LPID for any segements.
2. If they are no longer needed, can I remove those segments? because we have been udner memory pressue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:32 AM
тАО06-08-2006 04:32 AM
Re: how do I know which which oracle instance created this share memory?
I dont have answer to your question why you cannot see the PIDs, but I can definitely tell you that 99% chances are that the segments owned by oracle would be corresponding to the databases running.
John is right but for oracle databases its been my observation as well that the PIDs are not traceable, but the segments are still in use by the database which is running perfectly fine.
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:33 AM
тАО06-08-2006 04:33 AM
Re: how do I know which which oracle instance created this share memory?
Whether or not it is safe to remove a given shmem structure via ipcrm depends upon the design of the application. Even in the case where NATTCH =0 and the CPID and LPID do not correspond to existing processes, it may still not be safe to remove the shmem identifier. It's common to have some sort of initialization program setup shared memory and then exit (NATTCH = 0, LPID & CPID would then reference a non-existant process) so that later applications can start much faster but they expect the shared memory to be there.
In the case of Oracle, if NATTCH = 0 and CPID and LPID no longer exist then it is safe to remove the identifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:33 AM
тАО06-08-2006 04:33 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:39 AM
тАО06-08-2006 04:39 AM
Re: how do I know which which oracle instance created this share memory?
However, all 5 have a NATTACH value that is greater than 0, so they are all still in use.
The key in your case, as I think someone said, is to look at the NATTACH column. Do NOT delete the segments if NATTACH is greater than 0, otherwise you may crash your DB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:43 AM
тАО06-08-2006 04:43 AM
Re: how do I know which which oracle instance created this share memory?
I see the problem that you're having. I just looked at a number of our Oracle instances, and, just like you're describing, the are no matching processes like the CPID on any of our running instances either.
STOP!
Please ignore my previous posting then!!!
STOP!
This is probably because the process that starts oracle (sqlplus/svrmgrl,possibly) goes away after oracle is started. The theory would be correct, I just don't know if it is really sqlplus or svrmgrl that had the proc id. I'd have to test it to be sure.
You'll have to go back and review the time stamps for "ctime" from "ipcs -am" display and review what you see in the alert log for start times from the candidate databases. If you've got a match, then that's your database.
Do you have any databases down right now? Or any that went down that makes you suspect some of the memory was left behind?
I can almost promise you, if the databases were brought down normally, then all of those memory segments belong to a running database.
Once again, verify the ctimes with the start times of the databases in the alert logs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:45 AM
тАО06-08-2006 04:45 AM
Re: how do I know which which oracle instance created this share memory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:49 AM
тАО06-08-2006 04:49 AM
Re: how do I know which which oracle instance created this share memory?
If you oracle database sid is say oradb1
then
ps -eaf | grep oradb1 | grep -v grep | wc -l
this will give you oracle processes connected to the segment.
Verify this figure with the ipcs -ma - NATTCH - to guess which segment corresponds to this SID. Also in database check sga size as I told you earlier and cross verify the size with the NATTCH line - segment size.
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:53 AM
тАО06-08-2006 04:53 AM
Re: how do I know which which oracle instance created this share memory?
I have 9 listed Oracle segments by ipcs, and meanwhile I have 9 instances running on this server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:56 AM
тАО06-08-2006 04:56 AM
Re: how do I know which which oracle instance created this share memory?
Before I started it I noted the process id of the "sqlplus" session I was in (21855).
After it was started, I exited sqlplus and examined the CPID and it was 21856 (one number higher). Since this is a pretty idle test server, it was probably the process spawned by sqlplus (probably "oracle") which started things and went away... Since I've got a fairly large SGA, which takes some time to startup on this old slow test server, it gives me time to try and capture all the process id's in the system during startup into a file.
I'll try that next...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 04:59 AM
тАО06-08-2006 04:59 AM
Re: how do I know which which oracle instance created this share memory?
testing...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 05:17 AM
тАО06-08-2006 05:17 AM
Re: how do I know which which oracle instance created this share memory?
My current CPID is 22975.
This WAS the process id of my Oracle shadow process (my oracleDBDEV DESCRIPTION=( "LOCAL=YES")) associated with my current sqlplus session (still running) before and during the Oracle startup.
Once oracle was up however, that shadow process is gone, and the shadow process holding up my still running sqlplus session is now 23209! [ I know this because I started the database in restrict mode ].
This means you won't find a matching cpid for ipcs -am after the database has been started because even if you stay in sqlplus, the shadow process that starts the database is terminated and a new process is now associated with the still running slqplus system connection that started the database.
Anyway, this explains why you can't see your CPID, which is normal. In other words, just because there is no matching CPID, you can't assume that you need to remove those memory segments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 05:31 AM
тАО06-08-2006 05:31 AM
Re: how do I know which which oracle instance created this share memory?
The only question I'd like to know now is, whether or not these listed Oracle segments really are corresponding each one of Oracle SGA's that is defined in Oracle?, and thefore it's size is same as SGA size?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 05:42 AM
тАО06-08-2006 05:42 AM
Re: how do I know which which oracle instance created this share memory?
From my review it looks like the various segments have combined purposes, and you can't say that one segment is the shared pool, another is the large pool, another is the java pool, or another is the buffer_cache.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 12:19 PM
тАО06-08-2006 12:19 PM
Re: how do I know which which oracle instance created this share memory?
The only two solutions have been mentioned:
-- start each instance as a separate user (ie, oracle1 oracle2 oracle3...
-- modify the start/stop script(s) for your Oracle instances to provide a delay between each instance, perhaps a sleep 20 or so. The reason for the delay is to ensure that each instance has time to create their SGA tasks for a reliable start time. And in the start/stop script, write out the start time for each instance to a file, then use the ATIME value from ipcs -ma to find a match.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2006 02:16 AM
тАО06-09-2006 02:16 AM
Re: how do I know which which oracle instance created this share memory?
We're all glad you're part of the forums, and it would be really cool if you read the following:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137
And also this interesting thread:
https://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1033211