Log network connection

  • Thread starter Thread starter cbielich
  • Start date Start date
C

cbielich

Basically is there a way to log the up or down stats of a net
connection? Actually I would like to log anything that happenes to it.
I think I am having down time on the nic card but I need to know for
sure before I start messing with anything
 
Basically is there a way to log the up or down stats of a net
connection? Actually I would like to log anything that happenes to it.
I think I am having down time on the nic card but I need to know for
sure before I start messing with anything>

You could use the Task Scheduler to run this task every
five minutes:

@echo off
set status=down
ping aaa.bbb.ccc.ddd | find /i "bytes=" && set status=up
echo %date% %time%: Net connection is %status% >> c:\test.log

where aaa.bbb.ccc.ddd is the address of your default gateway.
 
Nice info on this... but i would like to ask what would be the statement if i
want to
know monitor multiple ip addresses? say... 6 ip addresses at the same time...

thanks..
 
You could do this:

@echo off
echo Time stamp: %date% %time% >> c:\test.log
call :Sub 192.168.1.23
call :Sub 192.168.1.250
call :Sub 192.168.1.100
call :Sub 192.168.1.129
call :Sub 192.168.1.15
echo. >> c:\test.log
goto :eof

:Sub
set status=down
ping %1 | find /i "bytes=" && set status=up
echo %1 is %status% >> c:\test.log
 
Back
Top