Lines 38-64
Link Here
|
38 |
echo 'graph_vlabel Daily Virus Types' |
38 |
echo 'graph_vlabel Daily Virus Types' |
39 |
echo 'graph_category Mail' |
39 |
echo 'graph_category Mail' |
40 |
grep "`date +%d\ %b\ %Y`" $LOG0 $LOG1 > /tmp/q$$ |
40 |
grep "`date +%d\ %b\ %Y`" $LOG0 $LOG1 | \ |
41 |
egrep -v 'Disallowed characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' /tmp/q$$ > /tmp/q2$$ |
41 |
grep -v 'Disallowed characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' | \ |
42 |
sed 's/clamdscan.*$//' /tmp/q2$$ | sed 's/[ \t]*$//' > /tmp/q$$ |
42 |
sed 's/clamdscan.*$//' | sed 's/[ \t]*$//' | \ |
43 |
cut -f 5 /tmp/q$$ | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read i; do |
43 |
cut -f 5 | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read i; do |
44 |
name=`echo $i | awk '{print $2}'`; |
44 |
name=`echo $i | awk '{print $2}'`; |
45 |
echo "$name.label $name" ; |
45 |
echo "$name.label $name" ; |
46 |
echo "'$name.draw LINE2"; |
46 |
echo "'$name.draw LINE2"; |
47 |
done |
47 |
done |
48 |
rm /tmp/q$$ /tmp/q2$$ |
|
|
49 |
|
48 |
|
50 |
exit 0 |
49 |
exit 0 |
51 |
fi |
50 |
fi |
52 |
|
51 |
|
53 |
grep "`date +%d\ %b\ %Y`" $LOG0 $LOG1 > /tmp/q$$ |
52 |
grep "`date +%d\ %b\ %Y`" $LOG0 $LOG1 | \ |
54 |
egrep -v 'Disallowed characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' /tmp/q$$ > /tmp/q2$$ |
53 |
egrep -v 'Disallowed characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' | \ |
55 |
sed 's/clamdscan.*$//' /tmp/q2$$ | sed 's/[ \t]*$//' > /tmp/q$$ |
54 |
sed 's/clamdscan.*$//' | sed 's/[ \t]*$//' | \ |
56 |
|
55 |
cut -f 5 | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read i; do |
57 |
#awk '{ print $NF }' /tmp/q$$ | sort | uniq -c | sed 's/\./_/g' | while read i; do |
56 |
name=`echo $i | awk '{print $2}'`; |
58 |
cut -f 5 /tmp/q$$ | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read i; do |
57 |
printf "%s.value " $name; |
59 |
name=`echo $i | awk '{print $2}'`; |
58 |
echo $i | awk '{print $1}' |
60 |
printf "%s.value " $name; |
59 |
done |
61 |
echo $i | awk '{print $1}' |
|
|
62 |
done |
63 |
|
64 |
rm /tmp/q$$ /tmp/q2$$ |