martedì, dicembre 27, 2016

Ping host and log output with timestamp

If you have some random network issue (specially on virtual machine) and you have to collect the time when it occur this command line can be helpful for you.

ping host | perl -nle 'BEGIN {$|++} print scalar(localtime), " ", $_' > outputfile


Nessun commento :

Posta un commento