罪と罰++二律背反
netstat
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
] [
リンク元
]
開始行:
[[WEBチューニング]]
#!/bin/sh
DATE=`date +%m%d%H%M`
BASE="/var/log"
TIME="4320"
SLEEP="20"
CNT="0"
cd $BASE
until [ $CNT -eq $TIME ]
do
CDATE=`date +%H:%M:%S`
COMO1=`netstat -an | grep IPaddress:80 | wc -l`
COMO2=`netstat -an | grep IPaddress:80 | grep EST | wc...
COMO3=`ps -f | grep httpd | wc -l`
echo "http ,$CDATE, $COMO1" >> $BASE/ses_$DATE.log
echo "http(EST) ,$CDATE, $COMO2" >> $BASE/ses_$DATE.log
echo "http(PRC) ,$CDATE, $COMO3" >> $BASE/ses_$DATE.log
sleep $SLEEP
CNT=`expr $CNT + 1`
done
exit
終了行:
[[WEBチューニング]]
#!/bin/sh
DATE=`date +%m%d%H%M`
BASE="/var/log"
TIME="4320"
SLEEP="20"
CNT="0"
cd $BASE
until [ $CNT -eq $TIME ]
do
CDATE=`date +%H:%M:%S`
COMO1=`netstat -an | grep IPaddress:80 | wc -l`
COMO2=`netstat -an | grep IPaddress:80 | grep EST | wc...
COMO3=`ps -f | grep httpd | wc -l`
echo "http ,$CDATE, $COMO1" >> $BASE/ses_$DATE.log
echo "http(EST) ,$CDATE, $COMO2" >> $BASE/ses_$DATE.log
echo "http(PRC) ,$CDATE, $COMO3" >> $BASE/ses_$DATE.log
sleep $SLEEP
CNT=`expr $CNT + 1`
done
exit
ページ名: