statmonitor with -r option problem behavior on stone restart
If the stone is restarted while statmonitor is running with the -r option,
it will usually correctly start monitoring the restarted stone on a new
statmonitor data file.
However, the timing of this is not reliable, so under some circumstances,
depending on platform and how fast the system is, statmonitor may SEGV,
or the new statmonitor output file may be corrupt when old data is written
to the new file.
Shut down statmonitor if the stone is stopped and restarted.
The fix for this bug is to not allow statmonitor to continue to run after
the stone is shut down; when the stone shuts down, statmonitor will exit
also and needs to be manually restarted.