Skip to content

A bash ping script that includes logging and colored output when hosts are up / down.

License

Notifications You must be signed in to change notification settings

sirken/bash-ping-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bash Ping Plus

A bash ping script with some extra features including:

  • Colored output for up / down ping responses
  • Log files are saved with date & time stamps inside nested folders by date
  • Log files are dynamically generated, so if the ongoing ping rolls over into a new day, the target log file changes automatically

Ping example

Folder structure example

Installation

Set the script as executable

chmod +x pn.sh

Edit the script (if desired) to change where ping logs are stored

logdir_base=~/ping_logs

Add symbolic link to your PATH (optional but recommended)

ln -s ~/location/of/pn.sh ~/.local/bin/pn

Usage

Host is required

pn [host] [packet size]

Examples

Ping github with standard packets

pn github.com

Ping slashdot with large packets

pn slashdot.org 1500

Ping google dns

pn 8.8.8.8

About

A bash ping script that includes logging and colored output when hosts are up / down.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages