- 내부접속, 외부접속 구분하여 카운트
--------------------------------------------------------------
#!/bin/sh
while true;
do
date=`date '+%Y-%m-%d %H:%M:%S'`
totCnt80I=`netstat -na | grep 192.168.12.133.80 | wc -l`
totCnt80O=`netstat -na | grep 192.41.260.167.80 | wc -l`
totCnt=`expr $totCnt80I + $totCnt80O`
estCnt80I=`netstat -na | grep 192.168.12.133.80 | grep EST | wc -l`
estCnt80O=`netstat -na | grep 192.41.260.167.80 | grep EST | wc -l`
estCnt=`expr $estCnt80I + $estCnt80O`
totCntDB=`netstat -na | grep 192.168.12.118.1521 | wc -l`
estCntDB=`netstat -na | grep 192.168.12.118.1521 | grep EST | wc -l`
echo "${date} => TOTAL : ${estCnt} / ${totCnt}, IN : ${estCnt80I} / ${totCnt80I}, OUT : ${estCnt80O} / ${totCnt80O}, DB : ${estCntDB} / ${totCntDB}"
sleep 1;
done
접속 카운트 스크립트
|
2016.07.06 17:54:18
|
2020.05.05 02:06:55
|
349
|
Aiden
Total of Attached file
0.00 Bytes of 0 files
2016.11.30
2016.11.17
2016.10.08
2016.10.08
2016.10.08
2016.07.06
2014.05.16
2011.02.25
2010.11.03
2010.09.29
2010.09.02