baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

Know-How / Wissenswertes

Golive realtime log analyzer on Debian

https://goaccess.io/ $ wget http://tar.goaccess.io/goaccess-1.2.tar.gz $ tar -xzvf goaccess-1.2.tar.gz $ cd goaccess-1.2/ $ sudo apt-get install libncursesw5-dev libgeoip-dev $ ./configure –enable-utf8 –enable-geoip=legacy $ make # make install # vi /usr/local/etc/goaccess.conf # goaccess /var/log/apache2/other_vhosts_access.log -o /home/frank/www/www.reports.com/htdocs/analyzer.html –real-time-html

Bash cron script for monitoring SMART health

#!/bin/bash echo >/tmp/smart for disk in /dev/sd[a-h] ; do echo -e -n “\n\n$disk – ” >> /tmp/smart smartctl -s on –all $disk | egrep “Power_On_Hours|Power_Cycle_Count|Reallocated_Sector_Ct|result” >> /tmp/smart 2>&1 done cat /tmp/smart cat /tmp/smart | /usr/bin/mail -E -s ‘SMART Report’ receiver@server.com

Previous Posts Next posts