Using fping and redirecting stout and stderr to the same file.

fping -lDf IPlist >IPoutput 2>&1

The "host unreachable" error messages in the file have no timestamps.

How do I get timestamps on those?


fping -lDf IPlist 2>&1 | logger

Then check the syslog, typically your output will appear in /var/log/messages or /var/log/syslog

A side effect of syslog is that it timestamps all entries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.