Performance Monitoring with sar and isag

New Update(180609):

 Sar with kSar

1. Install Sar ( install sysstat package)

2. Download kSar (follow guide here to run it)


Run Sar

1. LC_ALL=C sar -A 1 10 -o /var/log/sa/saDD

2. LC_ALL=C sar -A -f /var/log/sa/saDD > /var/log/sa/sarDD


note: Somehow I need to use LC_ALL=C in Fedora. In Ubuntu, I can drop that entirely.



In Ubuntu, it should be /var/log/sysstat/ instead of /var/log/sa.


Display Graph

1. Run kSar, open sarDD file.

note: to run kSar: java -jar ksar<version>.jar


Setting cronjob

sysstat cronjob as example below:
# Record stats every 5 minutes (in binary)
*/5 * * * * root /usr/lib/sysstat/sa1 1 1
# Generate a summary of stats (in plain text) every day at 11:50pm
50 23 * * * root /usr/lib/sysstat/sa2 -A


note: cronjob is based on Ubuntu.

Then to read the cronjob output: sar -A -f /var/log/sysstat/sa10 > /var/log/sysstat/sar10 - 10 refer to system date.


Use sar and isag for performance testing and monitoring


Sar Command


$sar -u -r 2 10 -o /var/log/sa/sa00


Report CPU utilization for each 2 seconds. 5 lines are displayed.


Isag Command

$isag /var/log/sa/sa00



with gnuplot



# sar -f /var/adm/sa/sa09 > cpu_util.dat

# gnuplot

gnuplot> set terminal png

gnuplot> set out "cpu_util.png"

gnuplot> set title "CPU Utilization"

gnuplot> set xdata time

gnuplot> set timefmt "%H:%M:%S"

gnuplot> set format x "%H:%M"

gnuplot> plot "cpu_util.dat" using 1:2 title "%user" with lines, \ "cpu_util.dat" using 1:3 title "%sys" with lines

# rm cpu_util.dat







man sar

man isag

isag homepage