You are not logged in.
Pages: 1
hi to everybody,
i want to "open" the systemd log (i know and use the journalctl command) outside the terminal, outside the not comfortable pager.....
my idea is to simply use a text editor such as geany, but my little bash knowledge aren't enough to perform this task....can anyone help me?
thanks
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
journalctl --no-pager
?
'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard
Offline
If your text editor supports reading from STDIN, you could do something like this:
PAGER="vim -" journalctl
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Something like this?:
$ export SYSTEMD_PAGER=cat
$ journalctl > /tmp/journal && geany /tmp/journal
Just put "export SYSTEMD_PAGER=cat" in your .zshrc (.bashrc whatever) if you don't want to use the systemd pager at all.
Last edited by dodo3773 (2013-01-03 03:35:56)
Offline
thanks, following your suggestions:
journalctl --no-pager --this-boot > /tmp/log.log && geany /tmp/log.log
it works, but i think (i hope) exist a way to redirect the journalctl output into geany input, this trick should be perfect....
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Are you aware that you can use syslog with journald to produce legacy-style plain text logs? Might save you some of the hoop-jumping suggested above.
Offline
this could be an alternative solution, but in this way i make my (old) pc slower, since it's a second operation.... or not?
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Pages: 1