[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Monitoring a network interface
From: |
Pavel Urban |
Subject: |
Re: Monitoring a network interface |
Date: |
Wed, 11 Aug 2004 19:45:58 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 |
You can use script like this one and do timestamp check.
address@hidden root]# cat x
#!/bin/bash
COUNT=3
HOST="192.168.3.2"
LIMIT=80
RESULT=`ping -c $COUNT -q $HOST | perl -ne '/\ (\d+)\%\ packet\ loss/ &&
print $1'`
if [ $RESULT -lt $LIMIT ] ; then
touch /var/flag.ping
fi
--
***********************************************************************
Pavel Urban (address@hidden)
GE system disaster
GE Capital, www.ge.cz
***********************************************************************
Vegetables should not operate electronic equipment.
Computer Stupidities, http://rinkworks.com/stupid/
***********************************************************************