6 Steps to Install Sysstat Monitoring Tool on Ubuntu 20.04 LTS

Sysstat is a free & open source system monitoring tool. It is command line utility. It supports Unix and Unix-like operating systems. It is used for debugging the performance issue on Linux systems.

It provides some components are given below:

  • vmstat – It is used for getting information of Memory, Processes,& Paging.
  • iostat – It is used for getting information of central Processing Unit (CPU) statistics & input/output statistics for devices and partitions.
  • sar – It is used for collects and saves all the system activities and report.
  • pidstat – It is used for I/O, CPU, memory statistics for Linux processes and generate report.

There are few steps to install sysstat on ubuntu:

Step 1: Update the System.

apt-get update

Step 2: Install Sysstat on system.

apt-get install sysstat

  • To check the iostat version.

iostat -V

  • Here is the command output.

Step 3: vmstat Syntax & Examples.

vmstat -parameter

  • To list the Active and Inactive Memory.

vmstat -a

  • Here is the command output.

  • To run the following command for execute vmstat every two seconds & six number of times.

vmstat 2 6

  • Here is the command output.

  • To list timestamps.

vmstat -t 1 5

  • Here is the command output.

  • To list the event counters and memory statistics.

vmstat -s

  • Here is the command output.

  • To show all disks statistics.

vmstat -d

  • Here is the command output.

  • By default ,vmstat shows memory statistics in kilobytes.If we needs to show reports with memory sizes in megabytes.Run the following command.

vmstat -S M 1 5

  • Here is the command output.

  • To shows CPU and I/O statistics.

iostat

  • Here is the command output.

  • To list only CPU Statistics.

iostat -c

  • Here is the command output.

  • To list only Disks I/O Statistics.

iostat -d

  • Here is the command output.

  • To list only disks I/O statistics for specific device.

iostat -p sda

  • Here is the command output.

  • To displays only LVM statistics.

iostat -N

  • Here is the command output.

Step 4: To configure the sysstat file for sar.

  • Open the sysstat config file.

vim /etc/default/sysstat

  • Edit the following line.

ENABLED="true"

  • Here is the command output.

  • Restart the sysstat service.

service sysstat restart

Step 5: To run sar command.

  • To list current CPU Usage.

sar -u

  • Here is the command output.

  • To list real-time CPU uses for 6 times with the difference of 2 second.

sar -u 2 6

  • Here is the command output.

Step 6: To run pidstat command.

  • To list of currently running processes on systems.

pidstat -d

  • Here is the command output.

  • To list resource utilization by processes for 6 times with the difference of 2 second.

pidstat -r 2 6

  • Here is the command output.

Leave a Reply