vmstat command in Linux/Unix is a performance monitoring command of the system as it gives the information about processes, memory, paging, block IO, disk and CPU scheduling. All these functionalities makes the command vmstat also known as virtual memory statistic reporter.
Syntax :
vmstat
Delay:
It is the time interval in between two updates. It can be termed as a sampling period after each interval of the sampling period report that will be printed with the updated details. If there will be no delay specified only one report will be printed with average value since boot.
Count:
It is the number of updates which is printed after each interval(sampling period). In absence of count and delay is specified, the default value of count is infinite.
si: Memory that is swapped in every second from disk in kilobytes.
so: Memory that is swapped out every second to disk in kilobytes.
Syntax:
vmstat -a
-a Active:
It displays active and inactive memory of the system running.
It shows he best part of it is we can see how much memory is actively used and how much is inactive.
Syntax:
vmstat -f
Forks: It displays the number of forks since boot. Each process is represented by one or more task, depending on thread usage. This display doesn’t repeat.
vmstat -m
Slabs:
This command is used to display slab information.
Syntax:
vmstat -s
State:
This command is used to display a table of various event counters and memory statistics. This display doesn’t repeat.
Syntax:
vmstat -d
Disk Statics: This command is used to display all disk statistics.
Syntax:
vmstat -t
Time stamp: Vmstat command with -t option shows timestamp with every updation, along with the process there lies time of each update. By default memory status is shown in kilobytes
Syntax:
vmstat -S M Delay Count
Eg. vmstat -S M 3 5
Syntax:
vmstat -n
n One header: It is used to display header only once rather than periodically.
man vmstat
It will give you a more information related to the vmstat and its versions, a manual page exist which can be seen in the terminal only. This is one of the best parts of the terminal that it itself provides the manual on how to use the command and what are its aspects.
Comments
Post a Comment