Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [systemd-journald]

journald is part of systemd and responsible for collecting system logs

1
vote
2answers
42 views

How do I analyze journalctl logs outside of journalctl?

I need to collect some stats from my systemd log files, like how many users pass in a certain query string parameter to my service. I know I can view this information in journalctl but I can't figure ...
0
votes
1answer
33 views

How to omit PAM log messages for specific user (pam_succeed_if quiet)

I'm using a monitoring agent (telegraf) to monitor fail2ban. Unfortunately, it requires SuperUser rights to execute fail2ban-client, which causes 24 system log messages every 10 seconds... Do the math,...
0
votes
0answers
41 views

How to remove bloat from journald systemlog?

tl;dr The "managed-by-journald" syslog is littered with repeated error message created by one-buggy-software. How to remove those entries from the journal? Being one of the blessed users of ...
1
vote
0answers
41 views

automated tool (or script) for cleaning systemd journal of corrupted files?

It is my understanding that the systemd journal cannot repair or fix errors revealed by: journalctl --verify Here's an example of an error I just saw. I routinely see errors like this on all the ...
1
vote
1answer
44 views

Capture text log files to journald

Per Journald man page. This command can capture stdout/stderr, only, for running services. However, sometimes we would like to capture text logs into journald, For example, nginx access.log. Is it ...
0
votes
0answers
35 views

How to prevent “Kernel messages have been lost as the journal system has been unable to process them quickly enough.”?

$ sudo journalctl -x -b 0 shows: Sep 05 00:44:54 dom0 qrexec[4471]: qubes.GetDate: sys-firewall -> @default: allowed to dom0 Sep 05 00:44:54 dom0 runuser[4480]: pam_unix(runuser:session): session ...
1
vote
1answer
29 views

How to configure systemd-journald on NixOS?

What is the proper way to configure systemd-journald on NixOS? There seems to be no relevant configuration options. On Ubuntu, for example, I could edit /etc/systemd/journald.conf. Context: I have ...
2
votes
2answers
275 views

Examining /dev/log

/dev/log is the default entry for system logging. In the case of a sytemd implementation (this case) it's a symlink to whatever /run/systemd/journal/dev-log. It used to be a receiving end of a unix ...
1
vote
2answers
72 views

Log all scp transfers with systemd-journald

Does systemd-jurnald log incoming scp connections and what file they copied to what place? I would either like to access these logs or change the config so all of these file transfers are logged.
1
vote
0answers
19 views

journald to rsyslog paging issues

I'm using rsyslog to dump journald entries to a log file so that they can be sent to Logstash. The issue I'm having is that some of the log lines are getting split across two lines. When viewing ...
2
votes
0answers
71 views

Why do “journalctl --disk-usage” and “journalctl | wc” not correspond well?

TL;DR how comes that journald stores about 770 MiB while displaying the logs only yields 90MiB of data? #UPDATE# I did a journalctl -a -o verbose which at least yielded some 530MiB, yet less than ...
1
vote
1answer
41 views

Error starting service in Ubuntu 16.04:

I have created a systemd unit file like this: [Unit] Description=Menu Core Prices Update Daemon After=network.target [Service] Environment="APP_CP=/opt/menu/menu-core-price-update" Environment="...
1
vote
0answers
41 views

Systemd showing partial output in the logs

I want to have output output of iostat printed periodically and logged. Executing the command in the shell prints out the normal fields as expected: # iostat avg-cpu: %user %nice %system %iowait ...
1
vote
0answers
107 views

Remove single line from journalctl file

I have an Ubuntu 18.04 server that is running a service I'm developing. The output is being sent to the system journal for logging. I accidentally failed to sanitize some logging and a plaintext ...
0
votes
0answers
64 views

Starting as a systemd service, no journal files were found. Cannot start service

i have recently downloaded and installed node-red on my rp1 via the bash command as suggested in their docs. I run raspbian Jessie. I want to run 2 services at the same time.The first service is a ...
0
votes
0answers
13 views

systemd-journal-remote with https always looks for SSL CA

I'm setting up remote logging with systemd. systemd-journal-remote has been set on the server (which will receive the logs) and systemd-journal-upload on the client side. The initial setup was done ...
0
votes
1answer
57 views

Which one should I choose for log management, systemd-journald or rsyslog?

We have both systemd-journald and rsyslog running on our linux box, and we have to make a decision bewteen these two for managing our application logs. From what we've known (please correct me if I'm ...
0
votes
0answers
125 views

Fail to mount an external disk on Debian

I have a Debian 8 server with an external disk attached $ sudo lsblk --fs NAME FSTYPE LABEL UUID MOUNTPOINT sda ext4 7169e849-0d6d-4094-b0f7-...
1
vote
1answer
186 views

systemd.service : use pty so force flush of stdout?

I have a service that I want to run under systemd. It is written in perl, where by default output is line buffered if STDOUT is connected to a terminal. (Which seems similar to python) The ...
0
votes
1answer
49 views

redundant systemd-journal-remote for systemd-journal-upload instances

I'm using systemd-journal-upload on serveral nodes to forward their journals to a single systemd-journal-remote sink, loghost01: /var/log/journal ├── <foo-bar> │ ├── system.journal │ └── ...
0
votes
1answer
54 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, ...
2
votes
1answer
246 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
121 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
0answers
333 views

Bypass systemd-journald to send messages directly to ryslog daemon

As a follow-up of my earlier question Prevent syslogs from being logged under journalctl, and this wonderful JdeBP's answer I want to know how do I bypass systemd-journald to send syslog messages ...
0
votes
1answer
960 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
224 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
0answers
180 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
773 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 ...
3
votes
3answers
1k 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
370 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
517 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
441 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
284 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: ...
2
votes
3answers
2k 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
218 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
193 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 ...
0
votes
0answers
30 views

Journald middleware

ufw in debian generates iptables rules and also manages logging of packets blocked by those rules, but the generated messages go into kernel unit when logged with journald. Are there any ways to ...
4
votes
1answer
292 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
598 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
884 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
80 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
683 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
679 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
484 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
236 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 ?
1
vote
0answers
99 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 ...
0
votes
2answers
2k 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
111 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
259 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
281 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