Operating System - HP-UX
1752794 Members
5939 Online
108789 Solutions
New Discussion юеВ

Re: Is there any way to check howmuch virtual memory is consumed by particular process.

 
SOLVED
Go to solution
unixguy_1
Regular Advisor

Is there any way to check howmuch virtual memory is consumed by particular process.


Hi,

uporacle is a one process.

Is there any way to check how much virtual memory is consumed by this particluar process.

please reply me..........

thanks in advance
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Is there any way to check howmuch virtual memory is consumed by particular process.

Hi:

One way is to use 'ps':

# UNIX95= ps -C uporacle -o comm,pid,ppid,vsz

Notice that UNIX95 is set only for the duration of the command line. There is a space following the "=" character without a semicolon before the command.

Regards!

...JRF...
unixguy_1
Regular Advisor

Re: Is there any way to check howmuch virtual memory is consumed by particular process.

HI JRY

Please give the exact command

i used the below command

ps -C java -o comm,17900,17899,vsz

is this correct or we have to addUNIX=95 in front of the ps comamnd

thanks in advance
please reply.


James R. Ferguson
Acclaimed Contributor

Re: Is there any way to check howmuch virtual memory is consumed by particular process.

Hi (again):

> is this correct or we have to addUNIX=95 in front of the ps comamnd

You need to re-read my first post (in fact, copy-and-paste the command to a shell prompt and issue it!). To use 'ps -C' you must arm XPG4 (otherwise known as 'UNIX95') behavior.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Is there any way to check howmuch virtual memory is consumed by particular process.

Use the command:

UNIX95=1 ps -C java -o comm,pid,ppid,vsz

Do not change anything in the above line -- copy-paste this as is. The variable assignment followed by a command is correct. Now this command will report *all* java processes. If you want one specific java instance, change

-C java

to

-p 1234

where 1234 is the actual process ID. You may find this command more useful:

UNIX95=1 ps -e -o vsz,pid,ppid,args | sort -rn | head -20

This will sort all the processes by the amount of memory they use, largest first.


Bill Hassell, sysadmin