Is there a Linux serial terminal WITH timestamps?

Viewed 16539

i still want to check my Bootloader + Linux Startupcode for an embedded device. Therefore i want to catch the time for every command printed to the serial port.

I know there are programs like putty (which i can dearly recommend), getty, cutecom, picocom, screen etc. But none of these add timestamps to the incomming messages on the host screen (I'm not really talking about the date, more like how many ms have gone since the first output). It actually sounds not like a big deal.

I found out there is one script doing what i wanted to have, called grabserial but it's not working properly, since it's to slow to process the whole output. I discussed this problem in a different forum (if you want to know: grabserial problem but it's not part of the topic). So i can't use that script.

Now again: can you tell me a terminal for Linux which adds timestamps to every line, which was received from a Serial Port?

Thank you

[Edit:] I've found a pretty rough workaround with cereal, which wants to have some settings, since it locks the port everytime you use it. In the end, it adds the actual date and time, not the startup time and difftime between each step, so as you can see I'm still looking for an adequate solution.

4 Answers

If you are willing to build the binary by yourself, you can try a branched picocom (https://github.com/codepox/picocom). This is based on picocom 1.7 which is a little old.

I have forked and enhanced this picocom and made it be able to show either delta-time or wall-clock timestamp. You can find it here (https://github.com/tdwong/picocom-with-timestamp). You still have to build the binary by yourself.

Here is how I use it. Note, N is the command to enable/toggle timestamp.

$ picocom -b 115200 /dev/ttyUSB0
  ...
<ctrl-a> N      # enable delta-time timestamp
<ctrl-a> N      # toggle wall-clock timestamp
<ctrl-a> N      # disable timestamp
Related