tafil
ISP
- Jul 29, 2008
- 1
hi all,
i want to make a script that use the snoop command to check if there is traffic on port 123 ip address 10.*.*.* if they is traffic it is okay if not the script should send a e-mail.
I make this but i want to make it better.
Does anybody have any idea or any sample script?
This is what i did
if [ `snoop -c 50 -p 23 10.*.*.* 10.*.*.* | awk '/TELNET/ {print $8}'` ]
then
echo "OK"
else
echo "Is not working (send mail)"
fi
Thanks in advance
i want to make a script that use the snoop command to check if there is traffic on port 123 ip address 10.*.*.* if they is traffic it is okay if not the script should send a e-mail.
I make this but i want to make it better.
Does anybody have any idea or any sample script?
This is what i did
if [ `snoop -c 50 -p 23 10.*.*.* 10.*.*.* | awk '/TELNET/ {print $8}'` ]
then
echo "OK"
else
echo "Is not working (send mail)"
fi
Thanks in advance