Operating System - Linux
1828343 Members
3058 Online
109976 Solutions
New Discussion

Re: vmstat - Getting application memory & CPU usage

 
Danny Fang
Frequent Advisor

vmstat - Getting application memory & CPU usage

Hi,
I'm attempting to get the amount of memory and CPU used for a particular application by running vmstat(see attached file for output).

I would like to obtain the amount of active memory used when running vmstat, by specifying the -a option(amt of active and inactive memory
bash-2.03$ vmstat -a 10 10
Usage: vmstat [-cipsS] [disk ...] [interval [count]]
bash-2.03$ vmstat -a 10 10

I would like to know if getting the active memory usage would represent the amount of memory used in MB for a particular application?

Also, if I wish to see the CPU utilization from vmstat, may I know if I should refer to the "usr" or "sys" columns under the heading cpu?

Could anyone help me out?

Thanks
2 REPLIES 2
Vitaly Karasik_1
Honored Contributor

Re: vmstat - Getting application memory & CPU usage

AFAIK, you cannot "to get the amount of memory and CPU used for a particular application" with vmstat, but only using ps or top utilities.
Raj D.
Honored Contributor

Re: vmstat - Getting application memory & CPU usage

Hi Danny ,

The answer is in this thread ,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=950872

and its same..

Cheers ,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "