The DBA tells you that the system is not overloaded but you can tell that the system us actively
swapping. What command would you run to show this information to the DBA?
A.
# iotop
B.
# iostat 5 10
C.
# cat /proc/meminfo
D.
# vmstat 5 10
Explanation:
*iostat – Report Central Processing Unit (CPU) statistics and input/output statistics
for devices, partitions and network filesystems (NFS).
*The iostat command is used for monitoring system input/output device loading by observing the
time the devices are active in relation to their average transfer rates. The iostat command
generates reports that can be used to change system configuration to better balance the
input/output load between physical disks.
Incorrect:
Not A: Related to kernel and processes.
*iotop – simple top-like I/O monitor*iotop watches I/O usage information output by the Linux kernel (requires 2.6.20 or later) and
displays a table of current I/O usage by processes or threads on the system.
*iotop displays columns for the I/O bandwidth read and written by each process/thread during the
sampling period. It also displays the percentage of time the thread/process spent while swapping
in and while waiting on I/O. For each process, its I/O priority (class/level) is shown. In addition, the
total I/O bandwidth read and written during the sampling period is displayed at the top of the
interface.
Not C: related to RAM usage.
*The entries in the /proc/meminfo can help explain what’s going on with your memory usage, if you
know how to read it.
*High-Level Statistics
MemTotal: Total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary
code)
MemFree: Is sum of LowFree+HighFree (overall stat)
MemShared: 0; is here for compat reasons but always zero.
Buffers: Memory in buffer cache. mostly useless as metric nowadays
Cached: Memory in the pagecache (diskcache) minus SwapCache
SwapCache: Memory that once was swapped out, is swapped back in but still also is in the
swapfile (if memory is needed it doesn’t need to be swapped out AGAIN because it is already in
the swapfile. This saves I/O)
Not D:vmstat – Report virtual memory statistics
it will be vmstat 5 10
the answer is D because it refers to the statistic of swap.