5 Experimental, system monitor and status (bar) reporter I use with
6 [dwm](https://dwm.suckless.org/) on GNU/Linux.
8 ![screenshot](screenshot.jpg)
15 parallel +----------+ +----------+ +----------+
16 stateless | sensor_1 | | sensor_2 | ... | sensor_n |
17 collectors +----------+ +----------+ +----------+
22 serial +-----------------------------------------+
23 stateful | controller |
24 observer +-----------------------------------------+
29 serial +-----------------------------------------+
30 stateless | actuator |
31 executor +-----------------------------------------+
42 By default, actuator is left disconnected from the controller's output, so if
43 desired - it needs to be manually attached when starting `khatus`. For example,
44 in my `.xinitrc` I have:
48 2> >($BIN/twrap.sh >> $HOME/var/log/khatus.log) \
49 | $BIN/khatus_actuator \
52 2> >($BIN/twrap.sh >> $HOME/var/log/khatus-actuator.log) \
56 (`twrap.sh` is a simple script which prefixes a timestamp to each line)
58 The idea is to later have multiple, (some more-general and some more-specific)
59 actuators which can be selected as needed, say for example:
64 >(awk '/^STATUS_BAR/ {sub("^" $1 " *", ""); system("xsetroot -name \" " $0 " \"")}') \
65 >(grep '^REPORT' | actuate_report_to_email) \
66 >(grep '^ALERT' | grep mpd | actuate_alert_to_email) \
67 >(grep '^ALERT' | grep IntrusionAttempt | actuate_intruder_to_iptables_drop) \
68 >(grep '^ALERT' | grep NewDevice | actuate_alert_to_notify_send)
69 >(grep '^ALERT' | grep DiskError | actuate_call_mom)
72 ... and/or any other such fun you might imagine.
75 Any errors encountered by any sensor are propagated as alerts by the
76 controller, which are in turn actualized as desktop notifications by the
79 ![screenshot-self-error-propagation](screenshot-self-error-propagation.jpg)