View Full Version : Ping
I need some help regarding checking multiple hosts at the same time if they are active or not. If I have many IP address's and I want to check I use ping command one by one. Is it possible to write a script to check all of them at once? :hmm:
Kamakazy 27-08-06, 04:24 PM i faces the same issue, but never thought of sending a mass ping...
if all the IPs are in the same network, they would have the same start e.g 192.168.0.xxx... so all you need to do is type the first one, then press the up arrow on the keyboard and you could change the last digits...
Yes am doing the same thing. But if I have like 20 nodes it's annoying!
DeSerTDesTroYeR 27-08-06, 05:06 PM I found several tools that do multiple IP pings:
1- Fping (http://www.kwakkelflap.com/files/fping216.zip), but it is a command line tool.
2- IPNetInfo (http://www.snapfiles.com/php/download.php?id=108444&a=7114139&tag=48489&loc=1) This tool looks like what you would find useful to use. It has a simple graphic interface and you can simply copy/paste or type the IPs you want to ping.
Professor 27-08-06, 10:40 PM lol .. just 3 month back one of my friend asked me about it ,,, he wanted something simple so i came up with a simple script..
just create a bat file.. in the file use the following syntax :D
@start ping -t (ip address)
if u have more than 1 address then u should add another line .. it will open dos windows depending on the number of ips u want to check
the file should look like this
------------
@start ping -t www.google.com
@start ping -t www.englishsabla.com
@start ping -t 192.168.1.1
------------
i have attached a sample file :D
Thanks DD, the 2nd tool (IPNetInfo) is very useful and simple to use. :)
Professor, thanks for the basic idea but it's not very practical because it will open many windows.
Professor 27-08-06, 11:13 PM ^^ ur welcome :D
Professor it's better with -i (Time To Live) option because it kills the window automatically, but still too many black winodws. BTW I tried to put 4 IP address's without the -t option and the PC went like crazy opening like 100 windows :D. Then freezed!
About the IPNetInfo, I think it doesn't check the node physically like ping is doing, it only gets the details of the IP address from WHOIS server and if you have proxey I don't think it will work also. So I've changed my mind about this tool :rolleyes:.
Professor 28-08-06, 01:41 PM ^^ I will try to build u a vb program that will do the job once i reach home ..
for the time being ... enjoy the script :D
yeah ... do u want it to ping continuosly or ping after a certin time like every 5 min.. btw how many ip do u want to check .. if it has the same ip except for last part (192.168.1.xxx) i can make it so u dont have to enter all the ip ,, just select the range :D
I want it in this format:
192.168.XXX.XXX ;)
Shinoda LP 28-08-06, 07:07 PM Write up a perl script to automate checking ping status of multiple hosts. Customize the error messages and append them to a log file, so after you're done executing your script, you could just open the log file and see line by line as to which hosts are active and which aren't.
Professor 29-08-06, 12:45 AM I created the program ,, needs abit of work but it will do the job :D
only problem is when applying for multiple ping it dosnt display the result instintly .. so if u ping 100 ip u will have to wait 2-4 min till u get the results ..
might work on that issue later ,, dont have much free time..
if u would like me to modify or add new things let me know :D
i will add the source file later .. once im totally satisfied with the program
Professor 29-08-06, 01:34 AM here is a screen shot :D
http://i3.photobucket.com/albums/y70/Bermuda77/icetea-ping.jpg
Great work Profesor :D
Sometimes the IP addresses are not in order (so the range option won't be useful), if it's possible to make the IP address field to accept more than one address in it, that will be good.
Professor 29-08-06, 03:30 PM ^^ thanks :D
I guess i should add an option where u can load/save an ip list..
will start working on it soon..
Professor 29-08-06, 09:02 PM ok i have completed modifing it...
now u can enter the ip in that big text box manually or use the range thingy to enter a range of ips ... and under file menu .. u can save the list then load it later :D
waiting for ur feed back :D
let me know if u would like me to add or modify the program even further. but might charge u after that :p
Excellent, I tried it and it works perfectly ;)
I would like you to add one additional thing:
The 3rd column is free, I would like to use it to give a description for each IP. So there will be 3 columns now IP, Status and Description (which I can use it to enter node name manually).
BTW, how many times it pings each IP address?
It really made my life easy, thanx Professor and you desereve a rep point from me worth 305 rials :D.
Shinoda LP 30-08-06, 06:17 PM ^ What about me who actually suggested writing a program for it? :(
Professor 30-08-06, 09:07 PM ^^ i suggested writing the program ,,,
Excellent, I tried it and it works perfectly ;)
I would like you to add one additional thing:
The 3rd column is free, I would like to use it to give a description for each IP. So there will be 3 columns now IP, Status and Description (which I can use it to enter node name manually).
BTW, how many times it pings each IP address?
It really made my life easy, thanx Professor and you desereve a rep point from me worth 305 rials :D.
ur welcome .. and thanks for the rep :D
well about the 3rd column might try working on it this weekend if i get the time.
yeah i think i can make the program check the ping like every 30 min and incase there is a problem with the host, it will send u an sms to ur phone.
the program only pings once and it has a timeout interval of 500 milliseconds.. i can give u an option to change the timeout
SLP, thanks for the suggestion.
Professor, I don't think it's required to send sms to my mobile unless you want to flood my inbox :D
Anyway, the program as it's now do the job which I needed, thanx again.
|
|