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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. nmtui Command Examples in Linux
  2. less: command not found
  3. tvservice: command not found
  4. lsscsi: command not found
  5. rm: cannot remove ‘doc/by-app’: Function not implemented (CentOS/RHEL 7)
  6. “polkit code=exited status=1/FAILURE” – PolicyKit Failing to Start in CentOS/RHEL 7 and 8
  7. How to use shell expansions for generating shell tokens under Linux
  8. mountpoint Command Examples in Linux
  9. chgrp: command not found
  10. fdisk: Unable to write /dev/sdg: Bad file descriptor – error while formatting USB disk

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright