Questions tagged [journalctl]

Questions about journalctl - the tool used to manage, query and view logs on systemd setups.

Filter by
Sorted by
Tagged with
2
votes
0answers
25 views

Why does journalctl --user asks for password and says “— no entries --”?

I'm trying to find why one of my Systemd user units is failing. This unit is stored in /etc/systemd/user (I know I can also put it in .config/systemd/user) and fails to start. I tried to run ...
1
vote
0answers
31 views

SystemD-JournalD Loses Track of Previous Boot Persistent Log Data

I am running SystemD JournalD version 244.3 on a custom Embedded Linux board. root@board:/var/log/journal# journalctl --version systemd 244 (244.3+) -PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +...
5
votes
2answers
87 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
13 views

How to journalctl multiple units grouped as target?

I want to journalctl multiple units which are partof=myunits.target. However journalctl -u myunits.target returns nothing. What else could I try?
0
votes
0answers
23 views

Why does journalctl for a service file running a shell script include more than is output to stdout?

In a unit-file for systemd (that is to say myservice.service file) I run a script that runs an infinite loop checking something on the system. It calls a function every 5 seconds or so and uses awk ...
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" | ...
2
votes
1answer
131 views

Will a systemd service automatically manage it's logs (do log rotation etc)

I have a systemd service configure like so: [Unit] Description=cprev agent After=network.target StartLimitIntervalSec=2 [Service] Type=simple Restart=always RestartSec=15 ExecStart=/home/oleg/.local/...
0
votes
0answers
43 views

Hang on reboot, no hang on shutdown? (Pop! OS)

I've been running a Pop! OS machine for a while, and it's been going great. I've been an Ubuntu user for some time and wanted to explore a bit of the gaming side of things. I thought I might be able ...
0
votes
0answers
15 views

How to get all journal messages before rotating?

Our embedded systems rotate journal messages according to a configured file size. I developed a tool that uploads journal messages to another system. I want to trigger this tool before rotation. But ...
1
vote
1answer
246 views

System completly freezes often (maybe chromium-vaapi)

My system freezes and the only solution is to force shutdown it. I'm not sure but maybe the problem is due chromium-vaapi , any missconfiguration or something. I'm in 5.4.13-arch1-1 #1 SMP PREEMPT. ...
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 ...
2
votes
1answer
61 views

Rapidly changing boot_id values in systemd

While looking through some archived journal files from another machine, I noticed that some log entries have different __BOOT_ID values with extremely narrow time gaps in between. For an example, log ...
2
votes
2answers
108 views

systemd unit enabled but does not start on boot for user, only for root

I am lost, I don't know why this does not work for the user on reboot: (not working means: if I start it manually using systemctl --user start nostc it works perfectly, no errors. In the logs there ...
0
votes
1answer
88 views

Why journalctl don't save my logs of the boot before forced shutdown?

My PC freezes a third time and I have to shut it down forcibly. Why doesn't journalctl save the boot logs before forced shutdown? When I do journalctl --list-boots I only get the boot after crash. I'...
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 ...
0
votes
1answer
175 views

How can I hide failed ssh attempts for users that don't exist?

The Question How can I exclude inconsequential¹ failed SSH logins? Background For ambient awareness, I like to have little background windows showing system error logs on every GNU/Linux box I ...
3
votes
0answers
39 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=...
2
votes
1answer
36 views

How long did a systemd unit run?

I can list past boots of my machine with journalctl --list-boots. The output looks something like this: -4 21b1318cbaf04732b95ed0a5e40f6698 Tue 2019-06-25 17:26:53 CEST—Fri 2019-07-05 17:11:31 CEST ...
0
votes
1answer
704 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' ...
4
votes
0answers
1k views

Why is journalctl reporting “PCIe Bus Error” BadTLP and BadDLLP?

I am running Fedora 30 64-bit on an AMD Ryzen 2700U and I've noticed that journalctl gets a lot of messages about PCI bus errors (all identical). What might be causing this and what does it mean by ...
2
votes
1answer
264 views

How to follow journalctl since boot?

journalctl --boot prints log lines since boot and journalctl --follow prints the last 10 lines of the log and then follows it. But journalctl --boot --follow doesn't work like I expect it to. Rather ...
1
vote
0answers
159 views

reboot causes device to shutdown but doesn't start again for many hours after

I am using a BeagleBone running Debian. I have a cron entry in /etc/crontab which tells the device to reboot at 03:01 every night as follows 00 03 * * * root /sbin/shutdown -r +1 >> /...
3
votes
1answer
120 views

List boots with unix timestamps via journalctl

journalctl has the -o short-unix flag that I can use to change the output date format on stuff like -t systemd-sleep. But the only way I've found to list boots is --list-boots, and this doesn't seem ...
1
vote
1answer
191 views

journalctl 12 hour format?

Looking through the Archwiki on journalctl and systemd I do not see a means of configuring the system log to display in a 12 hour format with am and pm. The 24 hour format works fine; however, I need ...
0
votes
1answer
43 views

Limit journalctl to single user or process

