Simplify conversion to human-readable units
[khome.git] / home / .xlaunch.d / 99-dmesg-notifier-error
CommitLineData
6db09847
SK
1#! /bin/bash
2
3set -e
4
1bce1dbc
SK
5DIR="$HOME/var/log/dmesg"
6FILE="$DIR/error.log"
7
8mkdir -p "$DIR"
6db09847 9sleep 3 # wait for dunst to hopefully restart
1bce1dbc
SK
10sudo dmesg --follow --level=emerg,alert,crit,err --since=now --ctime \
11| while read -r line
6db09847
SK
12 do
13 notify-send -u critical 'dmesg error' "$line"
1bce1dbc 14 echo "$line" >> "$FILE"
6db09847 15 done
This page took 0.031441 seconds and 4 git commands to generate.