Besides using top, is there a more precise way of identifying if the last executed command has finished if I had to check in a separate session over Putty?
What if it isn't listed in ps? Maybe process is the wrong word for it. I am running a Perl script.
Kys
2009-08-17 23:45:27
A:
How about getting it to run another command immediately after that sets a flag.
$ do_command ; touch I_FINISHED
then when the command finishes it'll create a file called I_FINISHED that you can look for.
or something more sophisticated that writes to a log file if you're doing it multiple times.
Colin Coghill
2009-08-17 23:50:18
A:
I agree that it may be a faster option in the long run to have your program write to a log file or create a notification. Just put it at the end of the executed code, past the part that you suspect may cause it to hang.
Sean O'Hollaren
2009-08-17 23:59:26
A:
ps -eo cmd
Lists all processes, and displays the command line, as 'typed' when the command started, so you will be able to tell your script apart from anything else running written in Perl.
Chris Huang-Leaver
2009-08-18 01:46:10