http://www.cyberciti.biz/faq/unix-command-to-find-cpu-utilization/spa
# sar -u 12 5
unix
Where,code
# sar -o file-name 60 10
orm
# nohup sar -A -o output-file 60 10 1>/dev/null 2>&1 &
Note to display data stored in output-file pass -f option to sar command:
# sar -f output-file
ci
Type the following command to display per-processor statistics; 12 seconds apart; 5 times
# mpstat 12 5
it
You can also use traditional ps and top command:
# top
io
# ps -e -o pcpu -o pid -o user -o args
Read man pages of ps, top, mpstat and sar for more information.form