Ping mit Zeitstempel

Voraussetzung: installiertes Perl.

ping host | perl -nle 'print scalar(localtime), " ", $_'

Mit Umleitung in eine Datei:

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

Quelle: https://stackoverflow.com/questions/10679807/how-do-i-timestamp-every-ping-result

Schreibe eine Antwort

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

Erforderlich

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.