1,uptime
In a Linux system, these data represent the processes that wait for CPU resources and the number of blocked IO processes (process status D).
2,Dmesg|tail
The command outputs the last 10 lines of the system log, which can be used to troubleshoot performance issues.
3,Vmstat 1
In the output log
R: The number of processes waiting on CPU resources. This data is more capable of showing CPU load than the average load, and the data does not contain the process of waiting for IO. Id,wa,
Free: The number of available memory (in kilobytes) of the system, which can cause system performance problems if the remaining memory is low.
SI,SO: Number of writes and reads for the swap area. If this data is not 0, the system is already using swap (swap), the machine physical memory is insufficient.
Us,sy,id,wa,st: These represent CPU time consumption, which represent user time, system time, idle time, IO wait time, and stolen time, respectively.
4,mpstat-p all 1
This command can show the occupancy of each CPU, and if there is a particularly high CPU utilization, it is possible that a single-threaded application is causing it.
5,Pidstat 1
The PIDSTAT command outputs the CPU utilization of the process, which is continuously output and does not overwrite previous data, allowing for easy observation of system dynamics.
6,iostat-xz 1
The Iostat command is primarily used to look at machine disk IO situations. The output column of the command, the main meaning:
R/S,W/S.RKB/S,WKB/S: Indicates the number of read/write times per second and the amount of read and write data per second (Kbytes), respectively. Too much reading and writing can cause performance problems.
The average wait time for the Await:io operation, in milliseconds. This is the time it takes for an application to interact with the disk, including the IO wait and the actual operation. If this value is too large, the hardware device may be experiencing a bottleneck or failure.
7,free-m
This command allows you to see how the system memory is used, and the-m parameter indicates that it is displayed in megabytes. The last two columns represent the number of memory used for the IO cache, the number of memory used for the file system page cache, and the number of memory used for the file system page cache.
8.sar-n DEV 1
The SAR command can see the throughput of network devices here. When troubleshooting performance issues, you can determine whether the network device is saturated through the throughput of the network device.
9,sar-n tcp,etcp 1
The SAR command is used here to view the status of the TCP connection, which includes:
ACTIVE/S: The number of locally initiated TCP connections per second, both created by the Connect call.
PASSIVE/S: The number of TCP connections initiated remotely per second, that is, the TCP connection created through the accept call.
RETRANS/S: The number of TCP retransmissions per second.
10.Top
This command contains the check commands for several previous commands (I also like to use this command to see if the memory is full) such as the system's load (uptime), System memory usage (free), System CPU usage (VMSTAT), and so on. Therefore, this command allows you to view the source of the system load in a relatively comprehensive way.
commands to check Linux server performance in 1 minutes