1 ## sysstat - System performance tools for the Linux operating system
2 [![Coverity Scan Build Status](https://scan.coverity.com/projects/4040/badge.svg)](https://scan.coverity.com/projects/sysstat-sysstat)
3 [![Build Status](https://travis-ci.org/sysstat/sysstat.svg?branch=master)](https://travis-ci.org/sysstat/sysstat)
4 [![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/sysstat/sysstat.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/sysstat/sysstat/context:cpp)
5 [![Total Alerts](https://img.shields.io/lgtm/alerts/g/sysstat/sysstat.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/sysstat/sysstat/alerts)
6 [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=45U6F9R73ESFQ)
8 (C) 1999-2022 Sebastien GODARD (sysstat (at) orange (dot) fr)
12 The sysstat package contains various utilities, common to many commercial Unixes, to monitor system performance and usage activity:
14 * **iostat** reports CPU statistics and input/output statistics for block devices and partitions.
15 * **mpstat** reports individual or combined processor related statistics.
16 * **pidstat** reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc.
17 * **tapestat** reports statistics for tape drives connected to the system.
18 * **cifsiostat** reports CIFS statistics.
20 Sysstat also contains tools you can schedule via cron or systemd to collect and historize performance and activity data:
22 * **sar** collects, reports and saves system activity information (see below a list of metrics collected by sar).
23 * **sadc** is the system activity data collector, used as a backend for sar.
24 * **sa1** 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 or systemd.
25 * **sa2** writes a summarized daily activity report. It is a front end to sar designed to be run from cron or systemd.
26 * **sadf** displays data collected by sar in multiple formats (CSV, XML, JSON, etc.) and can be used for data exchange with other programs. This command can also be used to draw graphs for the various activities collected by sar using SVG (Scalable Vector Graphics) format.
28 Default sampling interval is 10 minutes but this can be changed of course (it can be as small as 1 second).
30 #### System statistics collected by sar:
31 - Input / Output and transfer rate statistics (global, per device, per partition and per network filesystem)
32 - CPU statistics (global and per CPU), including support for virtualization architectures
33 - Memory, hugepages and swap space utilization statistics
34 - Virtual memory, paging and fault statistics
35 - Process creation activity
36 - Interrupt statistics (global, per CPU and per interrupt, including potential APIC interrupt sources, hardware and software interrupts)
37 - Extensive network statistics: network interface activity (number of packets and kB received and transmitted per second, etc.) including failures from network devices; network traffic statistics for IP, TCP, ICMP and UDP protocols based on SNMPv2 standards; support for IPv6-related protocols
38 - Fibre Channel traffic statistics
39 - Software-based network processing (softnet) statistics
40 - NFS server and client activity
42 - Run queue and system load statistics
43 - Kernel internal tables utilization statistics
45 - TTY devices activity
46 - Power management statistics (instantaneous and average CPU clock frequency, fans speed, devices temperature, voltage inputs)
47 - USB devices plugged into the system
48 - Filesystems utilization (inodes and blocks)
49 - Pressure-Stall Information statistics
51 #### Sysstat key features:
52 - Display average statistics values at the end of the reports.
53 - On-the-fly detection of new devices (disks, network interfaces, etc.) that are created or registered dynamically.
54 - Support for UP and SMP machines, including machines with hyperthreaded or multi-core processors.
55 - Support for hotplug CPUs (it detects automagically processors that are disabled or enabled on the fly) and tickless CPUs.
56 - Works on many different architectures, whether 32- or 64-bit.
57 - Needs very little CPU time to run (written in C).
58 - 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.
59 - 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.
60 - iostat can display statistics for devices managed by drivers in userspace like spdk.
61 - Smart color output for easier statistics reading.
63 ![Smart color output](images/color_output.png)
64 - Internationalization support (sysstat has been translated into numerous different languages). Sysstat is now part of the [Translation Project](http://translationproject.org/).
65 - Sysstat commands can automatically select the unit used to display sizes for easier reading (see option `--human`):
67 ![Sample iostat output](images/iostat.png)
69 - Graphs can be generated (SVG format - Scalable Vector Graphics) and displayed in your favorite web browser. See some sample screenshots below:
71 ![Fancy sysstat graph](images/cpugraph.jpg)
73 ![Fancy sysstat graph](images/tcgraph.png)
75 ![Fancy sysstat graph](images/loadavg-svg.png)
78 Sysstat is Open Source / Free Software, and is freely available under the GNU General Public License, version 2.
79 The latest version of sysstat can always be found on my web site at:
81 [http://pagesperso-orange.fr/sebastien.godard/](http://pagesperso-orange.fr/sebastien.godard/)
83 See the CHANGES file to know the new features/improvements/bug fixes added
84 in this release of sysstat.
85 Sysstat development can be tracked on [GitHub](https://github.com/sysstat/sysstat).
89 #### Install from RHEL/Fedora/CentOS
94 $ sudo yum install sysstat
97 CentOS and Fedora systems call the collector process using a cron job in /etc/cron.d and it's enabled by default.
98 On recent versions, systemd is used instead of cron. You may need to enable and start the sysstat service:
101 $ sudo systemctl enable --now sysstat
107 $ sudo systemctl enable sysstat
108 $ sudo systemctl start sysstat
111 if option `--now` is not supported by your systemd version.)
113 #### Install from Ubuntu
118 $ sudo apt-get install sysstat
121 Then enable data collecting:
124 $ sudo vi /etc/default/sysstat
125 change ENABLED="false" to ENABLED="true"
129 Last, restart the sysstat service:
132 $ sudo service sysstat restart
135 #### Install from sources
137 Clone sysstat public repository with:
140 $ git clone git://github.com/sysstat/sysstat
143 Then configure sysstat for your system:
150 You can set several variables and parameters on the command line. For example you
151 can enter the following option to activate data collecting (either using cron or systemd):
154 $ ./configure --enable-install-cron
157 Enter `./configure --help` to display all possible options.
158 Note: There is another way to configure sysstat instead of entering `./configure`:
159 This is the **Interactive Configuration script** (_iconfig_) which will ask you
160 for the value of the main sysstat variables and parameters.
161 Enter `./iconfig` then answer the questions or enter Return to accept
162 the (sane) default values. For yes/no questions, answer 'y' or 'n'
163 (without the quotes): It is case sensitive! You can also enter '?' to get
164 a help message that will explain the meaning of each variable or parameter.
173 ### Feedback welcome!
175 Please use the BUG_REPORT template file to report a bug: It contains important data
176 that should be provided for this.
177 Please also remember to read the FAQ that comes with sysstat or is available
178 from the Wiki page on GitHub.
180 Opening an issue or a pull request on GitHub is the preferred way to report a bug or submit a patch.
181 Patches and suggestions for improvements are always welcome!
185 If you are reading this README file then you are probably about to use the sysstat tools
186 to help you monitor your system and maybe troubleshoot some performance issues. Good choice.
187 Sysstat is made for you. Moreover sysstat is free software and always will be.
189 Yet have you ever considered making a donation to sysstat, regardless of how much your
190 contribution is? This in turn would encourage me to keep up the work as good as it can be...
191 Oh, and it would certainly also help me explain to my wife why I spend so much time in front
192 of my computer instead of taking care of the household ;-)
194 Click on the "Donate PayPal" button above at the beginning of this file.
195 You can also make a donation [from my web page](http://pagesperso-orange.fr/sebastien.godard/).
201 Sebastien GODARD - sysstat (at) orange (dot) fr