When troubleshooting script ran by Apache, I use the following: journalctl -f -uhttpd When executed on the command line, under my normal username I first do: php testing_new_socket_server.php and ...
1
vote
0answers
72 views

How do you configure auditd logs to show up in journalctl?

I cannot find the usual auditd logs when doing "journalctl | grep msg=audit". However, I do see the auditd logs in /var/log/audit/audit.log and when doing ausearch. Is there a way to configure it so ...
0
votes
0answers
203 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: /...
1
vote
1answer
967 views

How to let a specific group have read-access to systemd's journal?

How do I grant read-only permission to somegroup to read the system journal? (I'm on Debian10 buster). $ journalctl Hint: You are currently not seeing messages from other users and the system. ...
0
votes
1answer
183 views

Use journalctl to show logs of specific unit which has a parameter?

I have one systemd service which runs with systemctl --user start test_unit@random_arguments. How could I use journalctl to filter all logs of test_unit? If it supports "follow mode", that's even ...
2
votes
1answer
126 views

How I can preconfigure the write mode of drive cache?

journalctl -p err gives [sdX] Assuming drive cache: write through for each of my hard drives, where X is from a to f. These are normal hard drives, Ubuntu runs under VMWare. How I can preconfigure the ...
4
votes
2answers
359 views

Show journal logs from the time a service was restarted

Is there a canonical way to get all the logs from journalctl since a service was last restarted? What I want to do is restart a service and immediately see all the logs since I initiated the restart. ...
0
votes
0answers
382 views

systemd: process with fork() only shows logs after child exits

I have a program that fork()s and exits. Its child remains running for about 50 seconds, while it prints out messages each 5 seconds. When I run from a terminal it runs as expected, the parent exits, ...
2
votes
0answers
43 views

systemctl echos prints interference from other unit

I am working on a service which runs just fine. My poblem (or rather a mild annoyance) is that when I run systemctl status foo.service or journalctl -u foo.service I will occasionally see error ...
2
votes
1answer
1k 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 ...
4
votes
1answer
186 views

How do I work out which process/service/program is sending systemd dbus messages?

Currently my systemd journal is filling up with messages of the form: Feb 01 16:40:31 host systemd[1]: Got message type=method_call sender=:1.58666 destination=org.freedesktop.systemd1 object=/org /...
2
votes
1answer
159 views

How to show journal messages from all `fsck` units

Is there a reasonable procedure for a system administrator to view all the fsck messages? On my current Fedora 29 system, I can view all the fsck messages from my current boot like this: sudo ...
8
votes
2answers
7k views

How to watch output from systemd service?

I want to watch output from a systemd service on CentOS as if I have started this service from console. Yes, I can see output with journalctl, but it doesn't scroll to the bottom automatically. So how ...
2
votes
2answers
7k views

Where to find the log file of specific service

Using sudo journalctl -u {service} I can see the log of specific service. How to find the associated log file? What is the best way to monitor a log file programmatically? (I mean a program the react ...
5
votes
1answer
7k views

gnome-shell error log

Where can I find gnome-shell error (or debug) log? I'm interested in mutter error/warning messages since I have a GLX problem I need to debug and I believe the key could be in gnome-shell's messages.
10
votes
0answers
907 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 ...
1
vote
1answer
2k views

Laptop wake up when lid is closed

I've a problem, every time I close the lid the laptop wakes up 2 seconds after (with the lid still closed) systemctl suspend/hibernates comes to the same result The problem happens on every linux ...
2
votes
0answers
2k views

pulseaudio.service “Failed to start Sound Service.”

On my desktop I get multiple errors regarding pulseaudio in journalctl after bootup: Jun 10 15:50:51 Workstation systemd[1146]: Failed to start Sound Service. ...
5
votes
1answer
1k views

Read exported journal with colors and bold

How inspect exported boot section from journalctl -b -1 > bootlog.txt in full color? Default exported format loses all colors and bold markup that is important to spot critical details. It is ...
1
vote
1answer
241 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 │ └── ...
1
vote
1answer
3k views

journalctl to delete log

du -sh /var/log/journal/ 201M /var/log/journal/ journalctl --vacuum-size=10M Deleted archived journal /var/log/journal/5fabef35e4144feb92a9d7177b21d4e4/system@5dc54ed9ad1e41a785428a8ae2e88877-...
0
votes
1answer
521 views

View original kernel message timings from historical system logs

By default journalctl shows messages in the traditional system log format, including the CLOCK_REALTIME stamp, i.e. wall clock time (and calendar date). However, this doesn't show accurate timestamps ...
5
votes
2answers
2k 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 ...
36
votes
5answers
70k views

How to see the latest x lines from systemctl service log

I'm looking for a way, to simply print the last X lines from a systemctl service in Debian. I would like to install this code into a script, which uses the printed and latest log entries. I've found ...
4
votes
1answer
3k views

Print only timestamp and message in journalctl

I'm trying to get the last few lines from journalctl so I can feed them into my conky. However journalctl by default provides too much crap that wastes space: With journalctl -u PROCESS -n 5 --no-...
3
votes
1answer
2k 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 ...