You are not logged in.

#1 2015-11-08 03:34:50

bibek22
Member
From: Nepal
Registered: 2015-09-10
Posts: 90

[Solved]Where's the equivalent of /var/log/messages under systemd

I searched the entire wiki for "/var/log/message" didn't find what I was looking for.
I was following "UNIX and Linux system admin. handbook" and under creating a udev rule for a media device that file was referred to find the name by which it is recognized under /sys/ (i guess). But I am kinda lost with the journalctl.

Last edited by bibek22 (2015-11-08 05:53:06)

Offline

#2 2015-11-08 04:27:12

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [Solved]Where's the equivalent of /var/log/messages under systemd

It's hard to say what you should do without knowing more about what you actually want to accomplish but you can install the syslog-ng package if you want to also have the old-style text logs in the /var/log directory. There is probably a better way to accomplish what you actually want to do though.

Last edited by TheChickenMan (2015-11-08 04:30:06)


If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#3 2015-11-08 04:36:10

bibek22
Member
From: Nepal
Registered: 2015-09-10
Posts: 90

Re: [Solved]Where's the equivalent of /var/log/messages under systemd

Well, I was following along with the book to write a udev rule so that a USB flash drive's name persists across insertions and also it's mounted automatically on specified location. But before writing that rule, book suggests to look at /var/log/message and says in this case the attachment leaves an extensive audit trail. In author's case the log entry shows the device being recognized as 'sdb'.

I'm looking for something similar in my machine.

Offline

#4 2015-11-08 04:52:57

TheChickenMan
Member
From: United States
Registered: 2015-07-25
Posts: 354

Re: [Solved]Where's the equivalent of /var/log/messages under systemd

journalctl -r | grep SECURE
Nov 06 17:14:35 TERMINAL udisksd[1136]: Mounted /dev/dm-0 at /run/media/mr/SECURE on behalf of uid 1000
Nov 06 17:13:23 TERMINAL systemd[1]: Unmounted /run/media/mr/SECURE.
Nov 06 17:13:23 TERMINAL systemd[1]: Unmounting /run/media/mr/SECURE...
Nov 06 15:22:30 TERMINAL udisksd[1133]: Mounted /dev/dm-0 at /run/media/mr/SECURE on behalf of uid 1000
Nov 06 15:16:58 TERMINAL systemd[1]: Unmounted /run/media/mr/SECURE.
Nov 06 15:16:58 TERMINAL systemd[1]: Unmounting /run/media/mr/SECURE...
Nov 04 20:47:08 TERMINAL udisksd[1134]: Mounted /dev/dm-0 at /run/media/mr/SECURE on behalf of uid 1000
Nov 04 16:02:17 TERMINAL udisksd[1134]: Cleaning up mount point /run/media/mr/SECURE (device 253:0 is about to be cleaned up)
Nov 03 17:02:17 TERMINAL udisksd[1134]: Mounted /dev/dm-0 at /run/media/mr/SECURE on behalf of uid 1000

I have a USB disk with the volume name "SECURE". Is this the type of information you were after? You can just search for it with journalctl using some information that can identify that device like its volume label. You can also get something to mount to a specific location by adding a line to /etc/fstab, see below. Make sure to include the "nofail" option.

# /dev/md0p1 LABEL=STORAGE
UUID=2a22e17c-c1a7-42e0-9148-ef66d36d3ee1	/mnt/storage	ext4	nosuid,nodev,nofail,noatime	0 2

If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr

Offline

#5 2015-11-08 05:20:41

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,597

Re: [Solved]Where's the equivalent of /var/log/messages under systemd

Yep, everything is in the journal now.

Offline

#6 2015-11-08 05:52:48

bibek22
Member
From: Nepal
Registered: 2015-09-10
Posts: 90

Re: [Solved]Where's the equivalent of /var/log/messages under systemd

Thanks guys, I grepped it out of journal -r .

Offline

Board footer

Powered by FluxBB