Challenge - 5 Problems
Journalctl Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this journalctl command?
You run the command
journalctl -u sshd.service --since "2024-06-01 00:00:00" --until "2024-06-01 01:00:00". What does this command show?Linux CLI
journalctl -u sshd.service --since "2024-06-01 00:00:00" --until "2024-06-01 01:00:00"
Attempts:
2 left
💡 Hint
Look at the -u option for service and the --since and --until for time range.
✗ Incorrect
The -u option filters logs for the sshd service only. The --since and --until options limit logs to the specified time range on June 1, 2024.
💻 Command Output
intermediate1:30remaining
What does this journalctl command output?
You run
journalctl -p err -b. What logs are shown?Linux CLI
journalctl -p err -b
Attempts:
2 left
💡 Hint
Check what -p and -b options mean.
✗ Incorrect
The -p err filters logs with priority error or higher (error, critical, alert, emergency). The -b option limits logs to the current boot.
🔧 Debug
advanced2:00remaining
Why does this journalctl command fail?
You try to run
journalctl --since 2024-06-01 --until 2024-06-01 23:59:59 but get an error. What is the problem?Linux CLI
journalctl --since 2024-06-01 --until 2024-06-01 23:59:59
Attempts:
2 left
💡 Hint
Look carefully at the space in the --until argument.
✗ Incorrect
The shell treats the space as a separator, so the date and time for --until must be quoted to be one argument.
🚀 Application
advanced1:30remaining
How to show only kernel messages with journalctl?
You want to see only kernel messages from the current boot using journalctl. Which command achieves this?
Attempts:
2 left
💡 Hint
Check the option for kernel messages in journalctl.
✗ Incorrect
The -k option shows kernel messages. The -b limits to current boot. The other options are invalid or do not filter kernel logs.
🧠 Conceptual
expert2:00remaining
What is the effect of running
journalctl --vacuum-time=2d?You run
journalctl --vacuum-time=2d. What happens to the system logs?Attempts:
2 left
💡 Hint
Think about what vacuum means in journalctl context.
✗ Incorrect
The --vacuum-time option deletes journal logs older than the specified time to save disk space.