As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [journald]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
62 views

Systemd service not logging

I have a systemd service. No logs appear from it despite my best efforts. This is the service file: [Unit] Description=Load Balancer [Service] WorkingDirectory=/home/lb ExecStart=/usr/lib/jvm/jdk-20/...
jurgen's user avatar
  • 111
0 votes
1 answer
49 views

When logging out to journald, when would you use a library and when would you use systemd config options to pipe StdOut/StdErr to journald

I've found library's that allow logging out to journald which suggests that, yes you should use a library where possible and log to journald from inside your app. But then there are tools like systemd-...
Thermatix's user avatar
  • 115
0 votes
1 answer
32 views

Why python-journald-rsyslog seems to batch/dely log write?

I intend to log a python script output. Here what it looks like : arm@stackoverflow > cat test.py #!/usr/bin/python from time import sleep while True: print("Hello") sleep(...
moutonjr's user avatar
  • 498
0 votes
1 answer
172 views

Rotate Logs of systemd-journal-remote

I am running Ubuntu 22.02 with systemd-journal-remote version 249.11-0ubuntu3.6. The hard drive was full because log rotation was not set-up. To manage file size of journals I updated my config at /...
antonio amaddio's user avatar
0 votes
0 answers
182 views

Deal with systemd-journald namespaces

I am trying to find out how the namespace mechanism of systemd's journald operates. How to configure it, whether journal namespaces are equal to unix / linux namespaces and how to attach my custom ...
woodz's user avatar
  • 136
0 votes
1 answer
82 views

define custom fields for systemd-journald

The doc states, it may be possible to define new fields by applications. What does it mean? Can one define arbitrary fields or are only those possible listed in the doc USER JOURNAL FIELDS? If ...
woodz's user avatar
  • 136
0 votes
0 answers
71 views

Cannot edit journald.conf

I'm working with a embedded linux machine that was made with Buildroot. The default user is root and I would like to edit /etc/systemd/journald.conf to set the SystemMaxUse to prevent the log files ...
Life Impactor's user avatar
0 votes
0 answers
75 views

Systemd service stdout incompletely captured by systemd journal

I have a trivial systemd service (called "testpath") which simply prints some output to be captured by the journal. The journal is intermittently and unpredictably losing part of the output. ...
Dave Hughes's user avatar
0 votes
0 answers
204 views

Redirect systemd service logs to /dev/kmsg for all running services

Currently systemd service files will redirect the logs to journal buffer by default. But I need to get all the userspace services logs as part of /dev/kmsg buffer. I was able to add StandardOutput=...
Rckzz's user avatar
  • 1
1 vote
1 answer
467 views

Systemd service logs twice when it stops & starts. Anyway to disable?

I have a systemd (v249) service (my-script.service) which is run every minute by another systemd timer (my-script.timer). Everything's working fine. But systemd logs (to it's journald & thence to /...
Amandasaurus's user avatar
  • 31.2k
2 votes
1 answer
249 views

How to send a systemd ssh error so that it's picked by fail2ban

I have a setup which uses ansible and vagrant to test a custom role which installs and configures fail2ban. I have written myself a simple test playbook which uses the fail2ban role and applies the ...
tftd's user avatar
  • 1,498
3 votes
3 answers
3k views

systemd StandardOutput to a file _and_ to the journal?

I am regularly doing a long running (~5 day) data processing programme. I'm using Ubuntu and running the command with a systemd transient task via systemd-run --unit data_import /path/to/my-script.sh. ...
Amandasaurus's user avatar
  • 31.2k
0 votes
0 answers
191 views

systemd: my service stopped working with code=killed

