Re: Is there any way to check howmuch virtual memory is consumed by particular process. (148 Views)
Reply
Regular Advisor
unixguy_1
Posts: 166
Registered: ‎11-13-2008
Message 1 of 5 (148 Views)
Accepted Solution

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
Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 2 of 5 (148 Views)

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...
Regular Advisor
unixguy_1
Posts: 166
Registered: ‎11-13-2008
Message 3 of 5 (148 Views)

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.


Acclaimed Contributor
James R. Ferguson
Posts: 21,184
Registered: ‎07-06-2000
Message 4 of 5 (148 Views)

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...
Honored Contributor
Bill Hassell
Posts: 14,209
Registered: ‎05-29-2000
Message 5 of 5 (148 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.