This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ACTION=="add", SUBSYSTEM=="block", RUN+="/bin/sh -c 'test -d /dev/hdd || mkdir /dev/hdd'" | |
| # some notes: | |
| # - you can't use SUBSYSTEM="usb" or you'll symlink to the parent devices (usb bus, hub...) | |
| # - otoh, if you symlink only on serial number, you override the symlink when /dev/sd.[0-9] kick in | |
| # - so you need both the SUBSYSTEM=="block", and the ENV{PARTN} | |
| # - (PARTN seems more reliable than ATTR{MINOR}/$minor, because more subdevices pop up) | |
| # - to grab a serial is supposed to be: udevadm info -a /dev/sdb | grep 'ATTRS{serial}' | head -n 1 | |
| # - this hasn't really been working for us; the serial returned isn't always what I get | |
| # - but this is the same as ENV{ID_SERIAL_SHORT}: smartctl -i /dev/sdb | grep Serial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/rsyslog.d/10-noisy.conf | |
| # filter out some noisy messages | |
| # most software doesn't set $syslogtag, so you need to look for the identifier in the message. | |
| # the problems here are baffling: | |
| # - for reasons unknown, the message often starts with a space, though not necessarily | |
| # - this makes it cumbersome to impossible to rely on `starts_with` | |
| # - regexpes are significantly slower | |
| # - `contains` is slower than `starts_with`, and may give false positives | |
| # - the `ltrim()` function can't easily be applied to an action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this will generate entries like: | |
| # info.daemon 2022-09-02T00:27:39.198142+02:00 umbral:systemd[1]: Starting System Logging Service... | |
| # info.syslog 2022-09-02T00:27:39.238310+02:00 umbral:rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.2001.0] | |
| # - contrary to default template, you get priority (warn, info, debug...) as well as software-specific tag | |
| # - timestamp in standard rfc3339 format, greppable, sed/awkable, sortable, with high time precision and timezone | |
| # - tabs may take more space but today's monitors are big and the terminal scrolls, | |
| # - and tsv is handy to process with cut(1), easy to sed, and you can just pipe to `xsel -b` and paste in any spreadsheet. | |
| template (name="precise-tsv" type="list") { |
OlderNewer