My service has suddenly stopped working, systemctl status reports: Main PID: 5459 (code=killed, signal=TERM) Also, I checked through ``journald for my service (journalctl -u myservice.service`) and ...
Mark's user avatar
  • 249
0 votes
0 answers
424 views

systemd journal - delete logs belonging to a specified unit?

Like there is a way to show all logs belonging to a unit: journalctl -xu <unit>, Is there a way to clear the logs belonging to a specified unit with journalctl ? Actually, my problem is, one of ...
Ani's user avatar
  • 32
2 votes
1 answer
1k views

Set INFO/ERROR priority for messages logged to journal via stdout and stderr?

We have many production apps (first and third-party) that leave logging up to the process that runs the app and just log to stdout for INFO and stderr for ERROR logs (ie only 2 log priorities: INFO|...
mattpr's user avatar
  • 611
0 votes
1 answer
180 views

How do I stop journald from dropping blank lines?

I have an application which logs to stdout in a format like this: incoming request from x.x.x.x client version is 1.2 authenticated as alice@example.com processed 1234 bytes closing connection ...
9072997's user avatar
  • 171
1 vote
0 answers
540 views

stop kernel audit messages logged in syslog without disabling auditing

OS: CentOS 7 I am trying to figure out how audit (kaudit) events are logged in /var/log/messages. I have enabled audit=1 in grub which means when the server boots, kernel auditing is enabled. This is ...
giomanda's user avatar
  • 1,734
0 votes
2 answers
339 views

systemd, journal receiving raw log

one common paradigm on all other syslog implementations (rsyslog, syslog-ng, readlog, etc) is to exchange log entries via UDP514 in plain text format. How do I enable systemd-journal-remote to receive ...
gcb's user avatar
  • 303
0 votes
0 answers
425 views

How to ensure output from "tee" is shown when used in a script run under systemd

I have a script that I'm running under systemd which has some debug logs that I'd like to send to both stdout (which should end up in the system journal, viewable with journalctl) as well as to a log ...
mgalgs's user avatar
  • 345
2 votes
1 answer
695 views

How I can send all logs from journald to GCP Logging?

Don't know what to add more to question, just want to send all logs. My applications write logs to journald, there is no files on disk. UPD. Just to clarify, there are files where journald store logs, ...
Raf's user avatar
  • 173
2 votes
0 answers
4k views

Service not logging to journalctl

I have a user service which is placed under /home/<user>/.config/systemd/user/<service>.service When I perform systemctl --user status <service> I have the desired output, for ...
Daniel's user avatar
  • 21
0 votes
0 answers
133 views

rsyslog seems to be triggering sdhci dumps when writing in external storage

Acording what I read, rsyslog is usually used to process logs and send them to another locations, either local (external storage, specific partition, etc.) or remote (logging server, for example). ...
jfernandz's user avatar
4 votes
1 answer
2k views

Is it safe to disable rsyslog if I have journald?

I am using Debian 10. It seems to me, that both journald and (r)syslogd watch for messages independently from sources such as kmesg() or syslog(). Is there any advantage to running both? Why does ...
markson edwardson's user avatar
3 votes
1 answer
2k views

Is there a way to make samba (smb,nmb) to not log start/stop events as error?

smbd and nmbd services log a lot of things as errors which clutters my journald logs when I filter it with journalctl -p 3. Is there a way to tell samba to not log start/stop/daemon_ready messages as ...
FieryRider's user avatar
1 vote
0 answers
107 views

Delete old SSH session recordings

Recently I've been testing SSH Session recording in Fedora + Cockpit as a method of auditing. This has been working pretty well, but it records too much information, and more importantly, picked up a ...
Alex's user avatar
  • 389
0 votes
0 answers
858 views

Make journalctl keep all logs forever (SystemMaxUse = unlimited)

How do I configure journald so that it never, ever, ever deletes my logs. Yes, what I want to do is tell journald to keep writing until the disk (read: /var partition's filesystem) is full. No, I don'...
Michael Altfield's user avatar
1 vote
0 answers
285 views

Connecting to systemd service's standard output/error

I have a simple systemd service that runs for some time and then exits. It usually gets triggered by a systemd timer but sometimes I want to run it manually (well, from a script). The problem is - I ...
Discussian's user avatar
2 votes
1 answer
762 views

journalctl --list-boots is not listing all boots

I have a Raspberry Pi running a custom Yocto image and it's using systemd-journald for logging. I'm wondering why there is a difference between: root@raspberrypi4:~# journalctl -o verbose | grep -e '...
evading's user avatar
  • 123
1 vote
2 answers
1k views

Best way to archive journald logs in a space-efficient way?

It has been established that journald logs are huge. On this specific system, the logs grow about 3GB per week. For audit purposes I would like to preserve system logs for a longer time than what can ...
liori's user avatar
  • 767
2 votes
0 answers
3k views

How do I specify a fail2ban filter/jail where the log is sourced from systemd/journald?

I've got nginx running and logging to systemd / journald. How do I specify the source of the log to be from a systemd unit? In man jail.conf I see for the backends listed as : systemd ...
Chris Stryczynski's user avatar
0 votes
2 answers
3k views

Podman rootless journald logging

I'm trying to log to the host's systemd-journald from a rootless podman-container. When i run the container as root with the --privileged flag, i can read the logs from the container on the host with ...
PManeCon's user avatar
1 vote
0 answers
63 views

Journal out of order

Trying to figure out what caused one of our servers (Ubuntu 18.04) to become unresponsive, I was looking through the journal ( journalctl -r) and saw strangely out of order timestamps Apr 17 09:20:...
SmoteKerrek's user avatar
1 vote
0 answers
1k views

Disable "Failed password" ssh logs

Bots are tirelessly trying to log into my server using ssh. That does not bother me, because my passwords are good, but I don't like the fact that ssh spam fills journald logs. I'd like to filter out ...
vbezhenar's user avatar
  • 261
6 votes
0 answers
3k views

journald memory usage on CentOS 7

I have an AWS EC2 instance running a CentOS 7.7.1908 (systemd 219) with a server application. The server logs quite a lot of information to the system logs (using syslog). I have recently enabled ...
MikaDo-'s user avatar
  • 61
1 vote
1 answer
3k views

Linux journalctl not synced with systemctl status / Journalctl not updating

I am running my custom service, let's call it "foo.service". It's a gunicorn python process which logs a few things. I used to be able to get a real-time log overview using journalctl -u <service&...
Dubb's user avatar
  • 113
0 votes
1 answer
818 views

RateLimitIntervalSec and RateLimitBurst in journald.conf are not working at all

I am trying to see how log drop count in the journald works. In the /etc/systemd/journald.conf file, I modified RateLimitIntervalSec to 1 second and the RateLimitBurst to 2 so that I can see some logs ...
susenj's user avatar
  • 101
11 votes
2 answers
12k views

Is rsyslog redundant on when using journald?

I have noticed log messages are duplicated in journald and /var/log/messages on my CentOS 7 system. At first I thought it was the journald option ForwardToSyslog (which defaults to 'yes' in the ...
joaerl's user avatar
  • 357
2 votes
1 answer
2k views

rcu_sched self-detected stall on CPU + watchdog: BUG: soft lockup - CPU#3 stuck for 22s

Being unable to ssh into a machine I connected it to a monitor and found the following: The machine is running Ubuntu Server 18.04 LTS and is a first generation 8 core Ryzen 1700. I've restarted the ...
Greg's user avatar
  • 1,647
5 votes
1 answer
3k views

systemd-journal Rate Limit

I have a service set up on CentOS 7 which outputs a lot of log messages, which results in this in the system log / journal: systemd-journal[xxxx]: Suppressed 864 messages from /system.slice/example....
David's user avatar
  • 51
1 vote
0 answers
822 views

journald forwarding to syslog seems to be lagged

I'm seeing an issue on a Ubuntu 16.04 box where the copying/forwarding of journal messages to /var/log/syslog seems to be delayed: theuser@host:/etc/systemd$ sudo journalctl -n 1 && sudo tail ...
Jordan0Day's user avatar
2 votes
0 answers
128 views

sudo log entries don't show username on Debian Stretch

For some reason, the username of the user calling a command with sudo is not shown in the system log: $ journalctl -ef sudo[30160]: pam_unix(sudo:session): session opened for user root by (uid=0) ...
Strayer's user avatar
  • 121
1 vote
1 answer
301 views

`journalctl -f -m` does not interleave remote and local

I currently have a 2-server setup (3 servers in total, one still to be configured for this) with one server using systemd-journal-remote (.socket & .service) to collect all log entries from the ...
Shadowjonathan's user avatar
2 votes
2 answers
4k views

Clearing "/var/log/journal"

I want to clear my "/var/log/journal" directory. I'm using debian 8 root@nyc3-x8:/var/log# uname -a Linux nyc3-x8 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux And my ...
Goktug's user avatar
  • 23
5 votes
3 answers
19k views

System logs are empty (/var/log/messages; /var/log/secure; etc)

I found that rsyslog stopped writing on logs (messages; secure; cron;etc) System information: NAME="Red Hat Enterprise Linux Server" VERSION="7.4 (Maipo)" ID="rhel" ID_LIKE="fedora" VARIANT="Server" ...
BANJOSA's user avatar
  • 350
1 vote
0 answers
322 views

system freeze after systemd-tmpfiles-clean executed

recently i got a problem, i run mysql on docker with k8s , the system load getting high in 2 days from 1->500+, the /var/log/messages infomation: Aug 17 19:50:07 SVR5798HW1288 dockerd[1890]: time="...
Brad Lee's user avatar
10 votes
1 answer
18k views

How to filter journalctl output by process name?

When a process logs to systemd, its process name is recorded and displayed as identifier in the journalctl output. $ systemd-cat echo "test" $ journalctl -f -- Logs begin at Sat 2018-02-24 12:13:24 ...
Merlijn Sebrechts's user avatar
1 vote
3 answers
2k views

journalctl --follow isn't advancing

I have a program that continually reads the output of: journalctl -o json --follow And sends it to another process. And while it outputs journal entries initially from the tail, new ones don't ...
hookenz's user avatar
  • 14.4k
2 votes
1 answer
3k views

Systemd python service buffers journalctl output even with -u

I have a simple user systemd service configured like so: [Unit] Description=Bot AssertPathExists=/home/mikel/discord-bot/ [Service] WorkingDirectory=/home/mikel/discord-bot/ ExecStart=/home/mikel/...
mxbi's user avatar
  • 121
1 vote
0 answers
497 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 │   └── ...
rypel's user avatar
  • 111
4 votes
3 answers
2k views

systemd-journald system logs are not persistent across boots despite Storage=persistent

I recently got a problem with systemd not preserving logs from previous boots. I checked several answers here and elsewhere but haven't found a solution. the problem is that the user log gets ...
Jan Peter König's user avatar