This article covers how to install Linux Sysstat Utilities For Monitoring System Performance. In fact, Sysstat is a powerful monitoring tool for Linux environments.
Basically, Sysstat is actually a collection of utilities designed to collect information about the performance of a Linux installation and record them over time.
Main features of Sysstat:
- Display average statistics values at the end of the reports.
- On-the-fly detection of new devices (disks, network interfaces, etc.) that are created or registered dynamically.
- Support for UP and SMP machines, including machines with hyperthreaded or multi-core processors.
- Support for hotplug CPUs (it detects automagically processors that are disabled or enabled on the fly) and tickless CPUs.
- Works on many different architectures, whether 32- or 64-bit.
- Needs very little CPU time to run (written in C).
- System statistics collected by sar/sadc can be saved in a file for future inspection. You can configure the length of data history to keep. There is no limit for this history length but the available space on your storage device.
- System statistics collected by sar/sadc can be exported in various different formats (CSV, XML, JSON, SVG, etc.). DTD and XML Schema documents are included in sysstat package. JSON output format is also available for mpstat and iostat commands.
- iostat can display statistics for devices managed by drivers in userspace like spdk.
- Smart color output for easier statistics reading.
Different methods of installing Sysstat on any Linux distribution ?
1. Install from RHEL/Fedora/CentOS
$ sudo yum install sysstat
CentOS and Fedora systems call the collector process using a cron job in /etc/cron.d and it's enabled by default. On recent versions, systemd is used instead of cron. You may need to enable and start the sysstat service:
$ sudo systemctl enable sysstat
$ sudo systemctl start sysstat
2. Install from Ubuntu
$ sudo apt-get install sysstat
Then enable data collecting:
$ sudo vi /etc/default/sysstat
change ENABLED="false" to ENABLED="true"
save the file
Last, restart the sysstat service:
$ sudo service sysstat restart
3. Install Sysstat from sources
Clone sysstat public repository with:
$ git clone git://github.com/sysstat/sysstat
Then configure sysstat for your system:
$ cd sysstat
You can set several variables and parameters on the command line. For example you can enter the following option to activate data collecting (either using cron or systemd):
$ ./configure --enable-install-cron
Enter ./configure --help to display all possible options.
Finally, Compile and install:
$ sudo make install