A Linux host with Red Hat Enterprise Linux or Oracle Linux can be monitored using the SAR command-line utility. The SAR is included in the SYSSTAT package bundle and is usually included with these Linux distributions.
SAR retrieves activity counters of the operational system, such as CPU, memory, disk, and network I/O usage. By default, it keeps a history of seven days, so it is a very useful tool to retrieve past reports and quickly search for behavioral patterns.
This recipe will retrieve some statistics from the prod01
machine using the SAR command-line utility.
SAR should already be installed in a Red Hat or Oracle Linux distribution. If it is not installed, you can use the yum
package management utility to install the SYSSTAT package, which includes SAR.
As root user, execute the
yum
command and follow the onscreen instructions to install SYSSTAT:
[root@prod01]$ yum install sysstat