Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use sar

Shulou Source: shulou.com Published: 2022-05-31 16:17:40 10月03日 Update

Editor to share with you how to use sar, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Sar tools are included in the sysstat package, which also includes many powerful tools such as iostat, mpstat, and so on, which can be installed on centos and ubuntu systems.

First, after installing sysstat, the / etc/cron.d/sysstat file will appear. Anyone familiar with the linux system knows that this is a timing file. If you open this timing file, you can see the following two lines

* / 10 * root / usr/lib64/sa/sa1 1 1

53 23 * root / usr/lib64/sa/sa2-A

/ usr/lib64/sa/sa1 and / usr/lib64/sa/sa2 are shell scripts. Sadc is called in sa1 to collect system performance, and sa2 is used to archive the output results.

These two lines mean that the sa1 script is executed every ten minutes and the log is archived at 23:53 every day

In fact, the command to collect the performance index of linux system is sadc, and the system log collected is under / var/log/sa.

Sar is a performance data analysis tool that makes the data results look better, and when sar-b is executed, the information is extracted from the log under / var/log/sa.

Second, but the data displayed by the sar command is still not intuitive. It would be nice if there were icons to display. This ksar can do it.

Ksar is based on java, first install java, then download ksar, double-click to run it, download address: https://github.com/vlsi/ksar/releases, support windows, mac

Double-click the ksar sign-in page below, and click "data"-"Load from a SSH Command...." Load remote host commands

The above is all the contents of this article "how to use sar". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Systems commands tools performance data files logs articles content results scripts powerful intuitive not so much hosts messages icons addresses most substance Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Huawei MySQL Shulou Technology NVidia