7 ms·
The best ping story I've ever heard
- yuchi 12y agoDo someone know how to run a command for every line emitted in a unix pipe? I tried the oneliner in the linked story using Mac OS X’s `say`, but it doesn’t work with pipes.
- sheepz 12y agoping goodhost | sed -l 's/.*/ping/' | while read line; do echo $line | say; done
- n3t 12y agoYou might want to use "--unbuffered" flag in sed execution.
- sheepz 12y agothat option appears to be gnu-specific. -l should make it line-buffered
- masklinn 12y agoNote that -l is also an extension, just a BSD one. The only options in POSIX sed are -e, -f and -n (and -e is usually cargo-culted by people who want -E. -E being a BSD extension enabling extended regular expressions — -r in GNU sed)
- petercooper 12y agoBit of a tangent, but using the voice "Tom" on OS X, saying "ping" says "pling" instead. Fine with other voices but rather curious.
- deleted 12y ago[deleted]
- gpvos 12y agocat input |while read a; do do_something_with $a; done
- yuchi 12y agothank you so much!
- kosma 12y agoIn a typical UNIX fashion, there's a program that runs programs: ping 127.0.0.1 | sed -e 's/.*/ping/' | xargs -d'\n' -n1 say
- masklinn 12y ago-d is a GNU extension, won't work on OSX (short of having installed and running GNU xargs), and it's not needed either in this case. And `sed -e <command>` is redundant, `-e` is used to specify multiple commands.
- masklinn 12y agoxargs -n1 (-n is so it executes the command for each input) You'll also need sed -l to limit buffering. ping <host> | sed -l 's/.*/ping/' | xargs -n1 say
- yuchi 12y agoperfect!
- deleted 12y ago[deleted]
- jnsaff2 12y agoFor some fun: https://github.com/mpdehaan/ansible-and-juliet https://github.com/mpdehaan/ansible-and-juliet
- caractacus 12y agohttp://bash.org/?5273 http://bash.org/?5273 Surely most people reading this will know the quote linked without having to even click it.
- Beltiras 12y agoI thought of this one too. Not happened to me yet, but it might ;)
- deleted 12y ago[deleted]
- kbart 12y agoIt's not as fun as it was >10 years ago. Tablets and smartphones ruined it..
- comex 12y agoWhy did they ruin it? It's due to smartphones that I've had a similar experience on at least one occasion. I couldn't find my phone, but I noticed it was connected to the home Wi-Fi network and, since it was a jailbroken iPhone, I could SSH into it. (It went to sleep aggressively, of course, but I woke it up by dialing the number or something.) While the iPhone has a built-in feature to remotely play a tone on the speaker, I couldn't seem to hear it from anywhere in the house. So I tried using a command-line tool (might have written it actually, don't remember) to activate the cameras and take a picture with each; unfortunately the result was just two dark blurs. Eventually I found it buried in a couch, the soft fabric muffling the speaker... If I were more sophisticated, I could have measured Wi-Fi RSSIs from it, or tried to bring Bluetooth devices into range. Lots of ways to try to find things nowadays, but none perfect!
- corobo 12y agoYup, my first thought as soon as I'd read "ping" on this post even
- davidw 12y agoThis is a good one too, although not strictly ping related. http://www.ibiblio.org/harris/500milemail.html http://www.ibiblio.org/harris/500milemail.html
- masklinn 12y agoThere's also this legendary Amazon review, which is strictly ping-related: http://www.amazon.com/review/R2VDKZ4X1F992Q http://www.amazon.com/review/R2VDKZ4X1F992Q
- oneeyedpigeon 12y ago"At the same time each day (I suspect this is scheduled under cron)" Spectacular.
- simonh 12y agoGood grief, I'd forgotten about that one. Hard to believe it's still up almost 15 years later. A true classic of the Amazon review genre. Who would have thought they would become a cultural repository?
- ozh 12y agoDidn't know that one! The dry humor is f*ing priceless :)
- atmosx 12y agoThat's the I thought about too :-)
- asmithmd1 12y agoIs it just my network administrator or do others drop outgoing Ping messages at the corporate firewall? This has cost me and others more time than I would like to admit for some vague "security" reason that he won't or can't explain.
- dsr_ 12y agoStart with a default-deny policy, the only sensible course. (Google "IP over ICMP".) Note that some sysadmins need to verify external connectivity, so allow ICMP echo reply messages to those IPs (or subnets, more likely). Result: if your machine isn't in one of those blessed ranges, you never get a response to a ping to an outside address. Most users don't complain, because they don't even know what a ping is. So, it's not just your company, but it's not general practice everywhere.
- silverwind 12y agoBlocking ICMP is a questionable practice in my opinion. It generally just complicates troubleshooting for a marginable gain in "security" and some applications even require it for PMTU discovery. If you're really worried about user tunneling out through various tricks, you'd probably have to block the whole internet and apply a whitelist of trusted destination hosts. As a heavy ping user, this blockage always bothered me, so I started working on a similar tool to get around this: https://github.com/silverwind/tcpie https://github.com/silverwind/tcpie
- dsr_ 12y agoIN particular, that story is about 10Base2, where the topology is not hub-and-spoke but a single cable that snakes from NIC to NIC, with BNC twist-lock connectors and a T-junction at each stop. (And a required termination resistor at the end to stop reflection...)
- rcarmo 12y agoWe once had an Ericsson MSC that only replied to _uneven_ ICMP packets due to some bug. Made it look like there was 50% packet loss on an otherwise perfectly good Cat 5 cable... (edit: ICMP instead of IP)
- TheLoneWolfling 12y agoChecksum issue?
- rcarmo 12y agoIIRC, there was nothing on the logs and they eventually shipped a fix. I was there when it happened and was called over to have a look.
- elementai 12y agoWe've had a 3rd party router configured to balance traffic based on even/odd last octet. Add faulty hardware and DHCP to the mix, and here you have really hard to debug problem.
- vruiz 12y agonow I'm really tempted to add some voice notification function to pingd [https://github.com/pinggg/pingd https://github.com/pinggg/pingd]
- d0ugie 12y agoPing fans, be sure to check out bing! Fun stuff and 97.2% accurate (not really)! :) > Bing is a point-to-point bandwidth measurement tool (hence the 'b'), based on ping. Bing determines the real (raw, as opposed to available or average) throughput on a link by measuring ICMP echo requests roundtrip times for different packet sizes for each end of the link. http://fgouget.free.fr/bing/bing_src-readme.shtml http://fgouget.free.fr/bing/bing_src-readme.shtml
- silverwind 12y agoThis looks pretty ancient (source files dated 1997), and won't compile here. Any maintained version?
- gkelly 12y agoI'm a fan of nttcp, although it's not based on ping. http://linux.die.net/man/1/nttcp http://linux.die.net/man/1/nttcp
- rhplus 12y agoThe linked page appears to be a spammy copy of the original here: http://ftp.arl.army.mil/~mike/ping.html http://ftp.arl.army.mil/~mike/ping.html It doesn't correctly credit the real author of ping: http://en.wikipedia.org/wiki/Mike_Muuss http://en.wikipedia.org/wiki/Mike_Muuss
- js2 12y agoThank you webmaster@arl.army.mil for seeing that Mike Muuss's pages have been preserved, going on 15 years now. Interesting note I hadn't read before: "This Web server was one of the first 50 Web servers on the InterNet, making it a pioneer in its own right."
- andor436 12y agoI once recovered a stolen car with ping. It was 2002 (2003?), and we had just launched Zipcar in New York. Being a naive start-up we had perhaps not the most stringent security measures in place to prevent fraud and theft. Sure enough, a couple of weeks in and one of our cars went missing. Calls to the member went unreturned, and it became clear that the member was not who they claimed to be and had no intention of returning the car. At the time Zipcar was using the mobile analog CDPD network for vehicle communications, which had a top speed of something like 19.2k/s and cost us around $1/month per KB of data. However, it also had a limited number of data channels, and since it used the old AMPS network broadcast in the 800 - 900 MHz range. I happened to have an amateur radio license and a radio that was able to receive in that band. Since we were still in contact with the missing car we knew it hadn't been chopped (yet) and I figured we might be able to use some sort of radio direction finding technique to locate the car. My friend and fellow engineer Carl was able to reprogram the firmware of our embedded electronics to tell us which cell tower the car was in contact with, and with that we could look up the FCC id in their database to find the tower's street address. So my boss Roy and I hopped into his car and drove to Long Island. We drove up to the tower, and I leaned out the window of his minivan with a yagi antenna and my radio (set to scan the 40 or so CDPD channels.) We asked Carl (back in Boston) to start pinging the car. To the radio this sounded like a half-second burst of static, but since it was very regular it was also very easy to identify. Sure enough, after driving around for a few minutes we picked up the signal. pffft pffft pffft We drove around the tower in a wide circle until the signal was the strongest, got out to scan the area, then used the new bearing to reduce the circle. Eventually we ended up in the parking lot of the Long Island railroad. There in the back corner was our car, luckily unscathed and none the worse for wear. Ping rocks.
- gbajson 12y agoAnd now, 2015, in my corporate networks ICMP messages are filtered by firewall (they say that's due to security reasons). Is this the beginning of the end of ping?
- ProAm 12y agoping will be the last thing to die before they turn the internet off.
- noonat 12y agoAfter a cross country move to a remote coastal town, my wife and I were left at our destination with only a small portion of our possessions. The rest of our stuff was making its way there with the hired movers. I got into a strange situation where I needed my Mac Mini for something, but it was still trying to connect to an old wired connection instead of the new wireless one. I didn't have any of my cables or display adapters -- just a keyboard. Long story short: the Mac Mini has an internal speaker, and OS X comes with a vocoder shell program. I managed to boot into the OS and launch terminal, and blindly typed commands into it, piping the output to the vocoder app until I got things working.