Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use sar

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report