How to check CPU usage from command line

Hi all,Can you tell me how to check the CPU/memory usage from the command line.Is there any command for that.David
[149 byte] By [DavidSun] at [2007-11-25 22:46:57]
# 1
There are a few utilities for managing process control: ps, prstat sdtprocess. What is it you want to do?
mlennon at 2007-7-5 17:02:18 > top of Java-index,Sun Hardware,Servers - General Discussion...
# 2
Thanks for you reply.I got the command, it is: #prstat -aDavid
DavidSun at 2007-7-5 17:02:18 > top of Java-index,Sun Hardware,Servers - General Discussion...
# 3
You can use various options for prstat, see the man page.# man prstatThe option you mentioned <i>-a</i> shows process information per user.You can sort the output as well, for exapmle by CPU usage:# prstat -s cpu
mlennon at 2007-7-5 17:02:18 > top of Java-index,Sun Hardware,Servers - General Discussion...