1 – Install the package sysstat
apt-get install sysstat
2 – Enable collection of statistics
sed -i 's/^ENABLED="false"/ENABLED="true"/' /etc/default/sysstat
3 – Change the collect interval to 5 minutes (optional step)
vi /etc/cron.d/sysstat
*/5 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
Most common parameters. See all in the manual page
Command Description
-q Report queue length and load averages
-u Report CPU utilization
-r Report memory utilization
To view the load report of the current day
sar -q
To view load report between time in current day
sar -q -s 13:00:01 -e 17:00:01
To view a report of the 7th day of the current month:
sar -q -f /var/log/sysstat/sa07
Comments