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 commands for monitoring server performance

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

Share

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

This article mainly explains "what are the commonly used monitoring server performance commands". The explanation in this article is simple and clear, and is easy to learn and understand. let's go deep into the editor's train of thought. Let's study and learn what the commonly used monitoring server performance commands are.

1. Top-Real-time monitoring commands

1. The running status of the system can be monitored in real time, and it can be sorted according to cpu and memory, etc.

-h: help

-p: monitors specified processes. When monitoring multiple processes, the process ID is separated by commas.

2. Top mission area command:

M: sort by memory usage

P: sort by CPU usage

Z: color / black and white display

Top-p monitors the specified process

3. Load average in top: the average utilization of the running queue of the system can also be considered as the average number of runnable processes. The three values represent the average load values at the last 1 minute, 5 minutes and 15 minutes, respectively.

4. The top command states that when the load average of a single-core CPU is 1, it indicates a full load; similarly, the value of a fully loaded load average in a multi-core CPU is the number of 1*cpu cores.

Us:user

Sy:system

Id:idle idle

Mem: memory

Swap: virtual memory

Server performance monitoring

2. Vmstat-real-time monitoring command

1. Can monitor the process status, memory, virtual memory, disk IO, cpu of the operating system

2. Syntax: vmstat [- a] [- n] [- S unit] [delay [count]]

3.-S: display in the specified units. The parameters are k, K, m, M, which represent 1000, 1024, 1000000 and 1048576 bytes (byte), respectively. The default unit is K (1024bytes)

4. Dynamic monitoring of memory and cpu: vmstat 1 2

The first parameter: time interval

Second parameter: number of times displayed

Free- real-time memory monitoring

1. Able to monitor the memory usage status of the system. Where total: the total size of physical memory

Used: how much has been used

Free: how many are available

Shared: the total amount of memory shared by multiple processes

Buffers/cached: the size of the disk cache

Free: the unit of statistics is K

Free-m: the statistical unit is M

3. Mpstat-real-time CPU monitoring

1. The biggest feature of mpstat: you can view the statistics of each computing core in the multi-core cpu.

2. Syntax: mpstat [- p {| all}] [internal [count]]

-P {| all}] identifies which CPU,cpu to monitor takes a value in [the number of CPUs-1].

Interval between two adjacent samples of internal

The number of count samples. Count can only be used with delay.

3. Mpstat should note: when there are no parameters, mpstat displays the average of all the information after the system starts; when there is internal, the information in the first line comes from the average information since the system started; starting from the second line, the output is the average information of the previous internal period.

4. Ubantu system if you enter mpstat directly without the command, enter apt-get install-y sysstat (you must have a network)

5. Use examples:

Mpstat-P 0 (Monitoring cpu 0)

Mpstat 1 5 (1 second interval, 5 monitoring times)

4. Netstat-Real-time Network Monitoring

1. Netstat commands users to display information such as local network links, running ports, routing tables, etc.

2. Netstat parameter description:

-n: refuses to display aliases, showing that all numbers are converted into numbers

-l: only the service status in listen (monitoring) is listed.

-p: displays the name of the program that established the relevant link

-t: displays tcp-related options

-u: show only udp related options

-I: displays information about the auto-matching interface

-c: execute the netstat command at regular intervals

3. More commonly used command: netstat-ntlp

Thank you for your reading. the above is the content of "what are the commonly used monitoring server performance commands". After the study of this article, I believe you have a deeper understanding of what the commonly used monitoring server performance commands are. Specific use also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Network Security

Wechat

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

12
Report