HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Substitue of PMAP in 11.23

 
SOLVED
Go to solution

Substitue of PMAP in 11.23

Hi ,

 

I am trying to find memory usage of a particular processid.

In 11.31 i can use pmap <pid> to get memory usage of process(including size of each mapped object).

 

Is there any substitute of pmap in 11.23.

 

Actually, I want to know Total virtual size of the process including virtual sizes of text, data, stack, mmap regions, shared memory regions and IO mapped regions.

 

I already tried ps command (in combination woth some options) but not usefull.. :(

 

Please help.

 

Regards

Abhishek J

5 REPLIES

Re: Substitute for pmap(1) in 11.23

>Is there any substitute of pmap in 11.23?

>I already tried ps command (in combination with some options) but not useful.

 

Any reason you need this level of detail?  Won't ps(1) and top(1) give a good estimate?

 

Otherwise you can write your own pmap by calling the appropriate pstat(2) functions.

If you search in the HP-UX category, there may already be a source attached to one topic.

 

 

Re: Substitute of PMAP in 11.23

Hi Dennis

I have some processes that are eating up so much memory causing the component crash.

 

I found its a TAO process and consuming so much memory causing TAO crash ... so i want to know the memory usage of that TAO process so that I can re-start TAO before crash depending if memory usage reaches a certain limit..

 

top i s not usefull for my case as top wil list the top processes on the system and TAO process might not get listed in TAO output.

 

It would be very usefull if you can provide the code that you are refering to or link to that post

Thanks in advance

 

Regards

AbhishekJ

Re: Substitute for pmap(1) in 11.23

I could find some code at :

 

http://h30499.www3.hp.com/hpeb/attachments/hpeb/itrc-156/378200/1/357495.c

 

but i was looking for shell script to get the details fo process size...

i tried using ps but ps will only tell  size in physical pages but i am looking to get Total virtual size of the process  including virtual sizes of text, data, stack, mmap regions, shared memory regions and IO mapped regions as we got in TOP output.

 

Regards
AbhishekJ

Solution

Re: Substitute for pmap(1) in 11.23

>I could find some code at: 357495.c

 

You want to look at the code around pstat_getprocvm.

 

>I tried using ps but ps will only tell  size in physical pages

 

There is the vsz field in KB.

Since your comparison is going to be fuzzy anyway, you are going to have to adjust your limits until your are happy.

What did you use for pmap?

 

>I am looking to get Total virtual size of the process  including virtual sizes of text, data, stack, mmap regions, shared memory regions regions as we got in TOP output.

 

The text and stack sizes shouldn't be a limit.  If you have a leak, the only one that counts is the data area.

And if you like top output, you can just use "-d 1 -n 10000 -f top.out" and look at that.