Article Title: Introduction to the vmstat command for Linux host maintenance. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The vmstat command is a method for displaying linux performance indicators. The output types include process (procs), memory (memory), swap zone (swap), and I/O (io), system, and CPU ). Similar to iostat, the first sample is the average value since the recent restart.
For example, the-m option in vmstat-m 5 3 enables memory fields to be displayed in MB.
The r column is the number of processes that can be run, and the B column is the number of blocked processes.
In the memory part, swpd indicates the number of swap space in use, free indicates the number of free RAM, buff indicates the number of RAM used by the buffer, and cache indicates the number of RAM used by the file system cache.
In the switch, si indicates the number of pages from disk to memory, and so indicates the number of pages from memory to disk.
Bi indicates the block read from the disk, and bo indicates the block written to the disk.
In indicates that the system is interrupted. Cs indicates the process context switch.
Us indicates user mode, sy indicates kernel mode, wa indicates waiting for I/O, and id indicates space.
The ls command is one of the most common commands in linux. -A lists all files in the directory, including. Hidden file. -B lists the characters that cannot be output in the file by backslash and character number. -L list the details of a file.
The pwd command can determine the exact location of the current directory in the file system. Pwd indicates print working directory, that is, print the working directory.