Linux sar(sysstat)

Configuration file:

/etc/default/sysstat

sysstat Service:

  sudo service sysstat restart

One more thing to do, change the collection interval from every 10 minutes to every 2 minutes.

vi /etc/cron.d/sysstat
Change
5-55/10 * * * * root command -v debian-sa1 
To
*/2 * * * * root command -v debian-sa1 
----

Displays CPU usage for the 10day of the month from the sa10 file starting from 09 a.m

sar -u -f /var/log/sa/sa10 -s 09:00:00

Displays memory usage for the 10day of the month from the sa10 file starting from 09 a.m

sar -r -f /var/log/sa/sa10 -s 09:00:00

  1. kbmemfree : is the amount of free memory in kilobytes
  2. kbmemused : is the amount of used memory in kilobytes
  3. %memused : is the percentage of how much memory was being used
  4. kbbuffers : is the amount of buffer space used by the kernel in kilobytes
  5. kbcached : is the amount of cached space used by the kernel in kilobytes
  6. kbcommit : amount of memory in kilobytes needed for current workload. This is an estimate of how much RAM/swap is needed to guarantee that there never is out of memory.
  7. %commit : percentage of memory needed for current workload in relation to the total amount of memory (RAM+swap). This number may be greater than 100% because the kernel usually overcommits memory.

Displays Overall I/O Activities for the 10day of the month from the sa10 file starting from 09 a.m

sar -b -f /var/log/sa/sa10 -s 09:00:00

  1. tps : Transactions per second (this includes both read and write)
  2. rtps : Read transactions per second
  3. wtps : Write transactions per second
  4. bread/s : Bytes read per second
  5. bwrtn/s : Bytes written per second

Displays run queue and load average for the 10day of the month from the sa10 file starting from 09 a.m

sar -q -f /var/log/sa/sa10 -s 09:00:00

  1. runq-sz : The number of kernel threads in memory waiting for a CPU to run. Typically, this value should be less than 2. Consistently higher values mean that the system may be CPU-bound.
  2. plist-sz : Number of tasks in the task list
  3. ldavg-1 : Load avg past 1 minute
  4. ldavg-5 : Load avg past 5 minute
  5. ldavg-15: Load avg past 15 minute

results matching ""

    No results matching ""