286 IBM TotalStorage DS6000 Series: Performance Monitoring and Tuning
You can also obtain the sysstat package at:
http://perso.wanadoo.fr/sebastien.godard/
The system has to be configured to grab the information and log it; therefore, a cron job must
be set up. Add the following lines to the /etc/crontab. Example 8-13 illustrates an example of
automatic log reporting with
cron.
Example 8-13 Example of automatic log reporting with cron
....
#8am-7pm activity reports every 10 minutes during weekdays.
0 8-18 **1-5 /usr/lib/sa/sa1 600 6 &
#7pm-8am activity reports every an hour during weekdays.
0 19-7 **1-5 /usr/lib/sa/sa1 &
#Activity reports every an hour on Saturday and Sunday.
0 ***0,6 /usr/lib/sa/sa1 &
#Daily summary prepared at 19:05
5 19 ***/usr/lib/sa/sa2 -A &
....
You get a detailed overview of your CPU utilization (%user, %nice, %system, %idle), memory
paging, network I/O and transfer statistics, process creation activity, activity for block devices,
and interrupts/second over time.
These are the main values that are displayed if you use sar -A (the -A is equivalent to
-bBcdqrRuvwWy -I SUM -I PROC -n FULL -U ALL, which selects the most relevant counters of
the system):
kbmemfree Free memory in KB
kbmenmuse Used memory in KB (without memory used by the kernel)
%memused Percentage of used memory
kbmemshrd Amount of shared memory by the system (always 0 with kernel 2.4)
kbbuffers Memory used for buffers by kernel in KB
kbcached Memory used for caching by kernel in KB
kbswpfree Free swap space in KB
kbswpused Used swap space in KB
%swpused Percentage of used swap space
intr/s Interrupts per second
Example 8-14 shows a sample of the output of the sar -A command.
Example 8-14 Example sar -A
Linux 2.4.7-10 (nf5000)11/07/2001
05:00:01 PM proc/s
05:10:00 PM 13.16
05:20:00 PM 0.14
05:30:00 PM 0.05
05:40:00 PM 0.05
05:50:01 PM 0.05
06:00:01 PM 0.05
06:10:01 PM 0.07
06:20:01 PM 0.05
06:30:00 PM 0.05