1Z0-106 practice question 3 of 15

Which command produces human-readable timestamps in kernel ring buffer messages?

Full set: 60 questions
Answer options
A: dmesg -t
B: dmesg -x
C: dmesg -T Correct answer
D: dmesg -W
Correct Answer:
C. dmesg -T
Explanation

The dmesg -T (or --ctime) command is used to print kernel ring buffer messages with human-readable timestamps. This option converts the kernel's internal timestamp, which is typically the number of seconds since boot, into a standard wall-clock time format (e.g., [Tue May 21 10:30:00 2024]). This functionality is crucial for administrators who need to correlate kernel events with other system logs or real-world time, especially during troubleshooting and system analysis.

Why Incorrect

A. dmesg -t (--notime) suppresses the printing of timestamps, which is the opposite of the desired outcome.
B. dmesg -x (--decode) decodes facility and level (priority) numbers into human-readable prefixes, but it does not affect the timestamp format.
D. dmesg -W (--follow) waits for new messages to be added to the kernel ring buffer and prints them as they appear, similar to tail -f.

References

1. Oracle Linux 8 Documentation, dmesg(1) Manual Page: "-T, --ctime Print human-readable timestamps. The timestamp could be inaccurate! The time source used for the logs is not updated after system SUSPEND/RESUME."

2. The Linux man-pages project, dmesg(1): "-T, --ctime Print human-readable timestamps. Be aware that the timestamp could be inaccurate! The time source used for the logs is not updated after system SUSPEND/RESUME." This source also confirms the functions of -t, -x, and -W as described above.

Scroll to Top