Follow systemd service logs

Stream logs for a systemd unit from the last 10 minutes

journalctl -u <service> -f --since '10 minutes ago'

tool
linux133 commands
tags
linuxlogs

More linux commands

  • systemctl status <service> --no-pager -l

    Service status, recent log lines, and active timers

  • tcpdump -i eth0 -nn host <ip> and port 80 -w /tmp/capture.pcap

    Capture specific traffic to a pcap file

  • df -i | sort -k5 -rn

    Show inode usage per filesystem; can cause 'no space' without disk full

  • lsof -p <pid>

    Show all files, sockets, and connections opened by a process

  • watch -n 2 'kubectl get pods -n <ns>'

    Re-run a command every 2 seconds with diff highlighting

all 133 linux commands