Questions tagged [systemd-journald]

For the logging service on systemd systems and the journalctl command used to view journald logs

systemd-journald is the journalling service in systems with systemd as init. From the manpage:

systemd-journald is a system service that collects and stores logging
data. It creates and maintains structured, indexed journals based on
logging information that is received from a variety of sources:

· Kernel log messages, via kmsg · Simple system log messages, via the libc syslog(3) call · Structured system log messages via the native Journal API, see sd_journal_print(4) · Standard output and standard error of system services · Audit records, via the audit subsystem

The daemon will implicitly collect numerous metadata fields for each log messages in a secure and unfakeable way.

journald logs are typically accessed by the journalctl command, which has a powerful set of options for filtering log entries of interest. By default journalctl without any options will show the whole log.

  • journalctl /usr/bin/sshd - logs from the /usr/bin/sshd command
  • journalctl -u sshd - logs from the sshd service (or unit)
  • journalctl -b1 - logs from during the previous boot
  • journalctl _PID=123 - logs from processes with PID 123
  • journalctl -p3 - filters output messages from log level alert, critical and error
  • and many other options.
91 questions
341
votes
5 answers

Big /var/log/journal?

I don't understand why the /var/log/journal/ folder is so big. For example, by executing the command systemctl -f, i see the fill. If I click on an email on Thunderbird, it generates dozens of lines that I consider useless. Currently, I have more…
Bristow
  • 3,460
107
votes
4 answers

Where is "journalctl" data stored?

When I issue journalctl I get a massive log of all system services, but where is all this information stored?
php_nub_qq
  • 1,559
  • 4
  • 11
  • 23
107
votes
2 answers

Systemd logs (`journalctl`) are too large and slow

My journalctl is keeping over 300 MB of logs as revealed by journalctl --disk-usage. Everything appears to be in order when I run journalctl --verify: $ journalctl --disk-usage Archived and active journals take up 328.0M on disk. $ journalctl…
42
votes
5 answers

How to find previous boot log after Ubuntu 16.04+ restarts?

My question is, how can I find boot log from previous system boot attempt? Today when first powering on my PC, boot process stopped on Ubuntu logo, when I pressed Esc I have seen several lines containing some kernel error and restart required at the…
Mike
  • 5,931
31
votes
8 answers

Ubuntu 18.04 systemd-udevd uses high CPU, conflict with wifi

I recently switched from Kubuntu 17.10 to Kubuntu 18.04 (fresh installed). The problem is the process systemd-udevd is constantly running and consuming 90-100% CPU load. After tinkering around with all devices I found out that it is because of WiFi!…
Firouziam
  • 817
  • 2
  • 9
  • 22
30
votes
2 answers

systemd-journald crashed with SIGABRT in pthread_sigmask()

Fresh install of Ubuntu 18.04 on a new Lenovo x1c6, I'm getting this error sometimes after resuming from suspend. I have no idea what it means, and search online leads to a bug report that doesn't exist Might be related: my battery life is 4-5…
goldylucks
  • 632
  • 2
  • 12
  • 24
28
votes
2 answers

Relationship of rsyslog and journald on Ubuntu 16.04

I am running what is a vanilla Ubuntu 16.04 server, and I'm trying to wrap my head around how logging is set up by default. I can see that both journald and rsyslog are installed and running, but it's not at all clear to me how log messages are…
motns
  • 383
20
votes
3 answers

Filter any system log file by date or date range

What I want to achieve: I'd like to filter a system log file by date, i.e. when I do: $ cat /var/log/syslog | grep -i "error\|warn\|kernel" it prints lines like these for the three last days let say: (...) Apr 3 06:17:38 computer_name kernel:…
s.k
  • 1,490
17
votes
3 answers

systemd-journald high CPU usage

A few days ago, I installed Ubuntu 17.04 on my Asus laptop dual-boot with Windows 10 and shortly thereafter, I noticed that the systemd-journald process was constantly using 25-35% of CPU. I traced the process and saved part of the output is at…
S_n
  • 171
  • 1
  • 1
  • 5
15
votes
3 answers

After viewing logs with journalctl, how do I exit the screen that says "lines 1-2/2 (END)"?

When you use the command journalctl -p err -b for example, you get an answer that ends with "END". What command do I use to end this and get the opportunity to enter the next command without having to close the window and open a new one? erik@server…
Skalman65
  • 221
14
votes
1 answer

Why does `journalctl --list-boots` only show the current boot?

My kernel update crashed this morning and I had to boot to an older kernel. I wanted to see the journal log for the crashed boot so used: journalctl --list-boots 0 336aa03f15d3443d95e079ad17b6dc77 Fri 2018-02-02 05:49:03 MST—Fri 2018-02-02 17:57:50…
11
votes
2 answers

Where do log messages go with journald and rsyslog

On Ubuntu 18.04 both journald and rsyslog are installed. Both serve the same purpose of collecting log messages and storing them. So we have two programs doing the same work here. What I could find out is that journald only saves log messages in its…
ygoe
  • 1,058
11
votes
1 answer

How to view systemd / journald log for the isc dhcp service?

I wish to view the log file entries only for ISC DHCPd server service. How do I do this with the journalctl tool? I tried googling around for the answer, which didn't produce anything. I tried journalctl -u dhcpd which didn't give me anything.
David
  • 3,391
11
votes
2 answers

failed to send WATCHDOG=1

I have just installed Ubuntu (v 17.10) for the first time and was suggested to reboot the system. portable Acer Inspire R3-131 Ubuntu cannot reboot: [ 9934.778997] systemd-journald[955]: failed to send WATCHDOG=1 notification message: Transport…
AlDeMaise
  • 121
10
votes
3 answers

How do I find out a list of journalctl log size by unit?

One of the services on my system is spamming the log and generating a lot of data. I don't know which service it is. With regular log files, I can use ls -lha to print the size of all the files in the /var/log directory, which will point me to the…
npr_se
  • 101
1
2 3 4 5 6 7