/ アパッチのログで...

アパッチのログで...

#!/bin/sh

today=`LANG=c date +"%d/%h/%Y"`
echo $today
cat /var/log/httpd/access_log | awk '{print $7}' > /var/tmp/a-log3
cat /var/log/httpd/access_log | grep $today | awk '{print $1}' | \
sed 's/^/\dig -x /g' > /var/tmp/a-log1
chmod 744 /var/tmp/a-log1

/var/tmp/a-log1 > /var/tmp/a-log2
grep PTR /var/tmp/a-log2 | awk '{print $5}' | grep "." > /var/tmp/a-log4
paste -d: /var/tmp/a-log4 /var/tmp/a-log3 | sed '/^:/d' | sed 's/:/ /g' | \
grep -v localhost

rm -f /var/tmp/a-log*

— posted by 管理人 at 11:27 pm   pingTrackBack [0]

この記事に対するコメントはありません

<< 2006.6 >>
SMTWTFS
    1 23
4567 8 9 10
11 12 13141516 17
18 19 2021 222324
25 26 272829 30 
 
























T: Y: ALL: Online:
ThemePanel
Created in 0.2811 sec.