Questions tagged [journalctl]

51 questions
1
vote
1 answer

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 -f but now the journal seems to be stuck at some…
Dubb
  • 113
  • 1
  • 4
1
vote
2 answers

journalctl --disk-usage shows 106M while journalctl | wc -c shows only 7MB of logs, why?

I have an issue with journalctl, I set it to use 100M maximum in my journald.conf: [Journal] Compress=yes SyncIntervalSec=5m SystemMaxUse=100M ForwardToSyslog=no ForwardToKMsg=no ForwardToConsole=no ForwardToWall=yes LineMax=48K ReadKMsg=yes Which…
1
vote
2 answers

centOs : system time getting reset back to UTC after changing it using timedatectl

I have a Centos machine with version 7. I am trying to change the system time using the timedatectl command. The time gets changed but after a few seconds it gets reset back to it's original time. [root@abcd ~]# timedatectl Local time: Tue…
user1851006
  • 141
  • 2
  • 3
1
vote
1 answer

Volume of Logs created by journalctl/systemd per day?

Is there a way to get the size of logs (in bytes) which journalctl creates per day? Background: we want to get our logs into a central database. But before doing this I would like to have rough estimate how much bytes will get transferred. My…
guettli
  • 3,591
  • 17
  • 72
  • 123
1
vote
1 answer

journald: extract part of a system journal into the journald format (i.e. for use with journalctl)

I have a situation where it would be really useful to attach the relevant bits of the system logs to a bug ticket. The system in question uses journald and I rather like using journalctl to inspect the logs, so what I'd like to do is extract the…
Magnus
  • 141
  • 6
1
vote
0 answers

unable to query the systemd journal with journalctl

I'm using Red Hat Enterprise Application Platform 6.4.2.GA on following system: # cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.1 (Maipo) # uname -a Linux X 3.10.0-229.7.2.el7.x86_64 #1 SMP Fri May 15 21:38:46 EDT 2015 x86_64…
alexus
  • 13,112
  • 32
  • 117
  • 174
1
vote
1 answer

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/bin/java --enable-preview -jar…
jurgen
  • 111
  • 2
1
vote
3 answers

How to view journalctl without rebooting system in RHEL 7/8?

We're having issues with a customer having RedHat 7 PC's shutdown intermittently. One was just sent in for repair, and I'd like to check the journald output. However, I've read the rebooting the system overwrites it. How can I view this journal…
Jack BeNimble
  • 194
  • 11
0
votes
1 answer

How to make journalctl recognize user-defined fields?

Journalctl's manual says: New fields may freely be defined by applications, but a few fields have special meaning. However I don't see a way to actually introduce my own field that journalctl would recognize and allow filter on. I tried many…
Alex
  • 135
  • 1
  • 6
0
votes
2 answers

Why doesn't cron run the commands in another user's crontab?

Hello everyone and thank you in advance. I have written a job in the mysql user crontab, but it doesn't run at all. I think my code is correct, because it works properly if I execute it pointing to a script from my user's crontab: 00 12 * * *…
Centaro
  • 1
  • 2
0
votes
1 answer

I don't see SSH disconnect events with `journalctl -u sshd`

I want to monitor SSH sessions, including login and logout events. When I run journalctl without any flags, I see both login events like: Accepted publickey for root from 192.168.1.24 port 56464 and logout events like: Disconnected from user root…
Pavel Anni
  • 301
  • 2
  • 3
0
votes
2 answers

How to debug Linux server reboots?

I have a Debian 10 server that keeps rebooting. journalctl offers possibility to list last boots: journalctl --list-boots -6 1ee519dc5bc24e88af75cc609ee32093 Mon 2023-02-06 21:02:02 UTC—Sun 2023-02-12 17:23:28 UTC -5 bb25fc752ac1428abb87bab15a3cea8b…
Tombart
  • 2,143
  • 3
  • 27
  • 48
0
votes
1 answer

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 rejecting connection from y.y.y.y client subnet is not…
9072997
  • 171
  • 1
  • 11
0
votes
1 answer

strange messages in the systemd journal

I'm running systemd version: systemd 245 (245.4-4ubuntu3.2) +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid on…
ilya1725
  • 201
  • 2
  • 7
0
votes
1 answer

Tail the journalctl log on failure to restart systemd service?

I want to know if there is a brief way to check the last 50 lines about a service that threw an error on restart. $ sudo service nginx restart Job for nginx.service failed because the control process exited with error code. See "systemctl status…
listenlight
  • 103
  • 2
  • 4