Operating System - HP-UX
1819850 Members
2722 Online
109607 Solutions
New Discussion юеВ

Re: shminfo - Shared memory info

 
KETANKUMAR KOTHARI
New Member

shminfo - Shared memory info

Where can I download this utility for HP*UX 11.11. I have a shared memory segment that is marked as D to delete (ipcs -ma), but is not getting released. I would like to know which processes are attached to this shared memory segment.
12 REPLIES 12
Stephan.
Honored Contributor

Re: shminfo - Shared memory info

Hi,
shminfo comes from an internal group that provides in-depth support for HP-UX, there is no official download for it.

You can open a call and ask for it.
Michael Steele_2
Honored Contributor

Re: shminfo - Shared memory info

Hi

When you ipcs -mob the pid and ppid are reported.
Support Fatherhood - Stop Family Law
KETANKUMAR KOTHARI
New Member

Re: shminfo - Shared memory info

ipcs -mob only reports the last process attached or detached to the shared memory segment. It does not list the current processes attached to the memory segment. I searched the forum for shminfo download and all of them points to ftp location which is no longer valid. I have asked our sysadmin to contact hp support to get this utility. However i was curious if it was already available in some other location.
Suraj K Sankari
Honored Contributor

Re: shminfo - Shared memory info

Hi,

Better you ask with your vendor for your issue

Suraj
Michael Steele_2
Honored Contributor

Re: shminfo - Shared memory info

Hi

And there are ptree scripts. 'ptree' creates a tree scructure of spawned processess - attached
Support Fatherhood - Stop Family Law
Dennis Handly
Acclaimed Contributor

Re: shminfo - Shared memory info

>ipcs -mob only reports the last process attached or detached to the shared memory segment. It does not list the current processes attached to the memory segment.

(You need -a or -p, not -o or -b.)
But those PIDs may be good enough?
What is NATTCH, more than 1?
Dennis Handly
Acclaimed Contributor

Re: shminfo - Shared memory info

>Michael: And there are ptree scripts.

You can also get a indented list with ps(1):
UNIX_95=EXTENDED_PS ps -H -ef
KETANKUMAR KOTHARI
New Member

Re: shminfo - Shared memory info

Hi Dennis
The Nattach number is 3. So there are 3 processes attached. Therefore using ipcs -ma will not give me the list of processes attached to this shared memory segment. shminfo is only tool to my knowledge which can provide this information.
Michael Steele_2
Honored Contributor

Re: shminfo - Shared memory info

Hello

"...The Nattach number is 3. So there are 3 processes attached..." - you got it. Also see the man page.


"...Therefore using ipcs -ma will not give me the list of processes attached to this shared memory segment..." - If nattach is 3, the one pid will be listed but not the other two.

"...shminfo is only tool to my knowledge which can provide this information...." - No. As stated, use ptree, pstat and other process analysis tools after you get the pid from ipcs -moba

I guess you're not familiar with ptree. Its been around 3 decades. Standard to Solaris and other BSD O/S versions of Unix.
Support Fatherhood - Stop Family Law
Dennis Handly
Acclaimed Contributor

Re: shminfo - Shared memory info

>Therefore using ipcs -ma will not give me the list of processes attached to this shared memory segment.

It may give one and that may give you a clue.

>shminfo is only tool to my knowledge which can provide this information.

As Michael said, you can roll your own with pstat(2).
See attached. Compile with:
cc itrc_ipc_mem_pids.c -D_PSTAT64

>Michael: use ptree, pstat and other process analysis tools after you get the pid from ipcs

Which ptree? Yours and HP-UX's doesn't do that.
Michael Steele_2
Honored Contributor

Re: shminfo - Shared memory info

Hi Dennis:

I know, that ptree script is nothing like the Solaris command, which I miss in HP-UX

Kothari:

When done assign 0 to 10 points to all responses and close the thread, else, people will respond to it for years. Yes, it does happen.
Support Fatherhood - Stop Family Law
Steve Bonds
Trusted Contributor

Re: shminfo - Shared memory info

I found a simple method using the unsupported HP tool "kmeminfo":

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=87967

Basically, just run "kmeminfo -shmem " and it spits out lots of info, including the PIDs currently attached.

-- Steve Bonds