more listpg.sh
#!/bin/bash
i=1
while(( $i<61 ))
do
send=`date '+%Y-%m-%d %H:%M:%S'`
conn=`ps -ef |grep postgres |wc -l`
echo $send $conn >> /tmp/pgconn.log
let "i++"
sleep 10
done
#!/bin/bash
i=1
while(( $i<61 ))
do
send=`date '+%Y-%m-%d %H:%M:%S'`
conn=`ps -ef |grep postgres |wc -l`
echo $send $conn >> /tmp/pgconn.log
let "i++"
sleep 10
done
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/91975/viewspace-2124779/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/91975/viewspace-2124779/