On 25 Aug 2022, at 09:31, Tim via users
<users(a)lists.fedoraproject.org> wrote:
Tim:
>> I also look at /var/log/messages, other people use journalctl, but I
>> find the messages file easier to deal with.
Samuel Sieb:
> You must have upgraded from a much older version or else you've made
> some changes.
Not an upgrade, a fresh install. And I don't recall making any changes
related to the messages file creation. My post install logs just show
things installing vlc, gstreamer and lame codecs, chromium and google-
chrome browsers, evolution, gimp, gvim, musescore, autofs.
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!
On the other PC:
uname -rsvp
Linux 5.18.16-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 3 15:44:49 UTC 2022 x86_64
It's the Mate spin, if that makes any difference.
> By default there is no /var/log/messages file. The
> journal is the default system and it is much easier to use.
This is some new definition of easier that I'm unfamiliar with.
I have to learn commands I don't know, as opposed to tail, less, and
grep, that's on virtually all Linuxes. The same commands I use on
every other log file I read (Apache logs, mail logs, etc). I have to
keep referring to the man file to be able to use journalctl. And it's
a right pig to deal with it loading a huge amount of data as opposed to
reading the last messages file since it was rolled over.
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>
Yep, definitely not the "easier" in my dictionary.
I have to support systems without journald and its slower to get to the info need.
Barry
--
uname -rsvp
Linux 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64
Boilerplate: All unexpected mail to my mailbox is automatically deleted.
I will only get to see the messages that are posted to the mailing list.
_______________________________________________
users mailing list -- users(a)lists.fedoraproject.org
To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue