The remainder of the sysstat tools automate incremental measurement of system activity and reporting. Recording activity is a concerted effort between the sysstat utilities and the system scheduler, cron.
Via cron, the utilities sa1 and sa2 perform the incremental data collection and report generation. sar and sadf are interactive utilities to view the collected data. sadc is used to manually create a short incremental snapshot.
By default, data is collected on system activity from the following systems and subsystems: CPU, memory, swap, I/O, network, paging, block devices, irqs, queues, kernel tables, processes, and TTYs.
To automate sar reporting, you can use the following cron entries, as suggested by the author of sysstat:
# 8am-7pm activity reports every 10 minutes during weekdays. 0 8-18 * * 1-5 /usr/local/lib/sa/sa1 600 6 &
# 7pm-8am activity reports every hour during weekdays. 0 19-7 * * 1-5 /usr/local/lib/sa/sa1 &
# Activity reports every hour on Saturday and Sunday. 0 * * * 0,6 /usr/local/lib/sa/sa1 &
# Daily summary prepared at 19:05 5 19 * * * /usr/local/lib/sa/sa2 -A &
cron runs crontab entries sequentially (serially) by default; adding the ampersand (&) symbol to the end of each command allows entries to be run in parallel with other entries. (If you need more information about cron entries, see Jerry Peek’s February 2003 “Power Tools” column, “Running Jobs Unattended” (http://www.linux-mag.com/content/view/1273/).
On the…
Please log in to view this content.
Not Yet a Member?
Register with LinuxMagazine.com and get free access to the entire archive, including: