Forum Moderators: travelin cat
At my iBook at home i start a process at a remote MacOSX 10.2.6 machine via ssh. The process starts and echoes what has been scripted. In my terminal i see:
> [process12345] doing this ...
> [process12345] doing that ...
> [process12345] doing also this ...
> [process12345] now i do this ...
Now i close the terminal window and the process keeps running on the remote mac as it should. Ten minutes later i login again (ssh) and would like to have the current echo messages like above. Any way to get them?
So far i know the following commands:
- sudo sc_usage [pid]
Returns a lot of informations about the process - but not the echo log.
- sudo fs_usage
Just reports about the hard disc usage of the processes that are running.
Is there any command that can be used to jump back into the process and observe the calling chain and the echo messsages? Hope, you get the question.
# /usr/local/bin/script > output.txt &
2. Complex Solution: You could use GNU Screen, which creates virtual terminals that continue running even when you log out. You'll probably have to download and compile it, as I don't *think* it comes with OS X (but it might).
To run the command with screen, and detach the process, it would go something like this:
# screen
# /usr/local/bin/script
# (ctrl-a, d)
# screen -r
I'll try the ouput option tomorrow!
However, allthough screen works it's more a screen capture command, no!? I get a blank terminal screen with this command - i guess this is because the terminal isn't running on the remote machine - thus white screen, right!? ...