baumi's blog

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

Know-How / Wissenswertes

SSH port forwarding: local + remote

local port forwarding – on the source machine: ssh t1.t2.t3.t4 -p tport -L :: remote port forwarding – on the target machine: ssh s1.s2.s3.s4 -p aport -R :127.0.0.1: ssh s1.s2.s3.s4 -p aport -R :: https://www.taos.com/advanced-ssh-tunneling/

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