How to install sar in SUSE Linux

Learn how to install sar utility in SUSE Linux. Also, it lists commands to enable sar to collect monitoring data in the background.

sar command in SUSE Linux

sar is a monitoring utility mostly native to Linux. But with SUSE Linux you can not find sar pre-installed. There you will see an error like one below :

root@kerneltalks # sar
If 'sar' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf sar

Read our articles regarding sar tool :


How to install sar in SUSE Linux

To make sar available on SUSE, you need to install package named sysstat. If you have zypper repo configured then you can directly run below command :

root@kerneltalks # zypper in sysstat
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP3_x86_64'.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  sysstat

1 new package to install.
Overall download size: 358.7 KiB. Already cached: 0 B. After the operation,
additional 1.3 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package sysstat-12.0.2-10.15.1.x86_64
                                           (1/1), 358.7 KiB (  1.3 MiB unpacked)
Retrieving: sysstat-12.0.2-10.15.1.x86_64.rpm ..............[done (160.0 KiB/s)]
Checking for file conflicts: .............................................[done]
(1/1) Installing: sysstat-12.0.2-10.15.1.x86_64 ..........................[done]

If zypper repo is not configured you can download appropriate rpm for your kernel version and install using rpm command. We used SUSE12SP3 here for a demonstration.

Once done you need to start sysstat service so that it will start collecting monitoring data in the background. Also, enable this service at boot so that after reboot it starts itself and keeps on collecting data in the background.

root@kerneltalks # systemctl enable sysstat
Created symlink from /etc/systemd/system/multi-user.target.wants/sysstat.service to /usr/lib/systemd/system/sysstat.service.

root@kerneltalks # systemctl start sysstat

That’s it. You have installed sar on SUSE Linux and started collecting monitoring data.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.