mirror of
https://github.com/apache/httpd.git
synced 2025-08-03 16:33:59 +00:00

Submitted By: Javier Fernandez-Sanguino Pen~a Reviewed By: Thom May git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125495 13f79535-47bb-0310-9956-ffa450edef68
22 lines
760 B
Bash
Executable File
22 lines
760 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# check_forensic <forensic log file>
|
|
|
|
# check the forensic log for requests that did not complete
|
|
# output the request log for each one
|
|
|
|
F=$1
|
|
|
|
all=`mktemp -t fcall.XXXXXX || tempfile --prefix=fcall` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
|
|
in=`mktemp -t fcin.XXXXXX || tempfile --prefix=fcin` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
|
|
out=`mktemp -t fcout.XXXXXX || tempfile --prefix=fcout` || { echo "$0: Cannot create temporary file" >&2; exit 1; }
|
|
trap "rm -f -- \"$all\" \"$in\" \"$out\";" 0 1 2 3 13 15
|
|
|
|
cut -f 1 -d '|' $F > $all
|
|
grep + < $all | cut -c2- | sort > $in
|
|
grep -- - < $all | cut -c2- | sort > $out
|
|
|
|
# use -i instead of -I for GNU xargs
|
|
join -v 1 $in $out | xargs -I xx egrep "^\\+xx" $F
|
|
exit 0
|