[Support] Downloads zählen
Paul Hink
email at p-hink.de
Thu Dec 6 15:44:33 CET 2007
Christian Günter <hostsharing at webowl.de> wrote:
> > Kann man sich das cron-mäßig täglich oder wöchentlich als email
> > schicken lassen?
>
> Bsp.: "datei" mit x Rechten
>
> # Auswertung und per Mail zusenden
>
> cat ~/var/web.log-yesterday |egrep -i '"GET /(.*\.htm) HTTP/1.1"' |egrep
> -vi '(googlebot|slurp|msnbot)' |wc -l > ~/zahl.txt
> mpack -s "Zahl Aufrufe" -d ~/zahl.txt ~/zahl.txt email at example.com
> rm -f ~/zahl.txt
Etwas simpler:
egrep -i '"GET /(.*\.htm) HTTP/1.1"' ~/var/web.log-yesterday | \
egrep -c -vi '(googlebot|slurp|msnbot)' | \
mail -s "Zahl Aufrufe" email at example.com
> im crontab dann "datei" aufrufen
Aber bitte mit Pfad, sonst findet der Cron-Daemon die i.d.R. nicht.
Paul
More information about the Support
mailing list