Questions tagged [systemd-journald]

journald is part of systemd and responsible for collecting system logs

Filter by
Sorted by
Tagged with
6
votes
1answer
8k views

Output of a python script running as unit is out of order while shells seems unnafected

How would I get all outputs of systemd managed python2 script instantly into journal, just like it appears in terminal I'm on centos 7, but seems to be same on arch according to systemd manual, ...
197
votes
9answers
217k views

How to clear journalctl

I couldn't find in google any safe way to clear systemd journal. Do anyone know any safe and reliable way to do so? Let's say I was experimenting with something and my logs got cluttered with various ...
77
votes
2answers
107k views

How do I display log messages from previous boots under CentOS 7?

Executing journalctl under a CentOS 7 system just prints messages generated after the last boot. The command # journalctl --boot=-1 prints Failed to look up boot -1: Cannot assign requested ...
13
votes
1answer
3k views

How to avoid /usr/bin/env being marked in systemd logs as the executable

I've created a systemd service to run a tomcat application based on the information found in this article. The short version of the article recommends avoiding the shell script wrappers, and executing ...
4
votes
1answer
769 views

journalctl shows very old boots which are not recycled

The system has very old boots (2 and 3 years old), which are not recycled and I haven't been able to vacuum them: $ journalctl --list-boots --no-pager -16 53baf678f0d749d6b390afea4a3ef96b Wed 2014-04-...
1
vote
1answer
2k views

Why `journalctl --list-boots` doesn't match what `uptime` and `who -b` report?

Here's a test script I used: last_reboot=$(last reboot | grep 'still running' | awk '{for (i=5; i<=NF; i++) printf $i FS}' | awk '{for (i=1; i<=NF - 2; i++) printf $i FS}') if [ "$last_reboot" ]...
20
votes
1answer
8k views

Is systemd-journald a syslog implementation?

I wonder if systemd-journald is a new implementation of syslog protocol, or rather, it uses syslog implementations, such as rsyslog, syslog-ng I've googled a bit, but I didn't find nothing convincing ...
16
votes
2answers
12k views

How do I clear journalctl entries for a specific unit only?

I spent a few days writing a python script, and creating a systemd unit file for it. During testing, the script logged a lot of errors to journald. I would like to clear those errors from journald now ...
9
votes
2answers
4k views

How to determine exactly why Systemd enters emergency mode

My desktop computer running Debian Jessie started dropping into an emergency mode shell on every boot up. The screen says to use journalctl -xb to find the reason, and to use systemctl default to ...
8
votes
1answer
4k views

Why is my systemd journal not persistent across reboots?

I'm experiencing a very weird issue with a fresh Fedora 21 image on a Linode instance. I cannot reproduce it outside of Linode. The issue is that my systemd journal is not persistent across reboots. ...
8
votes
2answers
1k views

Debugging lock-up - systemd loses my logs

Ever since I have "upgraded" to systemd on Arch Linux, I keep losing logs when an unexpected lockup happens. I hit the same log-losing issue one month ago and just hit the issue again. There are also ...
3
votes
1answer
634 views

Forward logs from file to journald

I have an application that writes logs to some file e.g. /var/log/mylog.txt However, I want it to be written to journald (so that it can be accessed via journalctl). I can't change way of launching ...
3
votes
1answer
577 views

What does “org.gnome.Shell.desktop[1711]: ” mean in the systemd journal?

$ journalctl -b ... Mar 23 18:18:50 alan-laptop pkexec[31408]: pam_unix(polkit-1:session): session opened for user root by (uid=1001) Mar 23 18:19:47 alan-laptop org.gnome.Shell.desktop[1711]: ...
1
vote
1answer
196 views

Getting systemd service logs faster from my service

I'm having a systemd service defined as follows, that works fine: [Unit] Description=my service After=network.target [Service] User=myuser Group=mygroup WorkingDirectory=/home/myuser/myapp ...
43
votes
2answers
31k views

How to tell journald to re-read its configuration?

My question is simple: how do I tell journald to re-read its configuration file without rebooting? I've made some changes to /etc/systemd/journald.conf and I'd like to see if they are correct and ...
25
votes
5answers
12k views

Receiving Syslog messages with a systemd Arch Linux

I'm feeling like I've overlooked the obvious, but I can't figure out how to get my Arch Linux server, which uses systemd, to receive and log syslog messages from a remote system. I have a Cisco 678 ...
4
votes
1answer
2k views

Reloading systemd-journald config

Not sure why this is happening. I have a test service logging some arbitrary text to stdout every 10 seconds. Here is my service file /etc/systemd/system/samplego.service: [Unit] Description=Sample ...
22
votes
1answer
22k views

Howto inspect systemd system.journal from another system

I have arch linux failing on a device. The device doesn't have any screen, it doesn't respond to network. So I take its SD card, insert it in ubuntu desktop, see a fresh system.journal there and... ...
9
votes
2answers
9k views

How do I restore `/dev/log` in systemd+rsyslog host?

On RHEL7, systemd-journald takes over many of the responsibilites of what was once done by rsyslogd. Whether by bug or conflict between these two daemons, sometimes /dev/log will go missing. As a ...
9
votes
3answers
22k views

How do I see when a systemd service was started/stopped/restarted?

I have a service (written by myself) running on a Debian (Jessie) server, and the service's own logs happen to indicate that it restarted at a particular time. There is no indication of a segfault or ...
10
votes
1answer
13k views

How to direct the journal output of certain units to a particular file?

I've got a system with several daemons running (as systemd units) that output log information to the journal in Arch Linux. I want to direct the journal output of some of those unit files into a ...
3
votes
0answers
377 views

systemd-journald: Missed 685 kernel messages

At boot and some other times I see missed kernel logs on my system. After that I set Rate limits at jornald.conf but no luck. I still have the issue. Do you have any advice? Kernel: 4.14.19-1-lts ...
5
votes
1answer
4k views

systemd-journal: what is the relation of dev-log and syslog?

I am trying to figure out the relation of the two, /run/systemd/journal/dev-log /run/systemd/journal/syslog which I could not find enough clear documentation. In certain sense, are they basically ...
4
votes
3answers
3k views

Redirecting stderr and stdout separately to a function in a bash script

I'm working on a wrapper script to log cronjob output to journald. I have several goals: must log stderr and stdout to journald with different priority levels and prefix-tags must also output stderr ...
3
votes
1answer
346 views

Can we specify percentage value for RuntimeMaxUse attribute in journald.conf

From man page of Journald.conf I came to know that, by default Journal use 10% of file system size for storing journal files. I have configured below values in journald.conf. RuntimeMaxUse=10 #...
0
votes
0answers
465 views

systemd-journald missing crash logs

I am running Arch-ARM on RPi3. I have noticed when system crashes I cannot find any related crash log in journal logs. Arch Linux ARM on RPi3: Linux 4.4.37-1-ARCH #1 SMP armv7l GNU/Linux Systemd: ...