2

When using GNU Screen as a serial port terminal, is there a way to show a timestamp on each line as it is sent/received?

2
  • screen can add a timestamp to a logfile when the tty is idle, and again when active. are you not running any application that does i/o to the port? what is writing to the port, for example?
    – meuh
    Sep 24, 2015 at 15:02
  • Yes, there is I/O to the port. A custom program is writing to the serial port, but in this case I was unable to modify the code received on the serial port to include a timestamp, so I'm wanting to add the timestamp using GNU Screen. Sep 27, 2015 at 1:22

2 Answers 2

1

I added the following lines to the configuration file:

logtstamp after 5
logtstamp on

Then I started Screen using:

$ screen -L -c muxscreenrc /dev/tty.usbserial-A5027V8X 115200

The timestamp doesn't appear in the Screen session, but the saved log file did include timestamps.

This isn't exactly what I want, but it's close enough for my use case.

1

Install or download the "multitail" program. Set GNU screen to log to a disk file.

Tail the screen log file with multitail, as it reads the screen log file it adds timestamps to individual lines in its own window.

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.