Re: checking if an interface went down
From: Nicholas Bachmann (nabachmann@yahoo.com)Date: 02/23/02
- Next message: Jeffrey Siegal: "Re: Microsoft finally acknowledges the security drumbeats"
- Previous message: Philip J. Koenig: "Re: Microsoft finally acknowledges the security drumbeats"
- In reply to: hHG: "checking if an interface went down"
- Next in thread: Nicholas Bachmann: "Re: checking if an interface went down"
- Reply: Nicholas Bachmann: "Re: checking if an interface went down"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Nicholas Bachmann <nabachmann@yahoo.com> Date: Sat, 23 Feb 2002 00:09:30 GMT
hHG wrote:
> Does anyone know of any scripts that tests every few minutes whether or not
> one of your interfaces went down (Network Administration scripts)? Any help
> would be appreciated.....jdd
Note that I tested this for all of 30 seconds.
#!/bin/sh
# Interface checker by Nick Bachmann
if [ ! $1 ]
then
echo "Quick interface checker"
echo 'Nicholas Bachmann <nabachmann@yahoo.com>'
echo
echo 'Usage: ./inckr <int1> <int2> <int3> etc.'
echo
exit 1
fi
while true
do
for int in $@
do
/sbin/ifconfig $int &>/dev/null || echo "$int is down `date`" |mail root
done
sleep 3m
done
--
Regards,
N
+-----------------------------------------------+
+ Nicholas Bachmann <nabachmann@yahoo.com> +
+ "Finally, no security considerations are made +
+ with respect to the fact that over the course +
+ of infinite time, monkeys may evolve" +
+ -RFC 2795 +
+-----------------------------------------------+
- Next message: Jeffrey Siegal: "Re: Microsoft finally acknowledges the security drumbeats"
- Previous message: Philip J. Koenig: "Re: Microsoft finally acknowledges the security drumbeats"
- In reply to: hHG: "checking if an interface went down"
- Next in thread: Nicholas Bachmann: "Re: checking if an interface went down"
- Reply: Nicholas Bachmann: "Re: checking if an interface went down"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|