Use it when you need evidence for why something failed.
Log Troubleshooting
Log troubleshooting means finding the right log, narrowing it to the time and source of the problem, and reading the first error rather than the last.
1. When exactly did it fail? Filter: journalctl --since '…' --until '…'.
2. Which unit or program? journalctl -u <svc> or its file.
3. Find the first error: journalctl -p err -o short-precise.
4. Nothing there → is the journal persistent? Is the app logging elsewhere?
5. Raise the log level briefly, reproduce, then lower it.
failure time → right log source → filtered window → first error → cause
For Logging → Log Troubleshooting, continue with the first unproven Topic check: Pin host, boot ID, clock/timezone, service/PID, event trigger and exact query window. If that boundary is healthy, advance to the adjacent check: Trace the same event through producer, journald/syslog/file, rotation/retention, forwarding and remote query as applicable. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
journalctl -u rsyslogVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
symptom/time → event actually generated → source timestamp/identity → collector receipt → filter/rate-limit → persistence → rotation/retention → forwarding queue/transport → remote ingestion/index → query scope → workload verification
Healthy evidence: the exact reproducible event is present at every required boundary with aligned timestamps and source identity, and the original workload is independently verified after remediation.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Pin host, boot ID, clock/timezone, service/PID, event trigger and exact query window.
- Trace the same event through producer, journald/syslog/file, rotation/retention, forwarding and remote query as applicable.
- Check drops/rate limits, permissions, disk/inode pressure, queue backlog and filter/ruleset mismatches at the first failing step.
- Apply one minimal change, reproduce the exact event and then verify the original service/workload separately.
Verification chain. symptom/time → event actually generated → source timestamp/identity → collector receipt → filter/rate-limit → persistence → rotation/retention → forwarding queue/transport → remote ingestion/index → query scope → workload verification
Step 3 Commands Verify boundary
journalctl -u rsyslog
systemctl status systemd-journald
df -h /var/log
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: queries use the wrong boot/timezone, rate limiting or rotation is ignored, only local or remote evidence is checked, or error-string matching substitutes for causal analysis.
Step 5 Common mistakes Narrow the fault
- Missing logs because the disk was full.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Note the exact time of the failure and filter to it (--since, --until). The first error often causes the later ones. Check that clocks are synchronised before correlating across hosts. If nothing is logged, raise the log level temporarily.
journalctl -b -p warning— warnings and errors since bootjournalctl -u <unit> -f— follow one unit's logls -lh /var/log— log files and sizeslogger -p user.info test— send a test message
ReferenceWhat it is1 section · depth on demand
Core model
Reproduce one exact event with a pinned timestamp and source identity. Trace it producer-to-destination, compare each boundary, change only the first failed layer, then repeat the same event and verify both log visibility and original workload behavior.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Troubleshooting is complete only when the first failed logging boundary is evidenced and the original event is observable after a minimal fix; log visibility alone does not show the underlying workload is fixed.
In depth
When logs are missing, check journald's own settings
$ systemd-analyze cat-config systemd/journald.conf | grep -vE '^#|^$'
[Journal]
Storage=auto
$ ls -ld /var/log/journal
ls: cannot access '/var/log/journal': No such file or directory
$ journalctl --disk-usage
Archived and active journals take up 64.0M in the file system.
$ journalctl -u systemd-journald --since -1d | grep -i 'suppressed'
systemd-journald[412]: Suppressed 18342 messages from myapp.service
The journald.conf manual documents Storage= (volatile, persistent, auto — persistent only if /var/log/journal exists — and none), SystemMaxUse= (default 10 % of the file system, capped at 4 G), RateLimitIntervalSec=/RateLimitBurst= (default 10000 messages per 30 s per service, overridable per unit) and ForwardToSyslog= (off by default).
| Symptom | Cause | Fix |
|---|---|---|
| Logs gone after reboot | Storage=auto and no /var/log/journal → volatile | mkdir -p /var/log/journal && systemd-tmpfiles --create --prefix /var/log/journal, restart journald |
Suppressed N messages | Rate limit reached | Fix the chatty service, or set LogRateLimitIntervalSec=/LogRateLimitBurst= in its unit |
| Old logs disappear quickly | SystemMaxUse/SystemKeepFree limits | Increase, or ship logs centrally |
| rsyslog files empty | rsyslog reads from journal via imjournal, or forwarding disabled | Check rsyslog input module and ForwardToSyslog |
| Journal corruption messages | Unclean shutdown | journalctl --verify; corrupted files are rotated, usually harmless |
Drop-in instead of editing the main file
# /etc/systemd/journald.conf.d/50-retention.conf
[Journal]
Storage=persistent
SystemMaxUse=2G
MaxRetentionSec=1month
systemctl restart systemd-journald applies it.
Shipping logs off the host
For incidents the host may be the thing that failed. Forward to a central system (rsyslog/syslog-ng, systemd-journal-upload, or an agent) and verify delivery by sending a test message: logger -p user.warning "log pipeline test $(date)" and searching for it centrally.
*The journal storage usage and missing directory message illustrate persistence checks, not measurements from an installed system.*
How it works at runtime
Log Troubleshooting is part of Logging → Log Troubleshooting. Linux log troubleshooting should isolate the first failed limit of the evidence: event generation, timestamping, local collection, filtering/rate limiting, persistence, rotation/retention, forwarding, remote ingestion or query scope. The objective is not merely to find an error string but to establish whether logging itself is complete enough to support the operational conclusion.
Topic-specific state model. Linux log troubleshooting should isolate the first failed limit of the evidence: event generation, timestamping, local collection, filtering/rate limiting, persistence, rotation/retention, forwarding, remote ingestion or query scope. The objective is not merely to find an error string but to establish whether logging itself is complete enough to support the operational conclusion.
Technical metadata. Host/distribution/systemd/rsyslog versions, boot ID, monotonic/realtime timestamp and timezone, NTP/clock state where relevant, producer binary/service/unit/PID/UID, logging transport/API, journal transport/facility/severity/priority, syslog source/destination/transport, file path/device/inode/ownership/permissions, journald storage/rate limits/retention, rsyslog input/ruleset/action/queue, logrotate rule/state/inode handoff, forwarding destination/receiver status, query filters, correlation ID/request ID and original workload result.
Interpretation rule. - No log found ≠ no event occurred.
- Error line found ≠ that line caused the incident.
- Collector service active ≠ intended message path is healthy.
- Remote search empty ≠ local producer/collector failed unless forwarding, ingestion, retention and query scope are confirmed.
Method
Log troubleshooting:
| Problem | Check |
|---|---|
| No logs after reboot | Journal volatile: create /var/log/journal, Storage=persistent |
| Logs missing from file | rsyslog not running/installed, filter rules |
| Disk filling with logs | journalctl --vacuum-size, journald SystemMaxUse=, logrotate |
| Rate-limited messages | journald RateLimitBurst, rsyslog imjournal ratelimit |
| Remote logs not arriving | Firewall, TCP/UDP mismatch, queue, TLS errors |
| Wrong timestamps | Time zone/NTP, RFC 3164 vs 5424 format |
journalctl -u systemd-journald | grep -i suppressed
journalctl --verify
Limits and how it fails
Primary failure point. Troubleshooting is complete only when the first failed logging boundary is evidenced and the original event is observable after a minimal fix; log visibility alone does not show the underlying workload is fixed.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Rotation policy must match daemon reopen behavior.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Logging → Log Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://systemd.io/ · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Log Troubleshooting operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Log Troubleshooting.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux log troubleshooting should isolate the first failed evidence boundary: event generation, timestamping, local collection, filtering/rate limiting, persistence, rotation/retention, forwarding, remote ingestion or query scope. The objective is not merely to find an error string but to establish whether logging itself is complete enough to support the operational conclusion. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + boot ID + clock/timezone + event → identify producer/process → identify logging API/socket/file → verify collector receipt → inspect filtering/rate-limit → prove persistence/inode → verify rotation/retention → verify forwarding/remote receipt if required → query exact time/source → correlate with original workload. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | symptom/time → event actually generated → source timestamp/identity → collector receipt → filter/rate-limit → persistence → rotation/retention → forwarding queue/transport → remote ingestion/index → query scope → workload verification | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Troubleshooting is complete only when the first failed logging boundary is evidenced and the original event is observable after a minimal fix; log visibility alone does not prove the underlying workload is fixed. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux logging evidence can establish this proof path: symptom/time → event actually generated → source timestamp/identity → collector receipt → filter/rate-limit → persistence → rotation/retention → forwarding queue/transport → remote ingestion/index → query scope → workload verification | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured producer, collection, persistence, retention, forwarding, query or workload scope. Troubleshooting is complete only when the first failed logging boundary is evidenced and the original event is observable after a minimal fix; log visibility alone does not prove the underlying workload is fixed. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: reproduce one exact event, align clock/boot/source identity, trace it through collection and storage, then verify retention/forwarding/query scope and independently repeat the original workload. | Continue to the next unresolved boundary while preserving the original test condition. |
Log Troubleshooting · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Log Troubleshooting |
|---|---|
| Topic path | Logging → Log Troubleshooting |
| Runtime state | Linux log troubleshooting should isolate the first failed evidence boundary: event generation, timestamping, local collection, filtering/rate limiting, persistence, rotation/retention, forwarding, remote ingestion or query scope. The objective is not merely to find an error string but to establish whether logging itself is complete enough to support the operational conclusion. |
| Fast checks | - Pin host, boot ID, clock/timezone, service/PID, event trigger and exact query window. - Trace the same event through producer, journald/syslog/file, rotation/retention, forwarding and remote query as applicable. - Check drops/rate limits, permissions, disk/inode pressure, queue backlog and filter/ruleset mismatches at the first failed boundary. - Apply one minimal change, reproduce the exact event and then verify the original service/workload separately. |
| Verification chain | symptom/time → event actually generated → source timestamp/identity → collector receipt → filter/rate-limit → persistence → rotation/retention → forwarding queue/transport → remote ingestion/index → query scope → workload verification Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Troubleshooting is complete only when the first failed logging boundary is evidenced and the original event is observable after a minimal fix; log visibility alone does not prove the underlying workload is fixed. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |