How to Check cpu utilization in Linux

CPU utilization in Linux

[oracle@rac-node1 script]$ top
top - 11:05:25 up 12 days, 22:07, 3 users, load average: 8.81, 8.34, 11.32
Tasks: 263 total, 14 running, 249 sleeping, 0 stopped, 0 zombie
Cpu(s): 96.4% us, 2.5% sy, 0.0% ni, 0.1% id, 0.0% wa, 0.3% hi, 0.8% si
Mem: 16623648k total, 13943424k used, 2680224k free, 261136k buffers
Swap: 12287968k total, 0k used, 12287968k free, 10973216k cached
 PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
13406 oracle 17 0 50 0:23.51 16.8 10.2g 2.7g 2.7g R oracle
 8025 oracle 16 0 46 8:03.46 43.1 10.2g 6.8g 6.8g S oracle
 6612 oracle 17 0 44 2:18.95 27.6 10.2g 4.4g 4.4g R oracle
 7381 oracle 16 0 44 1:46.89 23.4 10.2g 3.7g 3.7g S oracle
 2511 oracle 25 0 29 15:47.66 33.6 10.2g 5.3g 5.3g R oracle
22918 oracle 16 0 29 5:43.79 22.3 10.2g 3.5g 3.5g R oracle
 4579 oracle 16 0 27 4:13.59 36.5 10.2g 5.8g 5.8g R oracle
 7625 oracle 16 0 26 6:25.65 40.6 10.2g 6.4g 6.4g S oracle
26467 oracle 16 0 25 6:43.01 38.1 10.2g 6.0g 6.0g R oracle
10584 oracle 25 0 22 2:46.19 29.6 10.2g 4.7g 4.7g R oracle
13826 oracle 16 0 21 0:49.11 20.1 10.2g 3.2g 3.2g S oracle
30198 oracle 16 0 12 4:41.79 7.3 10.2g 1.2g 1.1g R oracle
13290 oracle 15 0 7 114:01.05 3.5 10.2g 563m 553m S oracle
 8525 oracle 15 0 4 12:47.20 45.7 10.2g 7.3g 7.2g S oracle

CPU utilization

[oracle@rac-node1 script]$ mpstat -P ALL
Linux 2.6.9-67.EL (rac-node1) 09/17/2012
11:13:22 AM CPU %user %nice %system %iowait %irq %soft %idle intr/s
11:13:22 AM all 19.83 0.00 1.10 5.34 0.13 0.37 73.22 6292.69
11:13:22 AM 0 24.37 0.00 1.15 1.54 0.27 0.60 72.07 2019.45
11:13:22 AM 1 24.41 0.00 1.55 8.80 0.24 0.69 64.31 1874.29
11:13:22 AM 2 12.95 0.00 0.70 3.42 0.00 0.03 82.90 1030.17
11:13:22 AM 3 17.59 0.00 1.01 7.61 0.02 0.15 73.62 1368.78

Top 10 process

[oracle@rac-node1 script]$ ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
%CPU PID USER COMMAND
 9.3 12942 oracle oracletchhis2 (LOCAL=NO)
 9.1 10584 oracle oracletchhis2 (LOCAL=NO)
 9.0 13719 oracle oracletchhis2 (LOCAL=NO)
 8.8 4579 oracle oracletchhis2 (LOCAL=NO)
 8.4 13828 oracle oracletchhis2 (LOCAL=NO)
 8.2 16657 oracle oracletchhis2 (LOCAL=NO)
 7.5 13826 oracle oracletchhis2 (LOCAL=NO)
 6.6 30198 oracle oracletchhis2 (LOCAL=NO)
 6.5 22918 oracle oracletchhis2 (LOCAL=NO)
Advertisements

About Sher khan

Senior Oracle DBA, Oracle 10g , Oracle 11g OCE ,Oracle 12C and Oracle 11g OPN certified Specialist, OCP Certified in Oracle 9i,10g , 11g and 12C. I am working in Oracle technology since 2004. Currently working in U.A.E Email: sher487@hotmail.com
This entry was posted in Linux commands for DBA. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s