System Management

A storage drive on a Linux server intermittently drops offline. An administrator plans to reseat the drive's cable and wants to watch the kernel's detection and error messages appear in real time in the terminal while doing so, without erasing the existing ring buffer. Which command should the administrator run?

Show the answer

Correct answerA. dmesg -w

dmesg -w (--follow) prints the current kernel ring buffer and then waits for and displays new messages as they arrive. dmesg -c is tempting because it shows messages, but it clears the buffer after reading and does not follow new output.