how to monitor a running script initiated from remote computer
thanks to all who've gotten me this far. i'm now able to ssh in to
a remote computer and start it running a script. here's my issue, though: the script in question is one which processes still photos via a command line app. my script loops through a directory doing things like cropping and resizing the images. as it does each, the script displays the filename for the file being worked on. i have been monitoring progress by simply looking at my konsole window to see what file is up (they're all named the same but each has a unique number so seeing the number tells me the progress). when i start this processing script from a remote ssh client, i'll be doing so from another script on this ssh client computer. i plan on using an ampersand '&' at the end of the command so the ssh client script can return to its next command and continue rather than waiting for the processing script to run through all it's files first. that means i have no display on the ssh client for the progress of the processing script. if i go over to the processing computer and look at the screen, nothing is displayed there either since it's processing script has been initiated from the outside and not my usual invocation from the konsole window. is there a way i can start the processing script via ssh and have it bring up a konsole window and display itself as if i'd started it locally? hope this is clear and thanks again, BabaG |
If it isn't already installed, get GNU screen. Run your script in a screen session, and leave it in the foreground. You can detach from the screen session, and re-attach later, even from a different login if you wish. You may even want to configure it in multi-user mode, and connect to a running session as a different user.
--- rod. |
thanks rod.
so, i'd ssh in from a client computer, start a screen session, start the script inside that screen session? then, because i'm in a screen session, i'd have more options for displaying the running script? starting to sound pretty complex. maybe it's just that this is the first i've ever heard of screen. have started looking into it. still hoping for something that i could do without having to use tools i've never used before, though; ideally, konsole, ssh, and my scripts. the script is pretty much all this computer does so i really don't need to be logging in and out of various sessions. all i really need to do is have the script start and display itself. once it starts and is visible, it can pretty much stay there as the only thing on the computer's screen. on the other hand, if gnu screen is the only or easiest way to do this, i guess i'll have to figure it out. is there a way, excluding screen, that if a script is running, but not displayed because it's been started from a command from an outside computer, is there a way i can call up a konsole and display the output of this running script? thanks again, BabaG |
Redirect the script's standard output &/or standard error streams to a file. From any other console:
Code:
tail -f theRedirectedOutputFile |
All times are GMT -5. The time now is 10:16 AM. |