38
Chapter 3. Bandwidth and Processing Power
3.3.2. Monitoring CPU Utilization on Red Hat Linux
Unlike bandwidth, monitoring CPU utilization is much more straightforward. From a single percent 
age of CPU utilization in GNOME System Monitor, to the more in depth statistics reported by
sar
,
it is possible to accurately determine how much CPU power is being consumed and by what.
Moving beyond GNOME System Monitor,
top
is the first resource monitoring tool discussed in
Chapter 2 Resource Monitoring to provide a more in depth representation of CPU utilization. Here is
a
top
report from a dual processor workstation:
9:44pm
up 2 days, 2 min,
1 user,
load average: 0.14, 0.12, 0.09
90 processes: 82 sleeping, 1 running, 7 zombie, 0 stopped
CPU0 states:
0.4% user,
1.1% system,
0.0% nice, 97.4% idle
CPU1 states:
0.5% user,
1.3% system,
0.0% nice, 97.1% idle
Mem:
1288720K av, 1056260K used,
232460K free,
0K shrd,
145644K buff
Swap:
522104K av,
0K used,
522104K free
469764K cached
PID USER
PRI
NI
SIZE
RSS SHARE STAT %CPU %MEM
TIME COMMAND
30997 ed
16
0
1100 1100
840 R
1.7
0.0
0:00 top
1120 root
5  10
249M 174M 71508 S <
0.9 13.8 254:59 X
1260 ed
15
0 54408
53M
6864 S
0.7
4.2
12:09 gnome terminal
888 root
15
0
2428 2428
1796 S
0.1
0.1
0:06 sendmail
1264 ed
15
0 16336
15M
9480 S
0.1
1.2
1:58 rhn applet gui
1 root
15
0
476
476
424 S
0.0
0.0
0:05 init
2 root
0K
0
0
0
0 SW
0.0
0.0
0:00 migration_CPU0
3 root
0K
0
0
0
0 SW
0.0
0.0
0:00 migration_CPU1
4 root
15
0
0
0
0 SW
0.0
0.0
0:01 keventd
5 root
34
19
0
0
0 SWN
0.0
0.0
0:00 ksoftirqd_CPU0
6 root
34
19
0
0
0 SWN
0.0
0.0
0:00 ksoftirqd_CPU1
7 root
15
0
0
0
0 SW
0.0
0.0
0:05 kswapd
8 root
15
0
0
0
0 SW
0.0
0.0
0:00 bdflush
9 root
15
0
0
0
0 SW
0.0
0.0
0:01 kupdated
10 root
25
0
0
0
0 SW
0.0
0.0
0:00 mdrecoveryd
The first CPU related information is present on the very first line: the load average. The load average
is a number that corresponds to the average number of runnable processes on the system. The load
average is often listed as three sets of numbers (as seen here), which represent the load average for the
past 1, 5, and 15 minutes, indicating that the system in this example was not very busy.
The next line, although not strictly related to CPU utilization, has an indirect relationship, in that
it shows the number of runnable processes (here, only one    remember this number, as it means
something special in this example). The number of runnable processes is a good indicator of how
CPU bound a system might be.
Next are two lines that display the current utilization for each of the two CPUs in the system. The
utilization statistics are broken down to show whether the CPU cycles expended were done so for
user level or system level processing; also included is a statistic showing how much CPU time was
expended by processes with altered scheduling priorities. Finally, there is an idle time statistic.
Moving down into the process related section of the display, we find that the process using the most
CPU power is
top
itself; in other words, the one runnable process on this otherwise idle system was
top
taking a "picture" of itself.
Tip
It is important to remember that the very act of running a system monitor affects the resource utiliza 
tion statistics you receive. All software based monitors do this to some extent.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

website hosting provider

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved