How to monitor performance of Linux with Sysstat
Sysstat is a
Linux performance monitoring tool that collects and reports system utilization
statistics. It provides a variety of performance metrics such as CPU
utilization, memory usage, disk I/O activity, and network bandwidth
utilization. Sysstat is comprised of several utilities, including sar
(system activity reporter), mpstat
(multiprocessor
statistics), pidstat
(process statistics), iostat
(input/output
statistics), nfsiostat
(NFS I/O statistics),
and cifsiostat
(CIFS I/O statistics).
Installation Steps of Sysstat
Here are the steps
to install Sysstat on a Linux system:
1. Open a terminal on your Linux system.
2. Check if Sysstat is already installed by running the following command:
If Sysstat is not installed, the command will return an error message.
3. If Sysstat is not installed, you can install it using the package manager of your Linux distribution. For example, on Ubuntu and Debian, run the following command:
On CentOS and Fedora, run the following command:
4. Once the
installation is complete, you can start using the Sysstat utilities. For
example, you can use the sar command to display system activity
reports. Here's an example command:
This command will display CPU utilization statistics every second for five seconds.
Usage of Sysstat with command
Here are some
common commands for using Sysstat:
1. sar: This command is used to display system activity reports. Here's an example command to display CPU usage every 5 seconds for 5 iterations:
2. iostat: This command displays CPU, disk I/O, and NFS statistics. Here's an example command to display disk I/O statistics for the first disk every 5 seconds for 5 iterations:
3. mpstat: This command displays processor related statistics for individual processors and total processors. Here's an example command to display CPU statistics for all processors every 5 seconds for 5 iterations:
4. pidstat: This command displays process statistics. Here's an example command to display CPU and memory usage statistics for process with PID 123 every 5 seconds for 5 iterations:
5. nfsiostat: This command displays NFS server I/O statistics. Here's an example command to display NFS I/O statistics every 5 seconds for 5 iterations:
6. cifsiostat: This command displays CIFS client and server I/O statistics. Here's an example command to display CIFS I/O statistics every 5 seconds for 5 iterations:
Post a Comment