-----------------------
| Ping Script Linux |
-----------------------
Introduction
This ping script will read a list of hostnames to ping and pings them while recording their ping time in an output file.
Features
- Simple to use
- Pings an arbitrary number of sites
- Pings sites in parallel
- Records timestamp of each ping
- Possible to send email after completion
- Logging capabilities
How to use
This script takes as input a file containing a list of hostnames called "pinglist". It will then ping each site at a rate of 1 site every 0.08 second. This rate can be adjusted in the script easily on line 29 in the file pingscript. Included is an example "pinglist" file.
The script will also log the start and end time in a file called "bash.log".
After running the script, a file called "output" will be produced with ping data in the following format:
[UNIX TIMESTAMP]: [HOSTNAME] [TIME IN MILLISECONDS]
There is also an option to send an email after the script completes. Enable this by uncommenting the last line and filling in your own email address.