Graphical representation of ping.
Pinging python.org (22.214.171.124) ███████ 237 ms █████████ 348 ms ██████████ 368 ms ██████████ 388 ms^C 10 packets sent, 10 packets received 0.00% packet loss 307.80 ms average ping 233 ms lowest, 419 ms highest
Go to the pingchart directory in the terminal and run:
chmod 755 pingchart.py ln pingchart.py /usr/local/bin/pingchart
pingchart requires Python 3 and uses the
blessings libraries, both available on pip. It also requires the
dig command, which is often preinstalled. If not, it is available in the package
dnsutils on apt.
pingchart [<url>] [<max lines to display>]
By default, pingchart will ping google.com, and it will display enough lines such that a finished command will fill the terminal window.
The chart will display the last <max lines> results, but it won't stop pinging when it reaches <max lines>, only when quit using ^C.
- This has been tested on OS X 10.10 with iTerm and Terminal, running zsh, bash, and csh. It has also been tested on a Raspberry Pi on zsh and bash via SSH on iTerm.
- This command can only be run in a terminal. It is not designed to work if stdout is not a terminal. This includes piping and outputting to a file. Please use the regular
pingcommand for those.
- If you encounter a Unicode error when running the command, try writing
PYTHONIOENCODING=utf-8before the pingchart command. If your terminal can't display unicode, you can't use this program.