Skip to main content
Home
GrN.dk

Main navigation

  • Articles
  • Cases
  • Services
  • Your Digital Project Manager
  • About Greg Nowak
  • Image Gallery
  • Contact
User account menu
  • Log in

Join my community / free newsletter — sign up here

Breadcrumb

  1. Home

Ubuntu Logs: Troubleshooting with journalctl and dmesg

Illustrated infographic summarizing: Ubuntu Logs Journalctl and Dmesg

By Greg Nowak. Last updated 2026-09-07.

When a website stops responding or a scheduled job fails, Ubuntu’s logs can help you work out what happened. The challenge is finding the relevant messages and connecting them to the business problem: missed orders, delayed work, or an unavailable service.

journalctl and dmesg are useful starting points. This guide gives you a practical sequence for investigating an Ubuntu server and collecting evidence that a developer, hosting provider, or operations team can act on.

Which log should you check first?

journalctl reads the systemd journal, including service and kernel messages collected there. dmesg reads the kernel’s ring buffer, which is useful for investigating hardware, drivers, storage, and memory problems.

What you are investigating Start with What to look for
A service that stopped or failed to start journalctl filtered by service The first failure and messages immediately before it
A disk, driver, or network interface problem dmesg or journalctl -k Device errors, resets, or link changes
A problem before a reboot journalctl with a previous boot selected The sequence leading up to the interruption
A failed page request or application task Service journal, then application logs The matching request, exception, or job identifier
Choose the log that matches the symptom, then narrow the time window.

Application details may be written to separate files or a container logging system. An empty journal search does not establish that the application is healthy.

Start with the time the problem happened

Before opening a terminal, note the affected system, the symptom, the approximate start time, and any recent deployment or configuration change. “Checkout failed at 09:15 UTC” gives everyone a better starting point than “the server was slow this morning.”

These commands retain the original article’s useful time filters. Use an account authorised to administer the server; sudo provides access to system logs that your normal account may not see.

sudo journalctl --since "1 day ago"
sudo journalctl --since "10 hours ago"

“1 day ago” means a rolling 24-hour window. “Yesterday” starts at midnight yesterday. For a repeatable investigation, use explicit dates and a timezone, following the systemd time syntax:

sudo journalctl --since "2026-09-07 09:00:00 UTC" --until "2026-09-07 09:30:00 UTC" --utc --no-pager

Replace those example times with your incident window. Include a few minutes before the first reported failure: the visible symptom may follow the underlying problem.

Find errors, then read the surrounding context

sudo journalctl --since "12 hours ago" -p 3 -x --utc --no-pager

-p 3 selects errors and more severe messages. -x adds explanations where available; --utc displays UTC timestamps; --no-pager prints directly to the terminal. The journalctl manual recommends omitting -x from bug-report attachments.

Treat this as a first pass. Once you find a relevant error, repeat the search over a smaller window without the priority filter. Warnings and ordinary messages may explain what led to the failure. A severe message elsewhere on the machine may be unrelated.

Focus on the affected service

For a service-specific investigation, replace nginx.service below with the actual systemd unit name:

sudo journalctl -u nginx.service --since "1 hour ago"
sudo journalctl -u nginx.service -n 50 -f

The second command shows the latest 50 entries, then follows new messages. Press Ctrl+C to stop.

Use this while reproducing a safe test request or checking an agreed fix. Note the test time, change one thing at a time, and confirm that the affected business function works again. A successful service start alone does not prove that a customer can complete their task.

Use dmesg for kernel clues

sudo dmesg | less
sudo dmesg -H --time-format iso

Both commands let you browse kernel messages. The second keeps the original readable timestamp approach, but removes the extra pipe: -H already enables a pager. Press q to exit.

Look for messages near the failure involving storage I/O, device resets, or processes killed because memory ran out. These are clues to investigate, not a diagnosis by themselves.

The Ubuntu dmesg manual notes that ISO timestamps can be inaccurate after suspend and resume. Access may also be restricted; a permission error does not mean the buffer is empty.

Check what survived a reboot

sudo journalctl --list-boots
sudo journalctl -b -1
sudo journalctl -k -b -1

These list retained boots, show the previous boot, and narrow that boot to kernel messages. They require the relevant journal data to still exist.

If it is missing, review retention and storage configuration. Storage=volatile keeps journal data in memory; Storage=persistent prefers disk storage. With Storage=auto, the presence of /var/log/journal determines the behaviour. Check the installed configuration rather than assuming a default across Ubuntu releases. The journald configuration manual explains these settings and storage limits.

Give the next person a useful handover

Share the affected service, incident times and timezone, relevant log excerpt, recent changes, and what you tested. Remove credentials and customer information before sharing. Keep enough surrounding lines to preserve the sequence.

If recurring Ubuntu problems are interrupting delivery, I can help turn the investigation into a clear plan with your developers or hosting provider. Contact Greg with the symptoms, your setup, and where your team is getting stuck.

