XK0-005 · Question #746
The MySQL database process that was running on a Linux server suddenly stopped, and the process was killed. Which of the following commands can help identify whether this issue was produced by the…
The correct answer is B. grep -i -r "out of memory" /var/log. grep -i -r 'out of memory' /var/log is correct because the Linux OOM (Out of Memory) killer logs a distinctive message containing 'Out of memory' to the kernel ring buffer, which is written to system log files under /var/log (e.g., /var/log/syslog, /var/log/messages, or…
Question
Options
- Bgrep -i -r "out of memory" /var/log
- Ccat/var/run/initramfs/overlayroot.log | grep "out of memory"
- Dcat /sys/block/loop0/events
How the community answered
(46 responses)- B80% (37)
- C13% (6)
- D7% (3)
Explanation
grep -i -r 'out of memory' /var/log is correct because the Linux OOM (Out of Memory) killer logs a distinctive message containing 'Out of memory' to the kernel ring buffer, which is written to system log files under /var/log (e.g., /var/log/syslog, /var/log/messages, or /var/log/kern.log). The -i flag makes the search case-insensitive and -r searches recursively through all log files. Option A misuses /proc/oom_score, which shows a live score for a running process - not historical kill events. Option C references an overlayroot log unrelated to OOM. Option D reads block device events, which is irrelevant.
Topics
Community Discussion
No community discussion yet for this question.