Ping with timestamp

When running a ping command for a longer time to trace timeouts, it is hard to determine the actual date and time the timeout occurred.

Using a simple Bash script will solve this issue.

#!/bin/bash
while :
do
	ping -c 10 127.0.0.1
	date
done

This will ping the localhost address ten times and then print date and time. After that the script starts over (infinite loop).

Greetz, M.

Visitor Score
[Total: 0 Average: 0]