• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

vmstat: command not found

by admin

The vmstat command displays various statistics about virtual memory, as well as process, CPU, and I/O statistics. By default, the report will provide averages of each statistic since the last system boot, though you can also specify a delay value to sample from a period of time.

Some memory-based statistics include:

  • The total virtual memory available.
  • The total virtual memory that is free for use.
  • The total memory used in buffers and cache.
  • The total memory used in swap space.

Some CPU-based statistics include:

  • Time spent running user space.
  • Time spent running in kernel space.
  • Time spent idle.
  • Time spent waiting for I/O.

Syntax

The syntax of the vmstat command is:

# vmstat [options] [delay [count]]

Output Delay

It’s recommended to supply vmstat with a delay for a more accurate report. For example, vmstat 5 5 will run the command on a five-second delay for five intervals.

If you encounter the below error while running the vmstat command:

vmstat: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install procps
Ubuntu apt-get install procps
Alpine apk add procps
Arch Linux pacman -S procps-ng
Kali Linux apt-get install procps
CentOS yum install procps-ng
Fedora dnf install procps-ng
Raspbian apt-get install procps

vmstat Command Examples

1. Display virtual memory statistics:

# vmstat

2. Display reports every 2 seconds for 5 times:

# vmstat 2 5

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to disable firewalld and and switch to iptables in CentOS / RHEL 7
  2. dot: Render an image of a linear directed network graph from a graphviz file
  3. CIFS Share Filesystem Is Not Mounted after Reboot on CentOS/RHEL 7
  4. How to find if NUMA configuration is enabled or disabled?
  5. How to use ldconfig Command in Linux
  6. “az version” Command Examples (Shows the current version of Azure CLI modules and extensions)
  7. mkfs.vfat: command not found
  8. nmtui: command not found
  9. Starting iptables Fails with Error “Another app is currently holding the xtables lock”
  10. Installing CentOS / RHEL 7 (step by step with screen shots)

You May Also Like

Primary Sidebar

Recent Posts

  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright