Tag Archives: troubleshooting

prettyping.sh: An irrefutably prettier ping

prettyping.sh is a very straightforward tool: It’s a shell script that gives a little more pizazz to the traditional ping tool.

2014-12-30-jsgqk71-prettyping.sh

And seeing that screenshot gives you 90 percent of what you can accomplish with prettyping.sh. By default, all of prettyping.sh’s flair is turned on, and with the few hard-wired options that have to be set for the translation to ping. It’s colorful, clean, nicely arranged and a breeze to use.

But as always, I must offer a few points that stick out. In the hope of course, that they will be smoothed over in the future.

First, the legend is visible by default, and as luck would have it, it’s intended for about 150 or 160 columns (I didn’t count it out exactly; please forgive me). That’s all fine and dandy, but I honestly am not sure how often I run a terminal of that width, especially for a ping tool. So I find myself omitting the legend, which is pretty, but a little skewed.

Second, prettyping.sh’s output is very much like spark, with gradated characters of set color arrangements representing ranges of values returned from ping. Fair enough, and I see a general logic to the legend.

The problem is probably obvious though: In a virtual console, you might not get that same effect. I tried it on a random machine in my collection, and what I got was a blotchy mess of unprintable boxes, in varying colors, both in the output and in the legend.

So you’re more or less trapped in an emulator if you decide to make regular use of prettyping.sh, which might mean you’re also trapped in a graphical environment. Which might defeat the purpose of this entire escapade. (Let me know if you try prettyping.sh in a framebuffer terminal emulator, and whether or not you get the correct effect. You might.)

Another caveat: The link above may or may not be the original prettyping.sh. Shell scripts, in my observation, get traded around like spare pencils, and sometimes contort without earning a new name. I know the link for prettyping-hg out of AUR points to a dead MyOpera page, so it might be that there are three or four variants around.

The link I gave at the start was one I found on my own, that led to a posted source. I see that it’s also the source link for the prettyping package in AUR.

I also wish someone had renamed it to pretty-ping.sh, because I see the word “typing” in there, every time I read it. How’s that for a shallow and pointless criticism? 🙄

If you can overlook these faults or eccentricities, prettyping.sh is a very nice text-based interface for watching pings over long periods of time. There are a lot of ping tools out there (we’ve seen plenty, even in recent weeks), so if it doesn’t suit you, there are options available. 🙂

fluxcapacitor: Now you have time for everything

I have a program here that I don’t quite know how to explain, even though it’s fairly obvious that it’s working. The aptly named fluxcapacitor allows programs to run without timing constraints … which is how I would explain it.

Maybe this will help. I’ll borrow from the home page example, because it makes the most sense to me:

kmandla@6m47421: ~/downloads/fluxcapacitor$ time sleep 12

real	0m12.003s
user	0m0.000s
sys	0m0.000s

That much is obvious. But then there’s this:

kmandla@6m47421: ~/downloads/fluxcapacitor$ time ./fluxcapacitor -- sleep 12

real	0m0.018s
user	0m0.007s
sys	0m0.003s

Quite obviously, what we have here is a way to negate time. Well, this changes everything. Download files in fractions of seconds. Compile software in minutes instead of days. Turn your 486 into an i7. Search for aliens. Fold proteins. Cure cancer and the common cold. Achieve world peace. We certainly have time for it now. 😀

Well, maybe not. 🙄 I can see where fluxcapacitor would be helpful in some situations, like troubleshooting software that imposed delays on you, or maybe some network testing problems.

But to be honest, I think most of my personal applications wouldn’t be too far improved by fluxcapacitor. I’ve read the author’s examples and I think they make sense, I just can’t think of anything I do on a day-to-day basis that would benefit from it. :\

I shall keep fluxcapacitor in the back of my mind, and save it for emergencies. Like when I am late to work in the mornings. 😉

ping: Everybody wants to be the ping

Writing out anything about ping is either going to be a giant waste of time or a catalog of the obvious. I don’t doubt for a second that you know about ping, and probably use it on a regular basis.

But we’ve mentioned hping and oping and noping and fping and dhcping and ekgping and echoping and … anyways, it wouldn’t do to only look over the competition, and not give the original tool a chance.

kmandla@lv-r1fz6: ~$ ping -c 3 www.google.com
PING www.google.com (206.111.15.88) 56(84) bytes of data.
64 bytes from 206.111.15.88.ptr.us.xo.net (206.111.15.88): icmp_seq=1 ttl=51 time=98.7 ms
64 bytes from 206.111.15.88.ptr.us.xo.net (206.111.15.88): icmp_seq=2 ttl=51 time=88.4 ms
64 bytes from 206.111.15.88.ptr.us.xo.net (206.111.15.88): icmp_seq=3 ttl=51 time=87.8 ms

--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 87.889/91.704/98.764/5.003 ms

There it is in its purest form. The -c flag runs through three pings, and stops. Some other interesting flags include -a, for an audible ping; -l for preloaded pings, which sends a burst without waiting for replies; and -n for a numeric display only.

I feel obligated to mention that the data summary includes a standard deviation. I suppose with a high enough count and a little bit of console kung-fu, you might be able to work out z-scores, which personally I would find more useful for comparing networked machines.

Oh, and I should mention that ping is part of iputils.

But that’s about all I can suggest for ping. It’s a primitive tool that everyone does (or at least should) know about.

Still, given that so many applications hope to dethrone it, due diligence is important. 😉