martes, junio 13, 2006

Monitoreando squid en linea

Este script monitorea las entradas del access.log.

# Script RELAT
#tail -f /var/log/squid/access.log > /dev/tty9 &
if [ "$1" = "ip" ]; then
echo $2
tail -f /var/log/squid/access.log | grep $2 | awk '{ printf "%12s %-67s\n", $3, $7}'
else
tail -f /var/log/squid/access.log |awk '{ printf "%12s %-68s\n", $3, $7}'
fi

No hay comentarios.: