Questions tagged [systemd-journald]

For questions pertaining to systemd-journald, a system service that collects and stores logging data. Use this tag for questions about systemd-journald itself, using systemd-journald, or questions about issues arising from collecting and storing logging data in systems where this task is performed by systemd-journald.

Filter by
Sorted by
Tagged with
1
vote
0answers
22 views

Replacing rsyslog with journald for a more modern approach of logging

I'm looking for a more modern way of keeping logs my Linux servers. Rsyslog still strongly relies on logrotate to keep logs maintainable and space occupation by logs to a minimum, which is not a ...
1
vote
0answers
22 views

systemd service stops logging to systemd-journal after executing dbus as non-root user

Sorry for the confusing title, My current situation is following: I have a normal systemd service running (as root user&privileges). However, the service should alter my regular user's certain ...
0
votes
0answers
14 views

Systemd Journal fails to open /run/log/journal file

I was playing with BPF tools today and ran the command sudo opensnoop-bpfcc -x -U and noticed many traces like this: 0 403 systemd-journal -1 2 /run/log/journal/...
0
votes
1answer
21 views

systemd & python logging

I wrote a simple python3 skript and want to make a service from it. Here are the two files #!/bin/python3 while True: print('True') Systemd Service: [Unit] Description=True Service [Service] ...
0
votes
0answers
21 views

systemd-journald configuration from /etc/systemd/journald.conf is not taken into account

System : Ubuntu 18.04 So before any changes, the file /etc/systemd/journald.conf only contained commented lines. Before this I checked the value for the property Storage for systemd-journald with this:...
0
votes
1answer
16 views

Where to find / How to install missing imjournal shared object file (/usr/lib/rsyslog/imjournal.so) for rsyslog

I am playing around with logging using rsyslog and journald and I wanted to see how effective the imjournal module was. So I added $ModLoad imjournal to my /etc/rsyslog.conf and restarted rsyslog. ...
0
votes
0answers
11 views

Where does OpenSUSE stored journald logs?

I noticed there is no /var/log/journal in OpenSUSE Leap 15.1. Where does it store the journal logs?
5
votes
2answers
60 views

systemd-journald persistent logs do not work with bind mount /var/log

I am using Yocto to produce a custom image for a small embedded Linux system with SystemD Version 241. The root file system is Read-Only. I am using bind mounts and overlayfs to make the /var/log/...
0
votes
0answers
18 views

Error message: [backend/drm/atomic.c:38] Atomic test failed: Permission denied

When I check my journald -u /usr/bin/sway I see this message, [backend/drm/atomic.c:38] Atomic test failed: Permission denied What is that in reference to and how can I fix it?
1
vote
0answers
30 views

Ubuntu `systemctl service` stops after some time

Ubuntu systemctl service does not work after some records. After 10000 records service status is running but data cannot sync. After service restart it's working but again after 10000 records it's ...
1
vote
1answer
16 views

What does the field MESSAGE_ID in systemd's journals signify?

When digging into logging from shell scripts and applications I found that the logger utility gives the option to log directly to systemd's journals. The man page advocates in these cases to fill in ...
1
vote
1answer
21 views

How can I rotate old systemd journals to a different filesystem?

I want to limit the size of systemd journals (in /var/log/journal) by moving old journals to a different filesystem. I know of the setting SystemMaxUse in /etc/systemd/journald.conf which makes it ...
2
votes
0answers
18 views

What to do when “journalctl --verify” outputs “unused data”?

In journalctl --verify some apparently mysterious (as I found no trace of any rationale explanation about this phenomenon on the Internet using Google) output shows up: # journalctl --verify 2>&...
2
votes
0answers
64 views

Rsyslog and Journald - Log processing in Linux

I do not really understand the forwarding from Journald to Rsyslog. Basically I understood it in the way that the 'pipeline' is built up as follows: Kernel logs through printk() → /proc/kmesg ← ...
0
votes
0answers
15 views

Capture log output for a systemd service running in a screen session

I'm running a Minecraft server as a systemd service. The service's ExecStart is the path to a script whose contents are: screen -L -DmS minecraft java -Xmx4096M -Xms1024M -jar server.jar nogui That ...
2
votes
2answers
2k views

How can find out where a system message originates (“testing the buffer” in dmesg / journalctl / messages)?

In the past few days I have had a message in the system log/journal over a thousand times within a second. How can I find out where it originated? # journalctl --system | grep "testing the buffer" | ...
0
votes
1answer
32 views

what do I do if linux doesn't create the var / log / journal directory despite rebooting with systemctl?

I need help, the journal service was not configured correctly with systemctl restart systemd-journald.service, since I want to protect journal files with storage = persistent,but linux does not create ...
1
vote
1answer
51 views

Compression not working for journald log files

So basically BTRFS transparent compression (zstd:0) isn't working for the log files under /var/log/journal. I don't understand this issue because manually compressing the files (zstd file) gives a ...
0
votes
1answer
51 views

Create trigger on system journal

There is a script (found here), intended to monitor a log file: if keyword triggers then execute a command: journalctl -f | \ while read line ; do echo "$line" | grep "apcu" if [ $? = 0 ] ...
-3
votes
1answer
63 views

mkdir permissions needed for script called by systemctl start service

How can I give mkdir permissions to a script that is called by sudo systemctl start <service-name> ?? Here is the error being thrown in the results of sudo journalctl -u jekyll -f when I type ...
0
votes
1answer
642 views

4000x “wpa_supplicant[1885]: random: Cannot read from /dev/random: Resource temporarily unavailable” log message when booting

I recently added Linux Mint (19.3) as my new main OS on my Sony Vaio notebook. Sometimes booting takes a bit of time and I found in jounrnalctl: Feb 11 10:45:11 notebook kernel: microcode: microcode ...
0
votes
0answers
80 views

Can't get kernel messages logged to the serial console of a systemd system

I would like to log the kernel messages of system to the serial console on ttyS0. A similar problem was addressed under How to get kernel messages on serial console on a systemd system? but I still ...
0
votes
1answer
42 views

How do you enforce log expiration with journald?

Suppose I only wanted to keep logs for the last 10 days. Would I have to run journalctl --vacuum-time=10d on a timer every day? Do I need to also use --rotate? What does "rotate journal files" mean?...
1
vote
0answers
21 views

Consecutive same lines are squashed into one in journal

I am running as below: % systemd-run --user python3 -c "print(1);print(1)" Running as unit: run-r9210c54561b84cdbaf4e741f5d2f3e57.service I was expecting to see two 1s in each line. But I am seeing ...
0
votes
0answers
43 views

journalctl - How to clear until last boot?

I'm aware of journalctl's vacuum-time, vacuum-size and vacuum-files. Is there a way to do vacuum-boot or something similar? Yes, this can be accomplished by specifying a specific time, however, pin ...
1
vote
1answer
60 views

Systemd reboots my PC instead of shutting it down

I just fresh installed Arch Linux and whenever I try to shutdown my PC, it just reboots. I've seen many similar issues (here) but none of their solutions worked. Also, I have a feeling that the issue ...
3
votes
0answers
38 views

How is a log inside bash or python script appended to a specific journald unit name?

How do logs and prints inside scripts (bash, python etc) get associated to a unit name? Suppose I have a very simple unit file test-service.service [Unit] Description=Test Unit [Service] Type=...
1
vote
0answers
47 views

How does systemd units or services Stdout and Stderr are read by the journald service

How reading of streams (More specifically piping of Stdout, Stderr, Stdin streams) done for Systemd services in journald? Can I redirect the Stream of one service to another service ? How do I ...
0
votes
0answers
65 views

How to receive journal entries from systemd services running inside a podman container?

As showcased here and here, with podman one can run systemd services inside containers. Is there a convenient way to view (and store) the embedded services' logs in the host's journal?
1
vote
2answers
71 views

Forward journald Logs on CentOS7 to SIEM-Server

Is it possible to directly forward logs from journald to a Remote-Log-Server? I only see the option ForwardToSyslog in the /etc/systemd/journald.conf config file. Or do I have to forward it to ...
0
votes
0answers
78 views

How to change the location of systemd-journald log files?

