|
Wednesday, 07 March 2007 |
| | | | | Sar | | | | | | | | | | | | | | Sar is the "system activity report" program. In Linux, it is often found in the sysstat package. The package includes the sadc program that gathers stats and stores them in binary files in /var/log/sa/, and the report programs, sar, mpstat, and iostat. It also includes the sa1 and sa2 shell scripts that execute sadc and produce daily summaries of the data. Capturing performance data If you install sar from a package, several scripts may be set up automatically to gather data. Check the cron configuration for sa1 and sa2 scripts. If the scripts are not scheduled to run, here is a typical cron configuration: # run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib/sa/sa1 1 1 # generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib/sa/sa2 -A To show CPU performance: sar -u To show average IO performance over time: sar -b To show average IO performance by device: iostat To show average network performance: sar -n FULL To show network performance by device: sar -n DEV To show network errors by device: sar -n EDEV To show memory performance: sar -R To show paging (swap file) performance: sar -W | | | | | | | | | | | | | | |
|