sysstat utilities
21 Mar 2015sysstat is a collection of utilities for Linux that provide performance and activity usage monitoring. In today’s post, I’ll go through a brief explanation of these utilities.
iostat
iostat(1) reports CPU statistics and input/output statistics for devices, partitions and network filesystems.
iostat
provides a top level cpu report in its first line with a breakdown percentages for the amount of time the cpu is spent:
- In user space (%user)
- In user space with nice priority (%nice)
- In kernel space (%system)
- Waiting on I/O (%iowait)
- Forced to wait from the hypervisor (%steal)
- Doing nothing (%idle)
Secondly, a breakdown by device is given of disk activity. In this chart, it shows the disk devices’:
- Transfer per second (tps)
- Amount of data read per second (kB_read/s)
- Amount of data written per second (kB_wrtn/s)
- Total read (kB_read)
- Total write (kB_wrtn)
mpstat
mpstat(1) reports individual or combined processor related statistics.
mpstat
goes a little deeper into how the cpu time is divided up among its responsibilities. By specifying -P ALL
on the command line to it, you can get a report per cpu:
pidstat
pidstat(1) reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc.
pidstat
will give you the utilisation breakdown by process that’s running on your system.
sar
sar(1) collects, reports and saves system activity information (CPU, memory, disks, interrupts, network interfaces, TTY, kernel tables,etc.)
sar
requires that data collection is on to be used. The settings defined in /etc/default/sysstat
will control this collection process. As sar
is the collection mechanism, other applications use this data:
sadc(8) is the system activity data collector, used as a backend for sar.
sa1(8) collects and stores binary data in the system activity daily data file. It is a front end to sadc designed to be run from cron.
sa2(8) writes a summarized daily activity report. It is a front end to sar designed to be run from cron.
sadf(1) displays data collected by sar in multiple formats (CSV, XML, etc.) This is useful to load performance data into a database, or import them in a spreadsheet to make graphs.
nfs and cifs
NFS and CIFS also have monitoring utilities.
nfsiostat-sysstat(1) reports input/output statistics for network filesystems (NFS).
cifsiostat(1) reports CIFS statistics.
These certainly come in handy when you’ve got remote shares running from your machine.