System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

how to check cpu and memory utilization for each command

 
rajesh73
Super Advisor

how to check cpu and memory utilization for each command

how to check the cpu and memory utilization for each command

2 REPLIES

Re: how to check CPU and memory utilization for each command

For which commands?  Normal commands or user applications?

You could use glance or caliper.

Bill Hassell
Honored Contributor

Re: how to check cpu and memory utilization for each command

Using standard HP-UX commands, about all you can find is core image of the process. To list the top 10 processes sorted by core image size, enter these command exactly as shown:

 

UNIX95=on ps -eo vsz,args | sort -rnk1 | head | cut -c1-$COLUMNS
(sorted by memory usage in KBytes)

UNIX95=on ps -eo pcpu,time,args | sort -rnk1 | head | cut -c1-$COLUMNS
(sorted by current CPU percentage used followed by accumulated CPU time)

UNIX95=on ps -eo time,pcpu,args | sort -rnk1 | head | cut -c1-$COLUMNS
(sorted by accumulated CPU time followed by current percentage of CPU)

 The ps command cannot show you shared memory usage (if a program uses it).



Bill Hassell, sysadmin