CPU Issues

The DBAs want to know if there are performance issues with cpu in an Oracle database for example:


First:
$ ps -e -o pcpu,pid,user,tty,args | sort -n -k 1 -r | head
%CPU    PID     USER TT      COMMAND
 55.3 934757   oracle ?       oracleGdefgP (LOCAL=NO)
 10.1 935480   oracle ?       oracleGdefgP (LOCAL=NO)
 0.1 935247   oracle ?       oracleGdefgP (LOCAL=NO)
 0.1 935041   oracle ?       oracleGdefgP (LOCAL=NO)

(you can make an alias with this command)

Linux or other UNIX:
$ top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14848 oracle 25 0 188m 13m 15m R 100.1 0.2 33661:45 oracle
14853 oracle 25 0 188m 13m 15m R 99.8 0.2 313225:41 oracle
9725 oracle 18 0 1045m 287m 150m R 58.6 3.8 0:41.89 oracle

$ ps -ef | grep 14848
--> Tune application or SQL


Solaris:
$ prstat
   PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
180478 oracle   1239M 1230M sleep   59    0  10:24:37 100.0% oracle/1
180500 oracle   1245M 1235M sleep   59    0   4:34:17 20.0% oracle/11
180502 oracle   1234M 1224M sleep   59    0   2:30:03 0.0% oracle/1

$ ps -ef | grep 180478
--> Tune application or SQL

Vincent Fenoll – Oracle DBA in Montreal (QC) Canada

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.