Related on GrN.dk

  • Drupal 7 HTTPRL Network Errors: A Practical Fix and Triage Guide
  • NGINX 1.30 changed upstream connection reuse: what to check before you upgrade
  • When Google can call the business, your local data stops being cosmetic

Need help with this kind of work?

Discuss your Ubuntu server issue with Greg Get in touch with Greg.

Sources

  • systemd journalctl manual
  • Ubuntu 26.04 LTS dmesg manual
  • systemd time syntax manual
  • systemd journald configuration manual
Last modified
2026-09-07

Tags

  • Ubuntu
  • Linux
  • Server Troubleshooting
  • journalctl
  • dmesg

Review Greg on Google

Greg Nowak Google Reviews

 

Written recommendations from Trafik og Veje, Aarhus Municipality (2011) and AgroTech (2010) — read them on LinkedIn.

Illustrated infographic summarizing: From Supplier PDFs to Product Data: Where AI Needs a Second Check
From Supplier PDFs to Product Data: Where AI Needs a Second Check
2026-09-07

Supplier files need more than extraction. Here’s how to check coverage, match SKUs, resolve unclear units and prices, and test product data before a catalogue import.

Illustrated infographic summarizing: Shorter TLS Certificates: Will Your Renewal Setup Keep Up?
Shorter TLS Certificates: Will Your Renewal Setup Keep Up?
2026-09-06

Shorter TLS certificates leave less room for renewal problems. Check domain validation, scheduling, deployment and the certificate your customers actually receive.

Illustrated infographic summarizing: Your AI Image Has Content Credentials. Will Your Website Keep Them?
Your AI Image Has Content Credentials. Will Your Website Keep Them?
2026-09-05

AI image credentials can disappear during routine website processing. Learn how to test your CMS, optimizer, CDN, and publishing workflow end to end.

Illustrated infographic summarizing: What Are Customers Asking? Let AI Find the Patterns in Support Tickets
What Are Customers Asking? Let AI Find the Patterns in Support Tickets
2026-09-04

AI-based ticket analysis can uncover recurring complaints, product defects and gaps in documentation—without the company needing yet another chatbot.

Illustrated infographic summarizing: OpenAI Has Machine Identity Now. Which Jobs Should Lose API Keys?
OpenAI Has Machine Identity Now. Which Jobs Should Lose API Keys?
2026-09-03

OpenAI’s X.509 workload identity can replace API keys for the right workloads. This practical framework helps teams decide where to start safely.

Illustrated infographic summarizing: WordPress 7.1 Exposes AI-Ready Actions. Who Gets to Run Them?
WordPress 7.1 Exposes AI-Ready Actions. Who Gets to Run Them?
2026-09-02

WordPress 7.1 helps AI agents discover and invoke site abilities. Here is how to keep exposure, authentication and permission firmly separate.

Illustrated infographic summarizing: From Sales Meeting to CRM: Automate Follow-Up Without Compromising Data Quality
From Sales Meeting to CRM: Automate Follow-Up Without Compromising Data Quality
2026-09-01

How to use AI for meeting notes and follow-up while fixed rules protect CRM data, customer matching and the sales pipeline from errors and premature changes.

Illustrated infographic summarizing: Your AI Gateway Can Name the User. Decide What That Log Is For
Your AI Gateway Can Name the User. Decide What That Log Is For
2026-08-31

Identity-aware AI Gateway logs can sharpen security and cost control, but only when attribution, access, retention, guardrails, and response are clearly defined.

Illustrated infographic summarizing: Zero Data Retention Is a Workflow Audit, Not a Checkbox
Zero Data Retention Is a Workflow Audit, Not a Checkbox
2026-08-30

Zero Data Retention covers the provider, not every copy in your stack. See how to audit endpoints, logs, storage, deletion and project-level controls.

Illustrated infographic summarizing: MCP 2026-07-28 Is an Auth Migration, Not a Version Bump
MCP 2026-07-28 Is an Auth Migration, Not a Version Bump
2026-08-29

MCP’s July 2026 release removes protocol sessions and tightens OAuth. Here’s a practical plan for migrating clients, servers and enterprise access safely.

More articles

Built by AI — available for your business. The daily articles on this site are researched, written and illustrated by an autonomous AI pipeline. At nowa.dk I install the same kind of AI automation in businesses at fixed prices — site in Danish, English version here, and web/marketing agencies have a dedicated page.

RSS feed

Footer

  • All articles
  • Contact

GrN.dk — AI automation, web platforms, web optimization, data handling and logistics.

© 2026 GrN.dk · LinkedIn · Contact · AI automation in Danish: nowa.dk

Behind GrN.dk: Individual Entrepreneur Codecrafter · Tax ID 305669096 · Bakhtrioni St. 22, 0194 Tbilisi, Georgia · official business register