[lug] Bash Scripting Ping
D. Stimits
stimits at comcast.net
Sun Nov 8 17:13:49 MST 2020
> On 11/08/2020 4:57 PM David L. Willson <dlwillson at thegeek.nu> wrote:
>
>
> I finally got a chance to play with this.
>
> For me, these worked:
> - ping yahoo.com | while read PINGLINE; do echo pingline $PINGLINE; done
> - ping -O -D yahoo.com | while read PINGLINE; do echo pingline $PINGLINE; done
>
> I tested Fedora natively, and debian, ubuntu, and opensuse/leap in Docker.
>
> I didn't need to kill any buffering anywhere, so I'm curious about where/when that is needed. I also wonder whether doing it in Docker somehow invalidates the results. I also also wonder whether doing it in Docker is a good way for my macOS-loving friends to get around the limitations of their preferred OS. ;-)
Buffering will never change the result. All it will change is the timing of the result. Buffering allows greater "average" throughput in a multitasking environment, but with ping being a "comment on packet timing", non-buffered is closer to actual timing. Just thinking about ping as a "realtime heartbeat" of packets, it just seems non-buffered is closer to actual timing, and that the data throughput is so little buffering will never improve performance anyway.
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
More information about the LUG
mailing list