LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Seeking terminal emulation with timestamped output to file (https://www.linuxquestions.org/questions/linux-newbie-8/seeking-terminal-emulation-with-timestamped-output-to-file-4175545000/)

WolfStock 06-10-2015 11:23 AM

Seeking terminal emulation with timestamped output to file
 
Greetings,

I'm trying to find a terminal emulation program for Linux that can save output to a file, and do so with every line of output timestamped.

There are a couple of emulators for Windows that support this (e.g. TeraTerm and ExtraPuTTY), but I haven't found one for Linux. Anyone know of one?

The linux system I'm using has gnome, though gnome-terminal doesn't support timestamped output.

Thanks.

js404 06-10-2015 01:50 PM

This might be what you are looking for. If you want the terminal to always log, you can add the command to your ~/.bashrc file.

WolfStock 06-10-2015 08:30 PM

Quote:

Originally Posted by js404 (Post 5375229)
This might be what you are looking for. If you want the terminal to always log, you can add the command to your ~/.bashrc file.

Nah - script doesn't add timestamps, that I'm aware of anyhow. I need something that adds timestamps to the logfile file; and not just timestamps of the commands I enter but timestamps of every single output line. E.g. if you had a program "watchstatus" that was putting out status updates to stdout, would show something like:

[Tue Apr 07 18:55:44.841 2015] [wolfstock@myserver ~]$ watchstatus
[Tue Apr 07 18:55:54.471 2015] status: up
[Tue Apr 07 19:32:23.292 2015] status: down
[Tue Apr 07 19:32:24.100 2015] status: up
[Tue Apr 07 19:32:28.555 2015] status: down
[Tue Apr 07 20:22:33.630 2015] status: up
[Tue Apr 07 20:22:34.829 2015] status: down
[Tue Apr 07 20:55:18.888 2015] status: up
[Tue Apr 07 20:55:19.213 2015] status: down
...


All times are GMT -5. The time now is 12:13 AM.