Questions tagged [systemd-journald]

journald is part of systemd and responsible for collecting system logs

Filter by
Sorted by
Tagged with
0
votes
1answer
120 views

Specify a systemd unit for cronjob

When I run a cronjob, it's nice being able to follow its logs. If I want to see all logs from cron with journalctl, I can select the cron unit (journalctl -u cron). But when I have multiple cronjobs, ...
3
votes
1answer
536 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]: ...
4
votes
2answers
260 views

systemd DynamicUser= services v.s. journald splits

systemd-journald has the default config SplitMode=uid, to create individual journal (log) files for each user, which they are allowed to read. When running services with DynamicUser=, does this mean ...
0
votes
1answer
3k views

Safe to clear files in /run/log/journal CentOS 7.4

There a log entries on my CentOS 7.4 server in /run/log/journal/ that are up to 1.3GB. IS it safe to clear the older files out? [root@fbds journal]# pwd /run/log/journal [root@fbds journal]# ll ...
3
votes
0answers
365 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 ...
1
vote
1answer
579 views

How to configure journald to discard entries older than a certain time span

From the documentation I know that I can configure the time after which journal files are deleted via MaxRetentionSec. the time after which journal files are rotated via MaxFileSec. However my goal ...
1
vote
0answers
1k views

tmpfs /run full

I have a problem with /run partition, its size NEVER decrease so when it's full, I have to reboot. [root@centos]# df -H Filesystem Size Used Avail Use% Mounted on ... tmpfs 6.4G 6.3G ...
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 ...
1
vote
2answers
1k views

How to make journald increase logs storage capacity?

I would like to have persistent logs via journald. I created /var/log/journal and reloaded the service. Now logs are saved on the disk. But the log size limit is low. I added /etc/systemd/journald....
3
votes
1answer
1k views

Why journalctl does not display log message if I use filtering by unit?

I'm using Ubuntu 16.04 and I am seeing some strange behavior when analyzing journalctl logs. Here's unfiltered output (I used json output to hopefully include all relevant fields): $ journalctl -o ...
1
vote
1answer
1k views

Prevent syslogs from being logged under journalctl

I have a simple Python snippet managed by a systemd service which logs to the rsysogd daemon where I've defined a configuration file to put it to a syslog server with a format I've defined. This is ...
0
votes
0answers
447 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: ...
3
votes
3answers
4k views

Can I mask the systemd-journal-flush service and run journalctl --flush later manually?

On my archlinux installation, I realised that flushing the journal logs to disk by the systemd-journal-flush service significantly prolongs the boot process and masking the service improves boot time. ...
1
vote
0answers
490 views

What causes `Unsupported device type 772 for “lo”`?

Rebooted a RPi, and upon return, I could not access the device's static IP. The cause was Unsupported device type 772 for "lo". michael@pi3:~ $ sudo journalctl -u networking [sudo] password for ...
1
vote
1answer
499 views

How to install systemd-journal-gatewayd

How do I install systemd-journal-gatewayd on a raspberry pi? https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html stretch michael@stetch:~ $ sudo apt-get install ...
4
votes
1answer
487 views

journald for systemd user services

I'm running a lot of stuff using systemd's user-level service management. So far it's been great being able to take advantage of timers, conditional services, etc. but one thing that is sorely lacking ...
1
vote
1answer
1k 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" ]...
2
votes
1answer
2k views

Distinguishing levels in journalctl

Can I somehow make journalctl print log levels next to actual messages? I have found the -p option but that is not what I'm looking for, I want to see both errors and warnings but I want to be able ...
2
votes
0answers
151 views

Why journalctl outputs in ASCII?

I have a regular Ubuntu 16.04 server VM. My locale is set up to utf-8 everywhere: $ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="...
1
vote
1answer
1k views

Use systemd watchdog support to restart application

I have a simple systemd service unit to restart my python script on unconditional exits so defined Restart=always in the service definition. I just want to absolutely make sure even if the script ...
0
votes
1answer
1k views

How to get logs from Docker with journald driver?

OpenSuse Tumbleweed + Docker 17.04. I created /etc/docker/daemon.json with: { "log-driver": "journald", "log-opts": { "labels": "my_test", "env": "os,customer" } } ...
0
votes
0answers
947 views

How to read from the systemd-journald.socket?

To my understanding systemd-journald creates a couple sockets, where it posts its logging events. # systemctl cat systemd-journald.socket | egrep -v '^ *#' [Unit] Description=Journal Socket ...
1
vote
1answer
400 views

How to journal command after sudo?

How to configure Linux to journal all command entered by a user after they use sudo su - or sudo su - username ?
2
votes
0answers
197 views

flink systemctl faild to start

Hi i want to create systemctl service to tun flink local server . I can run it directly from the /bin/start-local.sh But when im using this service definition . [Unit] Description=Apache Flink ...
1
vote
2answers
4k views

“systemd-journald: Received SIGTERM from PID 1 (systemd)” will cause linux restart?

