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

What are the commonly used performance analysis commands in Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article focuses on "what are the commonly used performance analysis commands in Linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what are the performance analysis commands commonly used in Linux.

1.uptime:

Shows how long the system has been running, which in turn displays the following information: the current time, how long the system has been running, how many logged-in users are currently, and the average load of the system in the past 1 minute, 5 minutes, and 15 minutes.

2.dmesg | tail

Demsg is mainly used to display boot information. In general, kernel will store the boot information in ring buffer, and sometimes when you boot and forget to check the information, you can use the dmesg command to check it.

-c after the information is displayed, clear the contents of the ring buffer.

-s is preset to 8196, which is exactly the size of ring buffer.

-n sets the level of recording information.

3.vmstat 1

The vmstat command is the most common Linux/Unix monitoring tool, which can display the status values of the server at a given time interval, including server CPU utilization, memory usage, virtual memory swapping, IO read and write.

Unlike the top command, I can look at the CPU, memory, and IO usage of the entire machine, rather than just looking at a process's CPU or memory usage.

4.mpstat-P ALL 1

View the usage of each computing core of multicore CPU

The most important feature of mpstat is that it can view the statistics of each computing core in the multi-core cpu, while vmstat can only view the overall cpu of the system.

5.pidstat 1

Execute pidstat, which will output cpu statistics for all active processes after the system starts:

Linux:~ # pidstatLinux 2.6.32.12-0.7-default (linux) 06 raceme 18Accord 12 _ x86mm 641VV 37VV 19 PID% usr% system% guest% CPU CPU Command …... 11:37:19 11452 0.00 0.00 0.00 2 bash11:37:19 11509 0.00 0.00 0.00 3 dd

In addition, there are several commonly used performance analysis commands, you can check their usage and memorize them. System stability and security are essential skills for operation and maintenance personnel.

# iostat-xz 1

# free-m

# sar-n DEV 1

# sar-n TCP,ETCP 1

# top

At this point, I believe you have a deeper understanding of "what are the commonly used performance analysis commands in Linux?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Internet Technology

Wechat

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

12
Report