Copied to clipboard

vmstat

The vmstat command can be used to report virtual memory statistics of the system, including CPU utilization, memory usage, and virtual memory swapping status, etc.

Example

  • vmstat: Display virtual memory usage since system startup.
  • vmstat 5: Display virtual memory usage every 5 seconds.
  • vmstat -a: Display active and inactive memory usage.
  • vmstat -f: Display the number of free pages.
  • vmstat -m: Display memory usage.
  • vmstat -n 5: Display virtual memory usage every 5 seconds, waiting 5 seconds between displays.