A Linux administrator is troubleshooting a server that has become extremely unresponsive. Interactive shell commands are slow, and applications are frequently timing out. The administrator suspects the system is thrashing due to excessive memory swapping. Which of the following commands and associated metrics would most directly confirm that heavy swapping is the cause of the unresponsiveness?
The iostat command, observing the %iowait column.
The vmstat command, observing the si and so columns.
The top command, observing the %CPU column.
The free -h command, observing the used value under Swap.
The correct answer is vmstat, focusing on the si and so columns. The vmstat command reports virtual memory statistics. The so (swap-out) and si (swap-in) columns show the amount of memory being swapped from and to the disk. Consistently high, non-zero values in these columns are a direct indication of 'thrashing,' where the system is spending most of its time moving memory pages between RAM and disk, leading to severe performance degradation and unresponsiveness.
top with the %CPU column is incorrect because while high CPU usage can cause unresponsiveness, it does not specifically diagnose thrashing. A system can have high CPU usage without heavy swapping.
iostat with the %iowait column is incorrect because while thrashing will cause high I/O wait (since swapping is a disk I/O operation), high %iowait could also be caused by other disk-intensive tasks not related to memory pressure. Therefore, it is a symptom but not as direct a confirmation of swapping as vmstatsi/so.
free -h is incorrect because it provides a static snapshot of total, used, and free memory and swap space. While it can show that swap space is being used, it does not show the rate of active swapping, which is the key indicator of thrashing.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the 'vmstat' command do?
Open an interactive chat with Bash
What are 'si' and 'so' columns in vmstat, and why are they important?
Open an interactive chat with Bash
How does thrashing affect system performance?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access