In Linux, sysstat package installs tools like sar. It will setup a cron job to run sar to collect the output periodically. The output will be at /var/log/sa. At the end of each day, it will convert the file /var/log/sa to sar which is stored in /var/log/sar. The sar file can be used to generate graphs to show the CPU, Memory, IO and etc of the server for that particular day.
What if you need to generate the graph before the day ends?
export LC_ALL=C
sar -A -f /var/log/sa/saname > /var/log/sa/sar_output
What if you need to generate the graph before the day ends?
export LC_ALL=C
sar -A -f /var/log/sa/saname > /var/log/sa/sar_output