In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of linux tsar command to collect server system information, I hope you will learn a lot after reading this article, let's discuss it together!
Tsar is a collection tool developed by Taobao (similar to sar tool), which is mainly used to collect server system information (such as cpu,io,mem,tcp, etc.) and application data (such as squid haproxy nginx, etc.).
The collected data is stored on disk, and the historical information can be queried at any time. The output mode is flexible and diverse. In addition, the data can be stored in mysql or sent to the nagios alarm server.
When displaying data, tsar can specify a module, and merge can output data with multiple pieces of information, and real-time information in seconds can be output with-live parameter.
Tsar is a program based on modular design, which consists of two parts: framework and module.
The source code of the framework program is mainly in the src directory, while the module source code is mainly in the modules directory.
The framework provides the parsing of the configuration file, the loading of the module, the parsing of the command line parameters, and the analysis and output of the interface of the application module to the original data of the module. The module provides an interface to the framework call.
Tsar relies on cron to collect data every minute, so it requires the system to install and enable crond. After installation, tsar executes tsar-cron every minute to regularly collect information and record it to the original log file.
Syntax format: tsar [parameters]
Common parameters:
Reference example
Cpu Monitoring:
[root@linuxcool] # tsar-- cpu
Monitor virtual memory and load conditions:
[root@linuxcool] # tsar-- swap-- load
List the usage of system memory:
[root@linuxcool] # tsar-- mem
Monitor the system IO:
[root@linuxcool] # tsar-- io
Historical data backtracking:
[root@linuxcool] # tsar-d 2-I 1 after reading this article, I believe you have a certain understanding of using linux's tsar command to collect server system information. You want to know more about it. Welcome to follow the industry information channel. Thank you for reading!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.