Prettyping, a more eye-catching and easy-to-read output of the Ping command

about prettyping

In the next article we are going to take a look at Prettyping. I suppose it is known to the world that the ping command is used to verify whether a target host is reachable or not. Using the Ping command, we can send an ICMP echo request to our target host and check if the target host is up or down. Prettyping is just a wrapper for the standard ping tool. Makes the output of the ping command more attractive, easy to read, colorful, and compact. This wrapper will run the standard ping command in the background and show us the output with colors and Unicode characters.

It is a free and open source tool written in Bash and awk. It is also compatible with most Unix-like operating systems, such as Gnu / Linux, FreeBSD, and Mac OSX. Prettyping is not only used to make the output of the ping command prettier, but it also comes with other cool features.

General characteristics of Prettyping

  • Detect lost packets and marks them on the way out.
  • Sample live statistics. Statistics are constantly updated after each reply is received, while ping is only displayed after completion.
  • You will know how to handle 'unknown messages' such as error messages without cluttering the output.
  • Avoid printing repeated messages.
  • We will be able use the most common ping parameters with Prettyping.
  • It can be run as normal user.
  • Can redirect output to a file.
  • Does not require installation. Just download the binary, make it executable, and run.
  • Es fast and light and it makes the output very easy to read, colorful, and very intuitive.

Prettyping installation

As I have already written, Prettyping does not require any installation. We just have to download the binary file. To do this we open a terminal (Ctrl + Alt + T) and use the following command:

curl -O https://raw.githubusercontent.com/denilsonsa/prettyping/master/prettyping

After downloading, we will move the binary file to your $ PATH. For example / usr / local / bin.

sudo mv prettyping /usr/local/bin

Behind this, make it executable as follows:

sudo chmod +x /usr/local/bin/prettyping

And with this it is ready to be used.

Using Prettyping

Once available, now we can ping any host or IP address and view the output of the ping command. To do this we will write in the terminal (Ctrl + Alt + T):

Prettyping without arguments

prettyping ubunlog.com

If we execute Prettyping without any argument, it will continue to run until we stop it manually by pressing Ctrl + c.

Limit the number of pings

As I commented before, since Prettyping is just a wrapper for the ping command, will allow us to use the most common ping parameters. For example, we can use the -c option to ping a host only a specified number of times, for example 4:

prettyping with a limited number of pings

prettyping -c 4 ubunlog.com

Remove color from output

By default, prettynping will show us the output in color format. If after trying it, you see that you do not like this option, you just have to use the –nocolor option.

prettycolor with the nocolor option

prettyping --nocolor ubunlog.com

Similarly, we will be able to use only one color with the –nomulticolor option:

prettyping with non-multi-color option

prettyping --nomulticolor ubunlog.com

Disable Unicode characters

To disable Unicode characters, use the –nounicode option:

prettyping with the nounicode option

prettyping --nounicode ubunlog.com

This can be helpful if your terminal does not support UTF-8.

Redirect the output to a file

We will also be able to redirect the output to a file. The following command will write the output of the prettyping command ubunlog.com in the file ubunlog.txt.

prettyping ubunlog.com | tee ubunlog.txt

Other Prettyping options

Prettyping has some other options that can help us when performing tasks such as:

  • Enable / disable latency legend. (the default is: enabled).
  • Force output designed for a terminal. (default: automatic).
  • Use the last 'n' pings in the statistics line. (default: 60).
  • Override automatic detection of terminal dimensions.
  • Override the awk interpreter. (default: awk).
  • Override the ping tool. (default: ping).

Help

To know more about this application, you can consult the help section:

Prettyping help

prettyping --help

We can also talk to us in the web page of the project or in its repository GitHub.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.