3

Service is still active:

systemctl -l status foo.service
● foo.service - My Foo service
   Loaded: loaded (/etc/systemd/system/foo.service; static; vendor preset: disabled)
   Active: activating (start) since Fri 2019-01-18 00:08:45 EST; 18h ago
 Main PID: 29032 (bash)
   CGroup: /system.slice/foo.service
           ├─ 4159 ssh: /root/....

This morning I was able to tail the logs with -f -u foo.service. But now I see this instead:

sudo journalctl -u foo.service
-- No entries --

sudo journalctl -f -u foo.service
-- Logs begin at Wed 2019-01-16 10:18:52 EST. --

I have another service (well, a timer to be exact) completed and log is also unavailable now.

How do I view old logs? I've tried using --since yesterday and _PID= for example, and it only returns to me system logs.

  • I hope it's not the recent bug/exploit – Jeff Schaller Jan 19 at 2:26
  • How have you proven that any journal entries at all prior to Wednesday even exist any more? How have you determined where your journal has rotated to? – JdeBP Jan 19 at 10:34
  • @JdeBP that's part of my question I am guessing: it seems like default on CentOS is saving to /run/log which according to some thread here it's volatile and not persistent. – CppLearner Jan 19 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.