I find a machine reboot , and find the last log message is : systemd-journald: Received SIGTERM from PID 1 (systemd). Anybody see this problem ? Will this make machine reboot? OS version: rhel7.2 ...
0
votes
1answer
166 views

Default Interactive TTY prints daemon output

I work for a company that deploys clustered products using coreos and docker, and as part of our deployment, we automatically start up a few docker containers to expose, among others, a web interface ...
3
votes
1answer
779 views

The simple but correct way to have a bash script send output to systemd journal?

I have simply been sticking something like this at the top of my bash scripts. This still works with systemd. (I have used it for a long time and I don't fully understand it. It just works, so I use ...
0
votes
1answer
471 views

Prevent Journald writing to /var/log

Is it possible to configure journald not to write entries to /var/log/messages on Centos? I tried by setting ForwardToSyslog=no in /etc/systemd/journald.conf: CentOS Linux release 7.3 systemd 219
2
votes
0answers
988 views

systemd-journald with volatile /var/log (poky)

I'm trying to make my journal persistent. Poky (yocto/krogoth) links /var/log to /var/volatile/log by default. I've already removed this mount in fstab and replaced it with an .mount file: [Unit] ...
2
votes
2answers
286 views

Relation between systemd service names and journald entries

Example [from Ubuntu 17.04] The service is known as network-manager by systemd. $ systemctl list-unit-files | grep network network-manager.service enabled Looking for log ...
4
votes
1answer
720 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-...
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 ...
2
votes
1answer
963 views

Does journalctl give access to all logs?

In my university we studied about rsyslog, and how it stores logs and where it stores them (/var/log/), and how to configure it ... Now, I learned (by surfing on the internet) that a new way of ...
1
vote
0answers
59 views

Can systemd-journald use network to transmit?

I use systemd-journald and forwards the log messages to rsyslog on my centos host , and then use rsyslog transmit on network . So, Can systemd-journald transmit log message use network?
2
votes
1answer
30 views

Systemd logs only 3 lines of errors

I have an error when running command assert.js:81 throw new assert.AssertionError({ ^ AssertionError: APP_API env var not set at Object.<anonymous> (/opt/offero-html-server/src/routes/...
8
votes
3answers
20k 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 ...
1
vote
0answers
2k views

journalctl: unrecognized option '--vacuum-size= '

All environment info on my os. debian8@debian:~$ uname -a Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux debian8@debian:~$ systemd --version systemd 215 +PAM ...
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 ...
3
votes
0answers
3k views

systemd Journal Service takes two hours to start

I have a relatively fresh debian install on which I changed the hostname in /etc/hostname. It gives me the following message during boot: [ 7406.882872] systemd[1]: Starting Journal Service... [ 7406....
3
votes
0answers
165 views

pam_winbind is logging passwords

Occasionally, a systemd unit using a pam module that uses pam_winbind logs a users password. Systemd unit log: Mar 25 15:47:41 display-server node[5969]: pam_succeed_if(grooming:auth): requirement "...
1
vote
1answer
4k views

enabling/disabling journald ForwardToSyslog option at runtime

I'm currently working on enabling and disabling ForwardToSyslog option in systemd-journald at runtime. When I set it to "no" -> ForwardToSyslog=no in /etc/systemd/journald.conf followed by systemctl ...
6
votes
1answer
2k views

How do I indicate the log level of a line of output from a systemd service?

I have a script that I intend to run as a systemd service. I know that stdout and stderr will be routed to the systemd journal. Is there any way for me to indicate that a line of output be treated as ...
3
votes
1answer
608 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 ...
0
votes
1answer
321 views

syslog-ng balabit client keeps opened deleted journal log files

OS: CentOs 7 syslog-ng -V: syslog-ng-premium-edition 5 F6 (5.6.1b) Installer-Version: 5.6.1b Real problem: syslog-ng keeps in open state deleted journal log files: syslog-ng 15305 30257 ...
2
votes
1answer
493 views

How should I manage the logs from my own systemd services?

I have deployed a couple of daemons on ubuntu boxes and wrapped them as systemd services. Their standard output is redirected to the journal by default which is what I was hoping for. Now, it turns ...
4
votes
1answer
1k views

How to not log some messages in systemd journal

Using Archlinux aarch64, I have an error message that keeps happening, which apparently cannot be solved, at least not simply (see this question). Since it occurs very frequently I am concerned about ...
3
votes
1answer
3k views

Is it possible to reduce systemd-journald size stored format (and thus size)?

I'm using systemd on raspberrypi machine with yocto based system. Recently I had some problems with redirecting messages to rsyslog.socket so I decided to get rid of rsyslog completely in favour of of ...
6
votes
1answer
4k views

How to view stderr log only with journalctl?

Please assume there's an app/script which prints a great deal of logging data to stdout. When something bad but expected happens within the script (exception handling), scripts reports an error to ...
3
votes
3answers
10k views

How to get see error message in journald

I've created a program that intentionally has an divide by zero error. If I run it in the command line it returns: "Floating point exception" But if I run this as a systemd service I can not see ...
19
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 ...