Skip to content

Instantly share code, notes, and snippets.

@INDIAN2020
Created December 4, 2023 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save INDIAN2020/ebae291d856037678346471d03922c74 to your computer and use it in GitHub Desktop.
Save INDIAN2020/ebae291d856037678346471d03922c74 to your computer and use it in GitHub Desktop.
# Check the logs for more information to see why the api-server is not running and how to fix the problem:
journalctl -xn --unit kubelet.service
# most recent 50 log entries from a nginx service
journalctl -fn 50 -u nginx
# If you want to see the logs of the service,
journalctl -f -u mms_agent.service
# If any error happen
journalctl -u restart-coordinator.service
# Find OOM issues in kubernetes
journalctl -u kubelet | grep -i "oom"
# Terminal History:
To get name of the history file, type: echo "$HISTFILE"
history | grep -E 'du|df|wc'
# Check disk usage by journal
journalctl --disk-usage
OTHER:
sudo dmesg | grep -i -E 'error|warn|failed'
journalctl --since "2020-06-04 10:42:00" --until "2020-06-07 10:42:00"
journalctl -u kubelet --since 2m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment