On Thu, Apr 27, 2006 at 01:36:00PM -0400, Will H. Backman wrote: > Anyone running interesting sensorsd.conf files that they would like to > share with the list? > I don't see a lot of examples out there. > What actions are you having sensord performs? Are most people just > sending to syslog and using something else to notify you of alerts?
craziest i've gotten with it thus far is adding the following to daily.local: ---- LOGFILE=/var/log/sensorsd YESTERDAY="$( date -r $(( $(date '+%s') - (3600*3) )) '+%h %e' )" TODAY="$( date '+%h %e' )" if [ -r ${LOGFILE}.0.gz ]; then zegrep "^(${YESTERDAY:?}|${TODAY:?})" ${LOGFILE}.0.gz elif [ -r /var/log/messages.0.gz ]; then zegrep "^(${YESTERDAY:?}|${TODAY:?}).*[[:blank:]]sensorsd\[[0-9][0-9]*\]:" \ /var/log/messages.0.gz else echo "unable to read <logfile>.0.gz" fi if [ -r ${LOGFILE} ]; then egrep "^(${YESTERDAY:?}|${TODAY:?})" ${LOGFILE} elif [ -r /var/log/messages ]; then egrep "^(${YESTERDAY:?}|${TODAY:?}).*[[:blank:]]sensorsd\[[0-9][0-9]*\]:" \ /var/log/messages else echo "unable to read <logfile>" fi unset LOGFILE YESTERDAY TODAY ---- logfile is rotated by newsyslog based on size, not date -- jared [ openbsd 3.9-current GENERIC ( mar 15 ) // i386 ]