gnomon
A command line utility, a bit like moreutils's ts, to prepend timestamp information to the standard output of another command. Useful for long-running processes where you'd like a historical record of what's taking so long.
Example
Piping anything to gnomon will prepend a timestamp to each line, indicating how long that line was the last line in the buffer--that is, how long it took the next line to appear. By default, gnomon will display the seconds elapsed between each line, but that is configurable.
You can display total time elapsed since the process began:
You can display an absolute timestamp:
You can also use the --high and/or --medium options to specify a length threshold in seconds, over which gnomon will highlight the timestamp in red or yellow. And you can do a few other things, too.
If the realtime timestamp updating is distracting or incompatible with your terminal, it can be disabled:
Options
--type=<elapsed-line|elapsed-total|absolute [default: elapsed-line] -t <elapsed-line|elapsed-total|absolute
Type of timestamp to display. elapsed-line: Number of seconds that displayed line was the last line. elapsed-total: Number of seconds since the start of the process. absolute: An absolute timestamp in UTC.
--format="format" [default: "H:i:s.u O"] -f "format"
Format the absolute timestamp, using PHP date format strings. If the type is elapsed-line or elapsed-total, this option is ignored.
--ignore-blank [default: false] --quiet -q -i
Do not prepend a timestamp to blank lines; just pass them through. When this option is active, blank lines will not trigger an update of elapsed time. Therefore, if a lot of blank lines appear, the prior timestamp will display the total time between that line and the next non-blank line (if the type is elapsed-time was selected).
--real-time=<number|false [default: 500] -r [non-tty default: false]
Time increment to use when updating timestamp for the current line, in milliseconds. Pass false to this option to disable realtime entirely, if you need an extra performance boost or you find it distracting. When realtime is disabled, the log will always appear one line "behind" the original piped output, since it can't display the line until it's finished timing it.
--high=seconds -h seconds