4

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.

3
  • I hope it's not the recent bug/exploit Commented Jan 19, 2019 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? Commented Jan 19, 2019 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. Commented Jan 19, 2019 at 14:59

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.