webserver statistik auswerten
This commit is contained in:
parent
91e73a0f9d
commit
5995a8775b
2 changed files with 38 additions and 8 deletions
26
spielspass/logkosmetik-server.sh
Executable file
26
spielspass/logkosmetik-server.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
#DATE=`date '+%Y-%m'`
|
||||
DATE=`date -d '1 month ago' '+%Y-%m'`
|
||||
SRC="/var/log/apache/access-${DATE}.log"
|
||||
DST_SAO="/tmp/access-${DATE}_sao.log.shrunk"
|
||||
DST_SOBI="/tmp/access-${DATE}_sobi.log.shrunk"
|
||||
|
||||
nice -n 10 cat ${SRC} | grep "webproxy pound" | grep "systemausfall.org" > ${DST_SAO}
|
||||
[ -e ${DST_SAO}.gz ] && rm ${DST_SAO}.gz
|
||||
gzip ${DST_SAO}
|
||||
|
||||
nice -n 10 cat ${SRC} | grep "webproxy pound" | grep "soziale-bildung.org" > ${DST_SAO}
|
||||
[ -e ${DST_SAO}.gz ] && rm ${DST_SAO}.gz
|
||||
gzip ${DST_SAO}
|
||||
|
||||
|
||||
## we have no mailservice at all
|
||||
#MAILBODY="scp uml-webproxy@systemausfall.org:/var/log/access.log.now.gz . && \n gunzip access.log.now && \n visitors -A -m 30 access.log.now --prefix systemausfall.org -o html > report-${DATE}.html"
|
||||
#echo $MAILBODY > /tmp/foo
|
||||
#mutt -n -F /dev/null -s "access.log" age < /tmp/foo
|
||||
#rm $SRC
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue