Let’s examine the different types of information produced. The first line:

18:46:13 up 11 days, 21:50, 5 users, load average: 0.11, 0.19, 0.18

shows the current time (18:46:13), that system has been up for 11 days; that the system has been working for 21 hours 50 seconds. The load average of the system is shown (0.11, 0.19, 0.18) for the last 1, 5 and 15 minutes respectively. (By the way, you can also get this information by issuing the uptime command.)

If the load average is not required, press the letter “l” (lowercase L); it will turn it off. To turn it back on press l again. The second line:

151 processes: 147 sleeping, 4 running, 0 zombie, 0 stopped

shows the number of processes, running, sleeping, etc. The third and fourth lines:

show the CPU utilization details. The above line shows that user processes consume 12.5% and system consumes 6.7%. The user processes include the Oracle processes. Press “t” to turn these three lines off and on. If there are more than one CPU, you will see one line per CPU.

show the memory available and utilized. Total memory is “1026912k av”, approximately 1GB, of which only 26224k or 26MB is free. The swap space is 2GB; but it’s almost not used. To turn it off and on, press “m”.

The rest of the display shows the processes in a tabular format. Here is the explanation of the columns:

Column Description

PID The process ID of the process USER The user running the process PRI The priority of the process NI The nice value: The higher the value, the lower the priority of the task SIZE Memory used by this process (code+data+stack) RSS The physical memory used by this process SHARE The shared memory used by this process STAT The status of this process, shown in code. Some major status codes are:R – RunningS –SleepingZ – ZombieT – Stopped

You can also see second and third characters, which indicate:W – Swapped out processN – positive nice value %CPU The percentage of CPU used by this process %MEM The percentage of memory used by this process TIME The total CPU time used by this process CPU If this is a multi-processor system, this column indicates the ID of the CPU this process is running on. COMMAND The command issued by this process

While the top is being displayed, you can press a few keys to format the display as you like. Pressing the uppercase M key sorts the output by memory usage. (Note that using lowercase m will turn the memory summary lines on or off at the top of the display.) This is very useful when you want to find out who is consuming the memory. Here is sample output:

Let’s analyze the output carefully. The first thing you should notice is the “idle” column under CPU states; it’s 0.0%—meaning, the CPU is completely occupied doing something. The question is, doing what? Move your attention to the column “system”, just slightly left; it shows 5.6%. So the system itself is not doing much. Go even more left to the column marked “user”, which shows 1.0%. Since user processes include Oracle as well, Oracle is not consuming the CPU cycles. So, what’s eating up all the CPU?

The answer lies in the same line, just to the right under the column “iowait”, which indicates 91.2%. This explains it all: the CPU is waiting for IO 91.2% of the time.

So why so much IO wait? The answer lies in the display. Note the PID of the highest consuming process: 16143. You can use the following query to determine what the process is doing: