4 ms·
Author of the talk here. If you have questions for me please feel free to reply to this comment with them.
by xena 5y ago
Author of the talk here. If you have questions for me please feel free to reply to this comment with them.
- jen20 5y agoI did a talk at HashiConf EU a few years ago with the same title - interesting to see where our ideas of "the good parts" overlap!
- xena 5y agoWow, I think that was completely by coincidence. I've never seen your talk before. Where did we overlap?
- jen20 5y agoI think we definitely agree on the most of the benefits - there's a transcript at [1]. I'm happy to see more people discuss the benefits and practical uses rather than the sea of hate that systemd usually gets (especially in these parts). [1]: https://www.hashicorp.com/resources/systemd-the-good-parts https://www.hashicorp.com/resources/systemd-the-good-parts
- Hackbraten 5y agoNo question, just thank you for an excellent article. I’ve found it difficult to come across articles that focus on the good parts of systemd.
- Traster 5y agoHey, thanks for the great talk, I often type something like "journalctl -xfe" and just get completely lost, you mentioned that's out of scope for this talk but do you have a recommendation for some hints about how to use journalctl effectively?
- dale_glass 5y agoA quick guide: * Want logs since boot? journalctl -b. The first boot is -b 0, the previous boot is -b -1. * Want logs for smartd? journalctl -u smartd * Want warnings and above? journalctl -p warning * Want logs since yesterday? journalctl -S yesterday * Want logs on April 22 between 10 and 11? journalctl -S "2021-04-22 10:00" -U "2021-04-22 11:00" * Want logs with microsecond timestamps? journalctl -o short-precise * Or in JSON for parsing? journalctl -o json * Want tail -f? journalctl -f
- themulticaster 5y agoTo add some of my own favorite commands: * Want only kernel logs? journalctl -k or journalctl --dmesg * Want to filter the output right away? journalctl --grep=some_regex * You booted a live environment, but want to look at the installed OS's journal: journalctl --root=/path/to/mounted_root or journalctl --directory=/path/to/journal * Want to look at the logs from a container you booted using systemd-nspawn (and friends)? Just use journalctl --machine=container_id * What time intervals do the boot indices (for -b) correspond to? Look no further than journalctl --list-boots I'd say journalctl really has a lot of generally useful flags.
- dTal 5y agoI can't help but notice that most of these flags seem to solve self-inflicted problems that don't occur with plaintext logfiles. Why have a special grep flag instead of, yaknow, piping through grep? (A: because journalctl is slow). Why special flags to load different categories of log? (A: because all the logs are mixed together in a big blob). Why a special flag to load logs from a container, and another different(!) special flag to load logs from a mounted system? (A: because journalctl throws away the logfile metaphor). I don't know what "boot indices" are, but your other commands with plaintext are as follows: dmesg or cat /var/log/whatever grep <pattern> /var/log/whatever cat /mnt/host/var/log/whatever cat /mnt/container/var/log/whatever
- kaba0 5y agoExcept that whatever is absolutely not trivial to find. Is it per service/day? What if it was rotated before? How do you look at the logs from the boot before the current? If it is per service, will you grep the service name? It will have many false positive lines. Raw data is not too useful.
- the_doctah 5y agoWhy do you feel the need to shorehorn your furry avatar into things?