Code:
ps -eLf
ps -eLf | wc -l
#you can toggle thread display, see http://publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp?topic=%2Fcom.ibm.java.doc.igaa%2F_1vg0001475cb4a-1190e2e0f74-8000_1007.html
top -H
#also press 1 (toggle), will show break down of cpu usage
top - 11:05:53 up 1 day, 1:57, 3 users, load average: 0.25, 0.16, 0.11
Tasks: 281 total, 1 running, 277 sleeping, 0 stopped, 3 zombie
Cpu0 : 14.7%us, 8.0%sy, 0.0%ni, 76.9%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Cpu1 : 11.1%us, 5.9%sy, 0.0%ni, 82.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 6.2%us, 10.6%sy, 0.0%ni, 83.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 3.4%us, 3.8%sy, 0.0%ni, 92.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8011456k total, 7841028k used, 170428k free, 40824k buffers
Swap: 8388600k total, 233920k used, 8154680k free, 1220248k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3716 qemu 20 0 4821m 4.1g 1668 S 32.8 53.8 511:41.44 qemu-kvm
28028 josephgr 20 0 1589m 498m 27m S 14.3 6.4 84:11.67 firefox
3810 root 20 0 258m 85m 11m S 4.0 1.1 34:13.66 Xorg