journalctl
The command that reads the systemd journal, where services on a Linux host write their logs.
In more detail
It can filter by service, time and priority, and follow new entries as they arrive. The -u option picks one service, --since limits output to a time window, -b limits it to the current boot and -p err shows errors and worse. Starting with a narrow time window and one service keeps the output manageable.
Examples
journalctl -u kubelet -n 5 --no-pagerjournalctl -u kubelet -n 5 --no-pager # the kubelet's own log on a Kubernetes nodeunit=worker since=boot pri=err msg=timeout models a query by unit, boot and priority.Related terms
- systemd — The program that starts and supervises background services on most Linux distributions.
- Falco — An open-source runtime security tool that watches system calls on each node and raises alerts when they match rules.
- kubelet — The agent on every Kubernetes node that starts and watches the node's containers and reports back to the API server.
- NotReady — A node status meaning its Ready condition is false or unknown, so the control plane no longer trusts it to run pods.
- journald — The systemd logging service that collects messages from the kernel, services and programs into a structured, indexed journal.
- log level — A label on each log message saying how serious it is, from debug and info up to error, critical and emergency.
- systemctl status — The command that shows a systemd unit's current state, main PID, recent resource use and last few log lines.
Taught in
- Runtime Anomaly Detection with Falco & eBPF — Cloud Security & DevSecOps Engineering
- Troubleshooting: NotReady Nodes And kubelet Logs — Kubernetes: Production-Grade Container Orchestration
- Your Own Unit, And Reading journald — Linux Fundamentals & Systems Administration
- Privileged Access: sudo Rules In Drop-In Files — Red Hat Certified System Administrator (EX200) Exam Prep
- Targets, Boot And Shutdown — Red Hat Certified System Administrator (EX200) Exam Prep
- Logs, The Journal, And Keeping It Across Reboots — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: Storage, Then SELinux, Then The Firewall — Red Hat Certified System Administrator (EX200) Exam Prep
- Down Until Morning: Unit Files, Drop-ins, Masks And systemd's Helpers — CompTIA Linux+ (XK0-006) Exam Prep
- Who Wrote That Sudoers File? The Journal, rsyslog, logrotate And auditd — CompTIA Linux+ (XK0-006) Exam Prep
- You Are In Emergency Mode: Boot Failures From GRUB To fstab, On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- It Is Slow, Says Everyone: CPU, Memory, Disk And Network Bottlenecks — CompTIA Linux+ (XK0-006) Exam Prep