How can I get the "-w deadline" option on flood ping changed?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How can I get the "-w deadline" option on flood ping changed?
For long latency circuits, using "ping -f -c xxxxx -l yyy -w 5" will give a receive count that is short. That is, ping will exit while packets are still in flight. The "-w deadline" option should be changed to honor "-c xxxx" packet count, and then stop transmitting pings, and wait "-w x" seconds for the stragglers to catch up.
Otherwise we cannot trust the "dropped packet count". They might not be dropped, just in transit when ping exits.
We use the flood option of ping to saturate a circuit. So we need the highest data rate we can generate. This is a good trick to find duplex mis-matches, faulty hardware, etc. To do this we need an accurate sent/received count.
yes, the private version of ping that I changed some years ago and that I use does that.
However, what is happening with the official version of Linux ping, and some google searches verify this, is that with the "-w deadline" option enabled, the "-c count" option is ignored, and ping continues to generate pings beyond "count" until "-w deadline" times out.
So I think the intent of "-w deadline" was to stop transmitting pings at "-c count", wait "-w deadline" seconds to allow the stragglers to catch up, and provide an accurate ping sent/receive count.
But it basically is generating the old behavior that, I think, "-w deadline" was supposed to fix.
In my ping, when "-c count" completed, I started a 2 second timer, went to sleep and continued to receive pings, and at the 2 second timer alarm went into completion and exit.
That is what we need. How do we get the code changed? I have never submitted a change request for Linux code.
The ping tool in Linux, such as Fedora 15, work fine. The -w option work like, ping does not exit after count packet are sent, it waits either for deadline expire or until count probes are answered.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.