You are not logged in.
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
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
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
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
Yep, everything is in the journal now.
Offline
Thanks guys, I grepped it out of journal -r .
Offline