Background: An embedded Linux device has a very small main disk size (less then 2GB), and a larger external flash memory (SATA disk of size 64GB). Issue: Some of the applications run by systemd (...
0
votes
0answers
60 views

Clear journctl for specific service / unit

I altered my service and no longer want to see old logs: journalctl -u my.service. How can I clean log for specific service only? Is it possible to limit any following to given service only: ...
0
votes
0answers
24 views

Disconnect desktop apps output from going to journald/syslog

At our university/department we run a bunch of Debian 10 labs. When people start applications from their desktop environment, some output goes to systemd journal + syslog (+ remote syslog collection) -...
0
votes
0answers
16 views

USB log / copie operations log

I want to know if there is any way to know each device has been plugged into my Linux box weeks ago// or a way to see If some of my files have been copied from my Linux box to a USB weeks ago.
3
votes
1answer
41 views

How is MESSAGE_ID set in journalctl?

I notice some programs have a MESSAGE_ID associated with a particular log line, but others don't. For example, NetworkManager doesn't have MESSAGE_ID on my machine. journalctl -o json --identifier ...
0
votes
1answer
283 views

Redirecting logs to a file using systemd is not working

I am trying to redirect logs to a file using systemd. I have tried adding below statements to the service. StandardOutput=file:/tmp/test1.txt StandardError=file:/tmp/test2.txt But those files are ...
1
vote
1answer
45 views

logging with util-linux without systemd unit specified

If I log with util-linux logger as below: /bin/logger "hello world" I can see through journalctl my log line: journalctl --since "-1m" Oct 08 09:12:17 myhomepc duda[11670]: hello world however ...
0
votes
1answer
644 views

How do i get python to tail a logfile? Tried various methods

I'm trying to get python to tail a logfile e.g. syslog. I've tried opening the file in read mode, but it never realises if another process writes to the file. Using a popen, and actual 'tail -f' ...
0
votes
0answers
83 views

Why are there no journalctl entries for services like httpd and exim?

I'm trying to understand which services are and aren't logged by systemd-journald. When I run journalctl -u dovecot or journalctl -u pure-ftp I'm getting lots of log entries, and they look similar to ...
1
vote
1answer
37 views

How to see logs between right before midnight to right after?

I am trying to see what was logged on my system between "right before midnight" (so the last moments of yesterday), to right afterwards. ~ # journalctl --since "2019-09-09 23:59" --until "2019-09-10 ...
0
votes
1answer
46 views

Can't see previous boot journal log

I found that CentOS/Redhat will not store systemd-journal log to disk, Ubuntu will. For CentOS/Redhat, each time I reboot, the journal log were removed ( it seems write to tmpfs only ) Why CentOS/...
1
vote
0answers
32 views

systemd: repeated vacuum cleaning looks like dry run

I'm trying to remove all log records for particular unit but there always seems to be 8M of log. Why? root@lian:midenok# jctl -u networking --rotate --vacuum-time=1s Vacuuming done, freed 0B of ...
2
votes
0answers
337 views

Auditd, Syslog and Journald

I have been investigating about these three logging solutions auditd, syslog, and journald, but still there are thing that unclear to me. According to the things I read, auditd audits events in the ...
9
votes
1answer
214 views

How to get the current systemd-journald running configuration?

I'd like to get the current configuration of journald, similarly to question How to view systemd's runtime global config? How can I do this? Specifically, I have set some of the available ...
1
vote
0answers
33 views

Emergency mode using some kernels in CentOS

I did some mistake of fiddling with an old VirtualBox installation, trying to build kernel modules. I got rid of dkms. Still, I have the strange problem that the two latest kernel I have results in ...
1
vote
0answers
61 views

What causes log output to the active console?

I'm running Manjaro ARM 64bit on a Raspberry Pi (more specific question there), but this question is more general: Which settings might cause log output to be always displayed on the active console? I ...
0
votes
1answer
96 views

Restart systemd service if no log produced in timeout

Is it possible to monitor systemd service (unit), if it produces logs, and if no log is produced in (lets say 5 minutes), restart the service?
1
vote
0answers
164 views

Systemd playing sound (service Linux)

I have this service, running on Xubuntu. [Unit] Description= Controller After=graphical.target [Service] ExecStart=/usr/bin/controller StandardInput=tty-force StandardOutput=journal Restart=always ...
0
votes
0answers
197 views

How to mount a partition's subdirectory for /var/log/journal?

Our server (Ubuntu 18) has a large partition mounted as /publish/data (its a VM, provided as IaaS so that is how it is mounted when extra disk space is requested), it is defined in fstab as follows: /...
2
votes
1answer
959 views

Journald Storage=persistent - Just disk or RAM & disk

I am trying to understand what journald does in relation to persistent storage of log entries. I have an SDCard setup so I am looking to keep disk writes to a minimum, but would like some persistence ...