I'm newbie to Linux, so I've got gut feeling that answer is trivial, but after couple of days of looking for the answer I'm giving up and counting on your help...
I'm using software on CentOS 7. When I start it on TTY pseudo terminal (e.g. /dev/tty2) it prints out a lot of interesting information on the screen I need to analyze. Due to amount of information and for archiving I would like to save them in a file. So obviously I tried to redirect stdout, stderr to a file, but it turned out I can save only small portion of the information visible on the terminal screen (hundreds of lines). I used strace later to figure out the way application prints those information on the screen - it is writing to /dev/tty0 device (not /dev/tty, but /dev/tty0, currently visible console, which makes - I think - a big difference). Realizing this I tried many possible solutions to capture this output including:
- screen sessions and logging to the file
- wrapper written in python to catch tty writes (How to redirect a program that writes to tty?)
- invoking the software using 'script' command
It all works well for catching /dev/tty writes, but not for /dev/tty0!
Can you suggest any solution or even just an idea I could try?