Internet Connection "Recorder" prog?

Da Mail Man

Active Member
......thanks for the reply....i just got back to this!..i will check these programs out however, i don't really need to know what programs are going in and out, i just need to log when my internet connection to my broadband service provider goes out........(i think brianmay gave up)...:D
 

Da Mail Man

Active Member
......thanks for the reply....i just got back to this!..i will check these programs out however, i don't really need to know what programs are going in and out, i just need to log when my internet connection to my broadband service provider goes out........(i think brianmay gave up)...:D

*****2 weeks+ ...i think he gave up!......
 

brian

VIP Member
sorry :D. yeah. i know the commands to linux but i dont think there is any way of translating it to windows
 

Cromewell

Administrator
Staff member
I could do this in perl or linux in about 5 minutes..trying to work just with a windows batch file is annoying :p

I might figure something out, I've got a while before I can go home and nothing to do
 

Cromewell

Administrator
Staff member
I think this is what you need...something close anyway. My head hurts :p

The ping at the end is just a cheap way to wait a minute without needing any extra programs.

It's batch file code, so you just need to dump it into a text file and name it something.bat and then it's runnable.
Code:
setlocal

set connection=up

@echo off

:top

if %connection% == down goto :down

ping google.com -n 1 | find "Request" > nul

if errorlevel 1 goto :endif
set connection=down
date /t
time /t
echo Connection down

goto :end
:endif

:down

ping google.com -n 1 | find "Reply" > nul

if errorlevel 1 goto :endif2
set connection=up
date /t
time /t
echo Connection up
:endif2

:end
ping 1.1.1.1 -n 1 - w 60000

goto :top

endlocal
 

brian

VIP Member
hehe. missed something.
Code:
setlocal

set connection=up

@echo off

:top

if %connection% == down goto :down

ping google.com -n 1 | find "Request" > nul

if errorlevel 1 goto :endif
set connection=down
echo ########## >> %USERPROFILE%\Documents\Internet.txt
echo date /t >> %USERPROFILE%\Documents\Internet.txt
echo time /t >> %USERPROFILE%\Documents\Internet.txt
echo Connection down >> %USERPROFILE%\Documents\Internet.txt

goto :end
:endif

:down

ping google.com -n 1 | find "Reply" > nul

if errorlevel 1 goto :endif2
set connection=up
echo ########## >> %USERPROFILE%\Documents\Internet.txt
echo date /t >> %USERPROFILE%\Documents\Internet.txt
echo time /t >> %USERPROFILE%\Documents\Internet.txt
echo Connection up >> %USERPROFILE%\Documents\Internet.txt
:endif2

:end
ping 1.1.1.1 -n 1 - w 60000

goto :top

endlocal

there it will write everythign to a file and not the term
 

Cromewell

Administrator
Staff member
Yah I suppose that's a better idea I suppose. I'm not entirely sure if the ping piped to find will work, I didn't really test it :p
 
Top