Post APEhkS0SM2UfMpVjyC by kaip@social.tchncs.de
(DIR) More posts by kaip@social.tchncs.de
(DIR) Post #APEcSs1GOtID3tgbUe by climagic@mastodon.social
2022-11-03T17:21:01Z
0 likes, 0 repeats
Watch the syslog in real time and highlight cases of ERROR or WARN showing up in them using grep color. The blank pattern in the regex 'or' will ensure you see all lines.sudo tail -F /var/log/syslog | egrep --line-buffered --color=auto 'ERROR|WARN|$'
(DIR) Post #APEcSsYaOzwojFHDQu by josemanuel@qoto.org
2022-11-03T18:22:15Z
0 likes, 0 repeats
@climagic Weren’t egrep and fgrep deprecated in 2007 and definitely removed a few months ago? Probably better to use grep -E these days.
(DIR) Post #APEcpaoYXBKaMVZqnw by kaip@social.tchncs.de
2022-11-03T18:03:59Z
0 likes, 0 repeats
@climagic What about `journalctl -f` ? There are good options for filtering the syslog with journalctl.
(DIR) Post #APEcpbE50HkPdfWEaW by josemanuel@qoto.org
2022-11-03T18:26:20Z
0 likes, 0 repeats
@kaip Isn’t journalctl part of systemd? What about distros, like Slackware, and other UNIX operating systems that don’t ship it?@climagic
(DIR) Post #APEhkS0SM2UfMpVjyC by kaip@social.tchncs.de
2022-11-03T19:21:26Z
0 likes, 0 repeats
@josemanuel @climagic They will have to use something else.
(DIR) Post #APEihS97TiwWszhJKa by josemanuel@qoto.org
2022-11-03T19:32:07Z
0 likes, 0 repeats
@kaip Of course, Captain Obvious, but my point was that, when @climagic shows us one-liners, the idea is to make them as universal and portable across distros and operating systems as possible. If you use a systemd-ism, that defeats the purpose.
(DIR) Post #APKiPiGqrpymKsQwGe by climagic@mastodon.social
2022-11-06T16:57:04Z
0 likes, 0 repeats
@josemanuel @kaip I'm not strictly universal nor always POSIX compliant in my posts. I've stated a few times before that I'm mostly focused on bash on GNU/Linux because that's what I'm mostly familiar with. Bash also has the widest audience on Linux. While I do try to make stuff universal, that's impossible due to all the varieties and the SysV vs. BSD vs GNU split of options. If I know something is specifically GNU, then I try to put a #GNU hashtag in the post.