Hello and welcome to this video on Oracle Linux 8.
In this video, I will cover Oracle Linux 8's vmstat utility
For our objectives today and after viewing this video, you should be able to:
Describe the vmstat utility
Explain running vmstat and reviewing memory usage statistics
Describe system reporting including paging, IO, disks, and cpu activity
And finally, you should be able to explain monitoring a system using command options.
The vmstat command is used for collecting and displaying system's memory usage.
vmstat shows how much virtual memory there is and how much is free and paging activity.
You can observe page-ins and page-outs as they happen.
This is extremely useful for detecting shortages of physical memory, which can adversely affect
system performance.
Let's explore more about vmstat.
As root, run the vmstat command without any options.
A single report is generated.
But the vmstat output contains more than just memory statistics.
Output is broken up into six sections:
procs, memory, swap, io, system, and cpu.
To prevent the sample output from wrapping, the output is shown in two parts.
The first two columns give information about processes.
r is the number of processes that are in a wait state.
These processes are not doing anything but waiting to run.
b is the number of processes that were in sleep mode and were interrupted since the
last update.
The next four columns give information about memory.
swpd is the amount of virtual memory used
free is the amount of idle memory
buff is the amount of memory used as buffers
cache is the amount of memory used as cache
The next two columns give information about swap.
si is the amount of memory swapped in from disk per second
so is the amount of memory swapped out to disk (per second)
Nonzero si and so numbers indicate that there is not enough physical memory and that the
kernel is swapping memory to disk.
The next two columns report Input/Output.
bi is the number of blocks per second received from a block device
bo is the number of blocks per second sent to a block device
The next two columns give the following system information.
in is the number of interrupts per second, including the clock
cs is the number of context switches per second
The last five columns give the percentages of total CPU time:
us is the percentage of CPU cycles spent on user processes
sy is the percentage of CPU cycles spent on system (kernel) processes
id is the percentage of CPU cycles spent idle
wa is the percentage of CPU cycles spent waiting for I/O
st is the percentage of CPU cycles stolen from a virtual machine
To view a continuous report for every second, run the following command:
To terminate press control + c.
vmstat also accepts interval and count arguments.
The following example runs 3 reports 5 seconds apart.
Additional information can be included by providing different options to the vmstat
command.
-a displays active and inactive memory.
-f displays the number of forks since boot.
-t adds a time stamp to the output.
And -d reports the disk statistics.
After watching this video, you should now be able to:
Describe the vmstat utility
Explain running vmstat and reviewing memory usage statistics
Describe system reporting including paging, IO, disks, and cpu activity
And finally, you should now be able to explain monitoring a system using command options.
Oracle provides an extensive number of resources which you can use to learn more about this
subject and others.
Look for additional videos on Oracle Linux 8 ond other topics using the links shown.
This concludes the video.
Thank you for watching.