Small Ping Program or Batch file needed.
#1
Posted 17 December 2003 - 08:01 PM
Is there any freeware out there that would do this for me, or would a batch file be the way to go with windows task manager.
It will be used from a Win2k System (SP4)
Thanks for your recommendations!
#2
Posted 17 December 2003 - 08:58 PM
Runs on Linux and I have been told Windows Machines.
#3
Posted 17 December 2003 - 10:54 PM
#4
Posted 17 December 2003 - 11:54 PM
ping -n 5 www.yahoo.com >> c:\log.txt
#5
Posted 18 December 2003 - 12:35 AM
ping -n 5 www.yahoo.com >> c:\log.txt
That was what I tried to begin with. Doesn't work. Just flashes the .bat on the screen for .2 seconds then closes. No ping is done, no log is created.
Thank you for your reply though.
#6
Posted 18 December 2003 - 05:56 AM
For example:
cmd.exe /c pingtest.bat
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
Note that multiple commands separated by the command separator '&&'
are accepted for string if surrounded by quotes. Also, for compatibility
reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the
same as /C. Any other switches are ignored.
If /C or /K is specified, then the remainder of the command line after
the switch is processed as a command line, where the following logic is
used to process quote (") characters:
1. If all of the following conditions are met, then quote characters
on the command line are preserved:
- no /S switch
- exactly two quote characters
- no special characters between the two quote characters,
where special is one of: &<>()@^|
- there are one or more whitespace characters between the
the two quote characters
- the string between the two quote characters is the name
of an executable file.
2. Otherwise, old behavior is to see if the first character is
a quote character and if so, strip the leading character and
remove the last quote character on the command line, preserving
any text after the last quote character.
That was from CMD /? at a cmd prompt, if you're curious. There's a lot more information there, too, but the majority of it was irrevelant in your case.
#7
Posted 18 December 2003 - 02:50 PM
ping -n 5 www.yahoo.com >> c:\log.txt
That was what I tried to begin with. Doesn't work. Just flashes the .bat on the screen for .2 seconds then closes. No ping is done, no log is created.
Thank you for your reply though.
Strange, it worked perfectly for me.
-bZj
#8
Posted 18 December 2003 - 04:52 PM
ping -n 5 www.yahoo.com >> c:\log.txt
That was what I tried to begin with. Doesn't work. Just flashes the .bat on the screen for .2 seconds then closes. No ping is done, no log is created.
Thank you for your reply though.
Strange, it worked perfectly for me.
-bZj
I found where my problem was. Now it's working as it should. Is there a way to timestamp the log?
#9
Posted 18 December 2003 - 04:55 PM
Let me know the exacts on it, sounds like you want an hourly counter & test of connection type of pinger... mine is not far from that & I could add a feature like that in pretty easy I think, bit of math on 1 minute timers work + a variable that acts as a counter for the number of hours to do ping checks in question.
It will be used from a Win2k System (SP4)
Thanks for your recommendations!
Yes, there might be... I can add that into my pinger pretty easy now that I think about it!
* Put it this way, there might be one... for Win32, & pretty soon! Good idea for another app of mine to modify to do that exact function!
APK
Yes an hourly counter to check if our server is online. It would be great if it could write the results to a log and have those results timestamped. If you find the time to do this, let me know!
#10
Posted 18 December 2003 - 07:13 PM
ping -n 5 www.yahoo.com >> c:\log.txt
That was what I tried to begin with. Doesn't work. Just flashes the .bat on the screen for .2 seconds then closes. No ping is done, no log is created.
Thank you for your reply though.
Strange, it worked perfectly for me.
-bZj
I found where my problem was. Now it's working as it should. Is there a way to timestamp the log?[/quote]
In your .bat file have the lines
echo --------------------------- echo %TIME% %DATE% >> c:\log.txt ping -n 5 www.yahoo.com >> c:\log.txt
That will give you the timestamp (in the format "11:26:24.88 Thu 12/18/2003") right above the ping results.
#11
Posted 18 December 2003 - 08:21 PM
lotus@prexar.com
#12
Posted 18 December 2003 - 09:10 PM
1034310 total minutes
(60 + 61 + 62 + 63 ... + 1430 + 1440)
Is this what you wanted APK?
#13
Posted 19 December 2003 - 02:39 AM
60
120
180
240
300
360
420
480
540
600
660
720
780
840
900
960
1020
1080
1140
1200
1260
1320
1380
1440
#14
Posted 19 December 2003 - 04:20 PM
#15
Posted 20 December 2003 - 07:40 PM
I've copied the APK Ping into the LeechMeNow folder. Have fun
#16
Posted 23 December 2003 - 07:05 PM
I have a couple idea's for you, not sure how easy it would be to implement them.
I'll test it for another day or so, then give you my thoughts. But so far so good!
Thanks for doing it so quick!
#17
Posted 23 December 2003 - 09:03 PM
So far the one thing I noticed (bug related?) is that when I minimize and hide screen, the names of the icons on the desktop hide as well =) Easily brought back by clicking them. But still, thought you should know.
I would also like to see the program remeber IP address I recently pinged. I notice if I shut it down and the restart it, the IP defaults back to 127.0.0.1. Maybe even add a drop down menu for IP's/names you have pinged. It would be just a convenience option.
I'll give you more comments soon, got to get back to work!
Regards,
Scott / Lotus
#18
Posted 23 December 2003 - 10:40 PM
#19
Posted 23 December 2003 - 10:48 PM

Help










