The sys admin's daily grind – Prettyping and Asciiflow

Block Heroes

Article from Issue 188/2016
Author(s):

Columnist Charly is delighted that people still program useful tools for the terminal. Here, he looks at one tool that transforms boring ping data into colorful statistics and another that publishes a construction set for ASCII graphics on the network.

One weapon for command-line warriors is Prettyping [1], a shell script that wraps around the ping command. It reads its tasks, keeps a record of run times and packet losses, and shows at the command line in block graphics the average values since starting the tool and for the past 60 seconds (Figure 1).

Figure 1: It's a colorful world folks: Prettyping visualizing ping statistics in the terminal.

The script runs on any system with Bash and Awk (i.e., also on OS X and probably also in the new Linux environment on Windows 10). Prettyping detects whether it is running in a terminal and how wide the terminal is, then scales the output accordingly. If you think the output is a little too clownish, you can switch to a more staid monochrome display using --nocolor. Prettyping passes on to ping any parameters that it isn't familiar with.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Charly's Column – paping

    Like every sys admin, Charly occasionally throws a pebble at a machine to see if it is still alive. If the other end does not respond to the ping, that does not always mean it's dead. Maybe the pebble just missed.

  • Social Aid

    Fortunately, Facebook is not the only place you can chat: When sys admin columnist Charly Kühnast visits the web chat center Reddit, he often goes without a web browser and uses the RTV tool, which can even display photos and videos on plain text consoles.

  • Charly's Column: Nameserver Diagnostics

    Many administrators rely on Linux tools whose fate is already sealed, but external forces can help people let go of old habits.

  • Charly's Column – Dnstop

    In last month's issue, Charly sent the lean pdnsd DNS cache down the catwalk. To see whether pdnsd really does the work expected of it, he now puts dnstop through infinite rounds in the name of names.

  • Charly's Column – Searx

    It goes against the economic rationale to assume that commercial search engines have the best interests of users at heart when it comes to data protection and use. Sys admin Charly has found an alternative.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News