Gary
Wed Dec 13 01:31:51 CST 2006
Actually I just discovered about using the -n 1 only a very short time ago
lol. Yeah it certainly is more than enough to see if a network pc is
connected isn't it.
Thanks.
"Richard Mueller" <rlmueller-NOSPAM@ameritech.NOSPAM.net> wrote in message
news:uX2tP7mHHHA.3952@TK2MSFTNGP02.phx.gbl...
> Gary wrote:
>
>> What's the best way to make a script that regularly checks to see if a
>> computer on the network is active and connected? I've been using a script
>> that does the simple ping cmd every 30 seconds, but I'd like something
>> proper and better.
>
> Seems like a ping would be best, as it imposes the least burden on the
> remote machine and the network. I use:
>
> ping -n 1 -w 500
>
> because I believe one ping with a 500 millisecond timeout should be
> sufficient for computers on the local lan. A longer timeout may be needed
> over a wan.
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab -
http://www.rlmueller.net
>