jreardon Posted June 9, 2010 Posted June 9, 2010 I am having a problem with a network that seems to be going down on the internal side. It has been very hard to troubleshoot so far. I have verified that it is not a problem with the ISP. I am about to attempt to write a script that will do the following: Ping an IP, echo the current time, and write both to a log file. That being said, I am a complete noob and welcome any help and or suggestions.
evilertoaster Posted June 9, 2010 Posted June 9, 2010 I'd usually ignore "write my script" requests, but in this case you may not have realized how trivial this is: FileWriteLine("OutputFile.txt","Ping Result- "&Ping("127.0.0.1")&" At- "&@Hour&":"&@MIN&":"&@SEC&":"&@MSEC)
jreardon Posted June 9, 2010 Author Posted June 9, 2010 No, I am just that inexperienced. My script went like this: #Include <Date.au3> _Date_Time_GetLocalTime() $logfile = "C:\Pinglog.txt" While 1=1 $SRV3 = Ping("www.google.com") $tCur = _Date_Time_GetLocalTime() FileWrite($logfile, "Ping response time: " & $SRV3 & $tCur & @CRLF) WEnd This would actually have worked for me, though I am still having problems getting the time to write.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now