dbaXchange.com


Database Resources
- RDBMS Server
-
Database Administration
-
Performance Tuning
-
Backup and Recovery
-
Oracle Utilities

-
SQL and PLSQL
-
Network Administration
-
Client Applications
-
Miscellaneous Stuff

Oracle's technology Sites

http://technet.oracle.com

http://metalink.oracle.com

http://asktom.oracle.com/

http://www.oramag.com


Search this site or the web


Site search Web search powered by FreeFind



 

Category     : Database Resources -> RDBMS Server

DB Version  : Oracle 8i / 9i

OS Details    : Sun Solaris9

 

As an oracle DBA, it is always helpful to be familiar with a few Unix commands that allow you to monitor the four important aspects of the hardware on which the database runs - IO, Memory, CPU / machine load and network connectivity.

Included in this article are a few useful Unix commands that will work on Solaris boxes and help you identify any hardware bottlenecks.

(1) IO monitoring:

One of the best ways to monit IO activity on the box is by using the iostat command. The command will give you an idea of how busy the file systems are and is also helpful in identifying file system hotspots.

iostat -xnxz 5

The above command will produce a report with extended disk statistics in a tabular form and will display filesystem names in descriptive format. It will also produce the report every 5 seconds indefinitely unless cancelled by doing a ctrl-c.

Need to pay special attention to the values in the report under the %b column which tells you as to how busy the filesystems are.

(2) Memory:

To get details on the total memory available on the machine:

prtconf | grep -i "Memory size"

To get details on total swap space usage and availability:

swap -s

Monitor and report virtual memory statistics and activity

vmstat 5 5

The above command will produce a report every 5 seconds and will iterate 5 times.

(3) CPU usage and machine load:

Report on CPU:

mpstat 5 5

The above command produces processor statistics in tabular form.

Report on CPU and load averages:

top is a freeware utility that can be downloaded from www.sunfreeware.com and is a handy utility to produce useful information on the machine load. Here's a sample output from top:

load averages: 1.45, 2.31, 7.39 10:10:10
158 processes: 157 sleeping, 1 on cpu
CPU states: 86.5% idle, 8.3% user, 3.9% kernel, 1.3% iowait, 0.0% swap
Memory: 8G real, 4G free, 2613M swap in use, 6G swap free

PID USERNAME THR PRI NICE SIZE     RES      STATE TIME  CPU     COMMAND
1234 ora9i        11   59    0    1610M  1573M  sleep  1:14  6.13%    oracle
4567 ora9i        11   59    0     1592M 1554M  sleep  0:06  0.55%    oracle

(4) Network:

netstat -a

The above command with the -a option shows the state of all sockets, all routing table entries, or all interfaces, both physical and logical.

A few other commands that are good to be aware of : sar, truss, df and nfsstat.