In Linux, we can use the top command to view the system status and the specific status of each process. However, you can also use the vmstat command to view additional information.
The vmstat command can be used to view memory, swap usage, io usage, CPU usage, and other System conditions. You can view several small entries in each of the preceding categories. For example, in the memory category, you can see how much memory is available and how much buffer is there. You can also view the CPU usage. Idle.
However, if you use vmstat, only the average status of the system is displayed, and one message is displayed. At this time, if we want to let the system average output a message every second, we can use the parameter method to achieve the effect.
Vmstat 1
This command allows one message per second. In this way, you can see how the system resources have changed.