5 ms·
What does the “pipe” value mean in the output of “ping”? (2009)
- olive247 3y agoOk cool, so basically pipe is the max number of requests that were in flight at one time. Nice.
- inanutshellus 3y agoI read it as "max number of times that more than one request was in flight at a time".
- Etrnl_President 3y agoThe internet is not a truck, it is more like a series of tubes.
- dr-detroit 3y ago[dead]
- deleted 3y ago[deleted]
- basicuser 3y ago> The “pipe” number is the maximum number of echo request packets that have been under way at one time, without having been answered by an echo reply packet (but did get answered in the end).
- seadan83 3y agoWhy call this a "pipe" number? Anyone know the etymology?
- ralph84 3y agoHow many requests are in the pipeline.
- richardwhiuk 3y agoMore "how many pipes are there between the client and server"
- adrianmonk 3y agoIt can't be that. If it were, changing the packet send rate would have no effect, but it does have an effect.
- richardwhiuk 3y agoIf you increase the send rate, you need more pipes to send the requests.
- justsomehnguy 3y agohttps://github.com/iputils/iputils/blob/ee0a515e74b8d39fbe9b68f3309f0cb2586ccdd4/ping/ping.h#L196 https://github.com/iputils/iputils/blob/ee0a515e74b8d39fbe9b... https://github.com/iputils/iputils/blob/ee0a515e74b8d39fbe9b68f3309f0cb2586ccdd4/ping/ping_common.c#L923C2-L923C2 https://github.com/iputils/iputils/blob/ee0a515e74b8d39fbe9b...
- majke 3y agoThanks Dan for reposting :) If you want more of this stuff, follow my twitter: https://twitter.com/majek04/status/1687023191506530304 https://twitter.com/majek04/status/1687023191506530304 Lately it seems I'm spending way too much time on ping. This is from last month: https://blog.cloudflare.com/the-day-my-ping-took-countermeasures/ https://blog.cloudflare.com/the-day-my-ping-took-countermeas...
- mananaysiempre 3y agoWait, can Linux not timestamp packets with the monotonic clock? Using wall time just feels wrong here.
- majke 3y agoYup! The details of Linux networking API are often surprising. I think if it's possible to change the ping algo to reduce the potential for wall clock change affecting the measurement. For example, instead of using SO_TIMESTAMP to measure wall clock diffed with the send time, maybe it's possible to grab the wall clock just before recv() and use wall clock to measure the event-loop time only (which is way shorter than the ping rtt).
- deleted 3y ago[deleted]
- slavabobik 3y agoDoes anyone have a link to a place in ping source code which describes that behaviour?
- johnnny 3y agoTry:: $ dpkg -S /bin/ping iputils-ping: /bin/ping $ grep 'downloaded from' /usr/share/doc/iputils-ping/copyright It was downloaded from https://github.com/iputils/iputils $ git clone https://github.com/iputils/iputils ... $ cd iputils/ping Then a bit of looking around shows that in acknowledge() (an inline helper defined in ping.h), pipesize records the largest difference between the sequence number of the (last) outbound probe and than the sequence number of the inbound probe we're receiving. That function is called from gather_statistics() (for the happy path) and in a couple of other locations when receiving an ICMP error.
- easton 3y agoCool trick! For anyone who isn't conveniently on Linux: https://github.com/iputils/iputils/blob/master/ping/ping.h#L352 https://github.com/iputils/iputils/blob/master/ping/ping.h#L...
- Anthony-G 3y agoThanks for that. I like how you not only give us this particular fish but show how to catch other fish. Edit: for those whose first language is not English, I’m referring to https://en.wiktionary.org/wiki/give_a_man_a_fish_and_you_feed_him_for_a_day;_teach_a_man_to_fish_and_you_feed_him_for_a_lifetime https://en.wiktionary.org/wiki/give_a_man_a_fish_and_you_fee...
- mananaysiempre 3y agoOn Arch Linux, use $ pacman -Qqo $(which ping) # -Qqo is --query --quiet --own iputils $ asp export iputils && cd iputils $ # see PKGBUILD for URLs, or if you just want to have a look: $ gpg --import keys/pgp/*.asc # or pass --skippgpcheck to makepkg below $ makepkg -od && cd src # -od is --nobuild --nodeps On NixOS with the new-style CLI, using $ nix eval nixpkgs#iputils.src.url "https://github.com/iputils/iputils/archive/20221126.tar.gz" for the second step usually works, although I don’t know how to figure out the package name reliably (ls -l will usually point you in the right direction, but for ping it just gives you the wrapper).
- jesprenj 3y agoIs a similar thing called a window in TCP?
- majke 3y agomore like "inflight"
- slowhand09 3y agoI followed the example from my MacBookPro (Big Sur 11.7.09) using terminal. It would not allow me to spec an interval under 0.1. $ ping -c 4 -i 0.1 218.101.61.162 PING 218.101.61.162 (218.101.61.162): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 64 bytes from 218.101.61.162: icmp_seq=0 ttl=54 time=212.910 ms 64 bytes from 218.101.61.162: icmp_seq=1 ttl=54 time=201.219 ms 64 bytes from 218.101.61.162: icmp_seq=2 ttl=54 time=204.627 ms 64 bytes from 218.101.61.162: icmp_seq=3 ttl=54 time=203.737 ms --- 218.101.61.162 ping statistics --- 4 packets transmitted, 4 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 201.219/205.623/212.910/4.389 ms $ ping -c 4 -i 0.09 218.101.61.162 ping: -i interval too short: Operation not permitted
- TheKitchenSinc 3y agoI believe you need escalated privileges (I don’t know which capability, specifically) for intervals under a certain point. The author was running as root.
- johnnny 3y agot's a limitation imposed by the ping programme itself, it'll refuse to use very short intervals if you're not root. This is documented in the man page. Or, use the source, Luke: https://github.com/apple-oss-distributions/network_cmds/blob/795d19665f96d474a0b5c9f7a5cf80d65911f1c1/ping.tproj/ping.c#L425 https://github.com/apple-oss-distributions/network_cmds/blob... case 'i': /* wait between sending packets */ t = strtod(optarg, &ep) * 1000.0; if (*ep || ep == optarg || t > (double)INT_MAX) errx(EX_USAGE, "invalid timing interval: `%s'", optarg); options |= F_INTERVAL; interval = (int)t; if (uid && interval < 100) { errno = EPERM; err(EX_NOPERM, "-i interval too short"); } break; And if you keep looking, Apple's version of ping keeps track of the number of sent and received probes, but does not keep track of the largest difference between the sequence nubmer of sent and received probes, so it will not print the same "pipe" value as the iputils version of ping (ie. the version you typically get in Linux).