Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Today minecraft was down at exactly the moment when I wanted to take a break from studying for my finals. A harrowing experience! So I thought I would procrastinate a bit by writing a script that would ping minecraft.net every minute, and launch minecraft for me as soon as things were back to normal. As a proof of concept I ran ping -i 60 -f www.minecraft.net for a while and observed the output. That command sends a ping every 60 seconds (-f is the 'flood ping' option on my system).

Then it occurred to me: is this OK? I grepped about the man pages, and googled around the interweb, but aside from one illustrated book for children I could find no good advice for how to ping politely.

So I put it to you, gentle super users: what are some general guidelines for using ping politely? Is there a permissible interval for using ping -f?

share|improve this question
25  
There was a childrens book on pinging? –  ekaj Dec 2 '12 at 0:47
    
Sounds like the kind of thing that should be made readily available. –  WindowsEscapist Dec 2 '12 at 0:54
1  
I doubt that pinging more than once a second is useful as the ping time is unlikely to change so fast that wouldn't notice it at least over the internet while ping flooding does have some use on local networks where it can be used to measure delay in cables where the variance is magnitudes smaller. –  Dan D. Dec 2 '12 at 1:27
11  
@ekaj - A Story About Ping - Read the first Customer Review –  Ex Umbris Dec 2 '12 at 7:51
3  
@ExUmbris you get the bonus points! –  Ziggy Dec 2 '12 at 18:17

3 Answers 3

up vote 17 down vote accepted

Sending a ping once every 60 seconds is hardly a DoS. In fact, the traffic that you generate to the servers of an online game simply by playing far outweigh a simple ping once per minute. Even if everybody who wants to connect to play were to do that, it would still be less than if they all were actively playing.

Why did you choose to use the flood mode? If you remove that, then you are perfectly fine sending a ping once per minute (or even per 30 seconds since it is only a single packet once in a while).

Just make sure that you code your script so that the pinging stops once you have connected.

share|improve this answer
4  
I set -f because it produces pretty output: a '.' when the ping is dropped, and a '<backspace>' when there is a response. If I were to write the full script I wouldn't set the flood flag, that was just for inspecting. –  Ziggy Dec 2 '12 at 1:31
    
great minds think alike. –  peelman Dec 2 '12 at 1:32
    
@Ziggy, ah, then yes, you should be fine with such a low output. –  Synetech Dec 2 '12 at 1:39
    
Oh man you guys are tied! I can't decide! –  Ziggy Dec 2 '12 at 18:19

The permissible interval for a ping is the default of one second. Increasing that to an interval of two seconds would make the user twice as nice. At a ten second interval, you'd be five-hundred-and-twelve times more polite than the average ping user, which is probably as high a tidemark of etiquette as any of us can hope to reach.

I figure that if the once a second interval was acceptable some 30 years ago when the program became popular, it certainly is acceptable today because the capacity of the network has increased.

share|improve this answer
    
Excellent and elegant. –  Ziggy Mar 2 '13 at 3:54

In the grand scheme of things, no; there is no etiquette. You can blast out ICMP to your heart's content and no ill should come of it. Certainly sending one ping every minute would be perfectly acceptable, especially when you consider the amount of traffic typically going to that particular address.

ICMP is pretty paltry in terms of usage, both bandwidth and resources necessary for a response, so as long as you're not systematically organizing hundreds of thousands of machines to all ping the same box(es) at the same time, you aren't violating any unwritten rules of the interwebs.

share|improve this answer
    
Indeed. ☺ I just got distracted with another question. (If I can peel myself away, I would get back to the movie I’m in the middle of. :-D) –  Synetech Dec 2 '12 at 1:39
    
Oh man you guys are tied! I can't decide! –  Ziggy Dec 2 '12 at 18:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.