Chapter 2. Resource Monitoring
25
The device specification, displayed as
dev major number sequence number
, where
major number
is the device's major number
3
, and
sequence number
is a sequence
number starting at zero.
The number of transfers (or I/O operations) per second.
The number of 512 byte blocks read per second.
The number of 512 byte blocks written per second.
The total number of 512 byte blocks read.
The total number of 512 byte block written.
This is just a sample of the information that can be obtained using
iostat
. For more information, see
the
iostat(1)
man page.
2.5.4.2. The
mpstat
command
The
mpstat
command at first appears no different from the CPU utilization report produced by
io
stat
:
Linux 2.4.18 14smp (pigdog.example.com)
12/11/2002
07:09:26 PM
CPU
%user
%nice %system
%idle
intr/s
07:09:26 PM
all
6.40
5.84
3.29
84.47
542.47
With the exception of an additional column showing the interrupts per second being handled by the
CPU, there is no real difference. However, the situation changes if
mpstat
's
P ALL
option is used:
Linux 2.4.18 14smp (pigdog.example.com)
12/11/2002
07:13:03 PM
CPU
%user
%nice %system
%idle
intr/s
07:13:03 PM
all
6.40
5.84
3.29
84.47
542.47
07:13:03 PM
0
6.36
5.80
3.29
84.54
542.47
07:13:03 PM
1
6.43
5.87
3.29
84.40
542.47
On multiprocessor systems,
mpstat
allows the utilization for each CPU to be viewed individually,
making it possible to determine how effectively each CPU is being used.
2.5.4.3. The
sadc
command
As stated earlier, the
sadc
command collects system utilization data and writes it to a file for later
analysis. By default, the data is written to files in the
/var/log/sa/
directory. The files are named
sa dd
, where
dd
is the current day's two digit date.
sadc
is normally run by the
sa1
script. This script is periodically invoked by
cron
via the file
sys
stat
, which is located in
/etc/crond.d
. The
sa1
script invokes
sadc
for a single one second
measuring interval. By default,
cron
runs
sa1
every 10 minutes, adding the data collected during
each interval to the current
/var/log/sa/sa dd
file.
3. Device major numbers can be found by using ls l to display the desired device file in /dev/. Here is
sample output from ls l /dev/hda:
brw rw
1 root
disk
3,
0 Aug 30 19:31 /dev/hda
The major number in this example is 3, and appears between the file's group and its minor number.
footer
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