Question 750
After a lab configuration change, verify: A running VM has adequate memory by `free -h` but swap usage spikes and the team assumes the application is leaking. Which result most directly proves the desired system state?
Explanation
Correct Answer
The recorded swap-in/out rates and memory pressure indicate whether active thrashing is occurring. This check confirms the expected effect of: Compare `free -h`, `vmstat 1 5`, and the relevant process RSS instead of inferring a leak from swap alone. It distinguishes the intended result from the original failure mechanism: Allocated swap usage is not by itself proof of active memory exhaustion or a leak.
Incorrect Answers
After generating and rebooting the fixture, `journalctl --list-boots` shows earlier boot entries. That verifies a separate lab task: A lab incident must be reconstructed after reboot but `journalctl -b -1` has no previous-boot records due to volatile journaling. It does not validate the implementation required here: Compare `free -h`, `vmstat 1 5`, and the relevant process RSS instead of inferring a leak from swap alone.
`systemctl get-default` reports `multi-user.target`, including after reboot. That verifies a separate lab task: A multi-user server is configured to boot into a graphical session, while the training task requires a command-line default. It does not validate the implementation required here: Compare `free -h`, `vmstat 1 5`, and the relevant process RSS instead of inferring a leak from swap alone.
Only warning-or-higher kernel messages from the current boot are returned. That verifies a separate lab task: A system journal contains many warnings and the student must isolate kernel-related messages for the current boot. It does not validate the implementation required here: Compare `free -h`, `vmstat 1 5`, and the relevant process RSS instead of inferring a leak from swap alone.