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 commands to view the performance of linux

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This paper takes the linux operating system as an example to analyze the method of using commands to check the performance of linux systems. Read the complete article, I believe that you have a certain understanding of the use of performance troubleshooting tool commands.

1 、 uptime

Uptime is used to view the load of the system

[root@proxy-server] # uptime 16:05:37 up 167 days, 8 min, 2 users, load average: 15.05,14.83 14.832 、 Check the CPU-related command instructions-- mpstat [root@proxy-server ~] # mpstatLinux 3.18.27 (A1) 03On19 CPU) 02:31:57 PM CPU% usr% nice% sys% iowait% irq% steal% gnice% idle02:31:57 PM all 23.11 1.56 0.39 0.00 1.33 0. 00 0.00 0.00 73.603 、 Vmstat

Vmstat, which stands for Virtual Meomory Statistics (Virtual memory Statistics), is a real-time system monitoring tool. This command accesses this data by using the knlist subroutine and the / dev/kmen pseudo device driver, and the output information is printed directly on the screen. CPU-related information fed back by vmstat includes:

(1) how many tasks are running

(2) use of CPU

(3) how many interrupts CPU received

(4) how many context switches have occurred

3 、 sar

Sar is an abbreviation for System Activity Reporter (system activity report). As the name implies, the sar tool will sample the current state of the system and then express the current running state of the system by calculating data and proportions. Its characteristic is that it can continuously sample the system and obtain a large number of sampling data; the sampling data and analysis results can be stored in files, and the load required is very small. These are checked historical data and some recent system events. The performance data used by sar to check is similar to the display of vmstat, mpstat and iostat. Sar data is saved for a period of time, so you can look at past information. Lastcomm can now be the most recent command executed by the system. These can be used in system audit. Sar, which can be found in BSD and Linux, gives users more options to collect information in system audits.

In terms of feedback on CPU's overall information, sar's feedback on CPU-related information includes:

(1) how many tasks are running

(2) use of CPU

(3) how many interrupts CPU received

(4) how many context switches have occurred

4. Memory dependent

Free

Free-mh

5. Network-related

Nload

After reading this article, have you learned to use the commands of the performance troubleshooting tool? If you want to learn more skills or want to know more about it, you are 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.

Share To

Servers

Wechat

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

12
Report