_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Journalctl — Debugging and Log Analysis

03. 09. 2022 1 min read intermediate

Systemd journal captures logs from services, kernel and other sources. Journalctl offers powerful filtering better than grep in /var/log.

Basics

journalctl -u nginx journalctl -fu nginx journalctl -n 50 -u myapp

Filtering

journalctl –since ‘1 hour ago’ journalctl –since today journalctl -b journalctl -p err journalctl -k

Formats and grep

journalctl -u nginx -o json-pretty journalctl -u nginx -o cat journalctl -u myapp –grep ‘error’

Management

journalctl –disk-usage journalctl –vacuum-size=500M journalctl –vacuum-time=30d

Journal is your friend

Powerful log filtering. For centralized logging consider Elasticsearch or Loki.

journalctlsystemdlogging
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.