httpd-error is a shell script which print a summary about

Web files which does not exists on your host.

E.g.

	httpd-error -userhits < /var/log/httpd-error.log

print the number of errors by users, sorted by error hits.
This commit is contained in:
Wolfram Schneider 1998-02-15 18:54:26 +00:00
parent ae74588799
commit 40d75fab43
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33410
2 changed files with 41 additions and 0 deletions

View File

@ -7,3 +7,4 @@ the integrity.
Please make a subdir per program, and add a brief description to this file.
ac check if the FreeBSD handbook is in sync with the committers list
httpd-error check for Web files which does not exists on your host

View File

@ -0,0 +1,40 @@
#!/bin/sh
# Copyright (c) 1998 by Wolfram Schneider <wosch@FreeBSD.org>, Berlin.
# <insert BSD Licence>
#
# httpd-error - check for Web files which does not exists on your host
#
# $Id$
mode=${1}
case "$mode" in
-host)
grep 'File does not exist$' |
awk '{print $11}' |
sort | uniq -c | sort -nr | perl -npe 's/,$//'
;;
-filehits)
grep 'File does not exist$' |
awk '{print $8}' |
sort | uniq -c | sort -nr
;;
-user)
grep 'File does not exist$' |
awk '{print $8}' |
sort | uniq -c | sort +1
;;
-userhits)
grep 'File does not exist$' |
awk '{print $8}' | sort |
perl -npe 's#/home/([^/]+)/public_html.*#/~$1/#;
s#/usr/local/www/data/.*#/usr/local/www/data/#' |
uniq -c | sort -nr
;;
*) echo 'usage $0 {-host|-filehits|-user|-userhits} < error.log' >&2
exit 1
;;
esac