]> granicus.if.org Git - sysstat/blob - README.md
Merge pull request #198 from stevekay/master
[sysstat] / README.md
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)
7
8 (C) 1999-2018 Sebastien GODARD (sysstat (at) orange (dot) fr)
9
10 ### Introduction
11
12 The sysstat package contains various utilities, common to many commercial Unixes, to monitor system performance and usage activity:
13
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.
19
20 Sysstat also contains tools you can schedule via cron or systemd to collect and historize performance and activity data:
21
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.
27
28 Default sampling interval is 10 minutes but this can be changed of course (it can be as small as 1 second).
29
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
41 - Sockets statistics
42 - Run queue and system load statistics
43 - Kernel internal tables utilization statistics
44 - Swapping 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
50 #### Sysstat key features:
51 - Display average statistics values at the end of the reports.
52 - On-the-fly detection of new devices (disks, network interfaces, etc.) that are created or registered dynamically.
53 - Support for UP and SMP machines, including machines with hyperthreaded or multi-core processors.
54 - Support for hotplug CPUs (it detects automagically processors that are disabled or enabled on the fly) and tickless CPUs.
55 - Works on many different architectures, whether 32- or 64-bit.
56 - Needs very little CPU time to run (written in C).
57 - 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.
58 - 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.
59 - Smart color output for easier statistics reading.
60
61 ![Smart color output](images/color_output.png)
62 - Internationalization support (sysstat has been translated into numerous different languages). Sysstat is now part of the [Translation Project](http://translationproject.org/).
63 - Sysstat commands can automatically select the unit used to display sizes for easier reading (see option `--human`):
64
65 ![Sample iostat output](images/iostat.png)
66
67 - Graphs can be generated (SVG format - Scalable Vector Graphics) and displayed in your favorite web browser. See some sample screenshots below:
68
69 ![Fancy sysstat graph](images/cpugraph.jpg)
70
71 ![Fancy sysstat graph](images/tcgraph.png)
72
73 ![Fancy sysstat graph](images/loadavg-svg.png)
74
75
76 Sysstat is Open Source / Free Software, and is freely available under the GNU General Public License, version 2.
77 The latest version of sysstat can always be found on my web site at:
78
79 [http://pagesperso-orange.fr/sebastien.godard/](http://pagesperso-orange.fr/sebastien.godard/)
80
81 See the CHANGES file to know the new features/improvements/bug fixes added
82 in this release of sysstat.
83 Sysstat development can be tracked on [GitHub](https://github.com/sysstat/sysstat).
84
85 ### Installation
86
87 #### Install from RHEL/Fedora/CentOS
88
89 Enter:
90
91 ```
92 $ sudo yum install sysstat
93 ```
94
95 CentOS and Fedora systems call the collector process using a cron job in /etc/cron.d and it's enabled by default.
96 On recent versions, systemd is used instead of cron. You may need to enable and start the sysstat service:
97
98 ```
99 $ sudo systemctl enable sysstat
100 $ sudo systemctl start sysstat
101 ```
102
103 #### Install from Ubuntu
104
105 Enter:
106
107 ```
108 $ sudo apt-get install sysstat
109 ```
110
111 Then enable data collecting:
112
113 ```
114 $ sudo vi /etc/default/sysstat
115 change ENABLED="false" to ENABLED="true"
116 save the file
117 ```
118
119 Last, restart the sysstat service:
120
121 ```
122 $ sudo service sysstat restart
123 ```
124
125 #### Install from sources
126
127 Clone sysstat public repository with:
128
129 ```
130 $ git clone git://github.com/sysstat/sysstat
131 ```
132
133 Then configure sysstat for your system:
134
135 ```
136 $ cd sysstat
137 $ ./configure
138 ```
139
140 You can set several variables and parameters on the command line. For example you
141 can enter the following option to activate data collecting (either using cron or systemd):
142
143 ```
144 $ ./configure --enable-install-cron
145 ```
146
147 Enter `./configure --help` to display all possible options.  
148 Note: There is another way to configure sysstat instead of entering `./configure`:
149 This is the **Interactive Configuration script** (_iconfig_) which will ask you
150 for the value of the main sysstat variables and parameters.
151 Enter `./iconfig` then answer the questions or enter Return to accept
152 the (sane) default values. For yes/no questions, answer 'y' or 'n'
153 (without the quotes): It is case sensitive! You can also enter '?' to get
154 a help message that will explain the meaning of each variable or parameter.
155
156 Compile and install:
157
158 ```
159 $ make
160 $ sudo make install
161 ```
162
163 ### Feedback welcome!
164
165 Please use the BUG_REPORT template file to report a bug: It contains important data
166 that should be provided for this.
167 Please also remember to read the FAQ that comes with sysstat or is available
168 from the Wiki page on GitHub.
169
170 Opening a pull request is the preferred way to submit a patch.
171 Patches and suggestions for improvements are always welcome!
172
173 ### Support sysstat!
174
175 If you are reading this README file then you are probably about to use the sysstat tools
176 to help you monitor your system and maybe troubleshoot some performance issues. Good choice.
177 Sysstat is made for you. Moreover sysstat is free software and always will be.
178
179 Yet have you ever considered making a donation to sysstat, regardless of how much your
180 contribution is? This in turn would encourage me to keep up the work as good as it can be...
181 Oh, and it would certainly also help me explain to my wife why I spend so much time in front
182 of my computer instead of taking care of the household ;-)
183
184 Click on the "Donate PayPal" button above at the beginning of this file.
185 You can also make a donation [from my web page](http://pagesperso-orange.fr/sebastien.godard/).
186
187 Enjoy!
188
189 --
190
191 Sebastien GODARD - sysstat (at) orange (dot) fr
192