I have a command running for a long time, which I don't want to disturb. However, I would like to keep check on the process (most of the time remotely). I am constantly monitoring the process via commands like
stat etc. The process is a terminal based process which wasn't started via
tmux or similar. So the only way to check the output is using physical access.
I know that
/proc contains lot of info about the process. So I was wondering if it also can display the output (or even just the last batch of output -- char/word/line). I searched in
/proc/<pid>/fd, but couldn't find anything useful.
Below is the output of
ls -l /proc/26745/fd/*
lrwx------ 1 user user 64 Oct 28 13:19 /proc/26745/fd/0 -> /dev/pts/17 lrwx------ 1 user user 64 Oct 28 13:19 /proc/26745/fd/1 -> /dev/pts/17 lrwx------ 1 user user 64 Sep 27 22:27 /proc/26745/fd/2 -> /dev/pts/17