Re: checking if an interface went down
From: Nicholas Bachmann (nabachmann@yahoo.com)Date: 02/23/02
- Next message: Ross Oliver: "Re: dumb++ security"
- Previous message: Jeffrey Siegal: "Re: Microsoft finally acknowledges the security drumbeats"
- In reply to: 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:29:41 GMT
Nicholas Bachmann wrote:
> 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.
Which doesn't help. I made a small update to fix a big bug.
>
> #!/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
*should* be
/sbin/ifconfig | grep "$int" >/dev/null || echo "$int down `date`" |
mail root -s "Interface Down"
(all on one line)
> 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: Ross Oliver: "Re: dumb++ security"
- Previous message: Jeffrey Siegal: "Re: Microsoft finally acknowledges the security drumbeats"
- In reply to: Nicholas Bachmann: "Re: checking if an interface went down"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|