A script appeared to finish, but is still running
- Inicie sesión o regístrese para enviar comentarios
Normally when I run a script such as an nmap ... -oG - search, when it's done, the
terminal prompt reappears.
Today, for the first time, one such script went from displaying the last password request to
giving me the usual prompt, as though the terminal is ready for another command ... but its
output continues to register in the storage medium. It's not finished ! It's gone on like
this for a couple of hours, and the CPU's not working especially hard.
Scripts and barnyard fowl have different nervous systems ...
There were initially six such scripts; three completed their tasks several hours ago; two
are clearly still running, and their prompts have not reappeared. The third is still going
strong ... dutifully filing its reports to the hard drive.
Depending on how you're writing those scripts, the computer might be waiting for user input, if you're using strings with special characters, make sure to put quote marks around them, else the shell interpreter can get confused.
The nmap script runs as root, so as each of a series of nmap searches completes, the next nmap script
is expecting a password input. What keeps me sane is that the sudoers file can be adjusted to grant
the operator a grace period so that no new password input is needed if the preceding script completes
its task before this grace period is exceeded.
There are two temp files in which the outputs of the actively running scripts are stored, and it may
be from that source that a steady flow of completed data is flowing into the output file. There has
been no use whatsoever of the swap file, either. There are nearly 200 MB of data in temp files right
now.
I can tell that this headless-chicken script isn't finished because the last line hasn't reached the
set number of output rows, and the last row printed is itself incomplete.
Postscript:
No new updates have been made for a while, so the script has stopped ... but is still incomplete.
Post-postscript:
This morning, that slow-moving script appeared to be alive and running again, even asking that I enter
the sudo password in the usual fashion, and actually came to an orderly conclusion at the expected
number of complete rows. Whatever happened, trisquel's handling of the script was in the end done right.
- Inicie sesión o regístrese para enviar comentarios