I just check my KDE VM that is a fresh install and it has rsyslog installed and the old school /var/log/messages etc. I'll have to run around all my systems and dnf remove rsyslog to clean mess of logs up!
You need to know a small number of new commands and its worth it. Because the journal is structured log records you can query it in useful and fast ways. Want to know what sshd did since boot? [root@armf36 ~]# journalctl --boot 0 --unit sshd
Aug 25 15:28:58 armf36.chelsea.private systemd[1]: Starting sshd.service - OpenSSH server daemon... Aug 25 15:28:58 armf36.chelsea.private sshd[1012]: Server listening on 0.0.0.0 port 22. Aug 25 15:28:58 armf36.chelsea.private sshd[1012]: Server listening on :: port 22. Aug 25 15:28:58 armf36.chelsea.private systemd[1]: Started sshd.service - OpenSSH server daemon. Don't like typing --boot well its this: journalctl -b 0 -u sshd Want to know what happened in that last few minutes? [root@armf36 ~]# journalctl --since=15:31
Aug 25 15:31:24 armf36.chelsea.private systemd[1]: fprintd.service: Deactivated successfully. Aug 25 15:31:24 armf36.chelsea.private audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 s> Aug 25 15:31:24 armf36.chelsea.private audit: BPF prog-id=0 op=UNLOAD Aug 25 15:31:28 armf36.chelsea.private systemd[1]: systemd-hostnamed.service: Deactivated successfully. Its got grep built in as well. so you can combine grep with any of the above. [root@armf36 ~]# journalctl --since=15:31 --grep STOP
Aug 25 15:31:24 armf36.chelsea.private audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 s> Aug 25 15:31:28 armf36.chelsea.private audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 s>
I have to support systems without journald and its slower to get to the info need. Barry
|
_______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue