nerdexam
CompTIA

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…

Troubleshooting

Question

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 OOM killer? grep -i /proc/oom_socre A.

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)
  • B
    80% (37)
  • C
    13% (6)
  • D
    7% (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

#OOM killer#Linux logs#System troubleshooting#grep command

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice