I’m executing a long-running xml-generating script on a CentOS 6.3 server and using tmux (version 1.6) to keep the script running when I disconnect from the server. My problem is that when I disconnect from the server the script seems to go to sleep for as long as I'm disconnected.

If I am connected to the server everything works normally. E.g. I can be logged in to the server (but not attached to the tmux session) and repeatedly executing find $XML_DIR -type f | wc -l shows that the number of generated xml files increases steadily.

If I disconnect from the server though my tmux session and script seem to go to sleep. When I reconnect to the server the find command above shows no more (or very few more) xml files and when I check for file modification dates I get something like the following which seems to confirm that the tmux session goes to sleep:

[cfogelberg@server XML]$ date ; find . -type f | xargs stat --format '%Y :%y %n' | sort -nr | cut -d: -f2- | head
Thu Apr 24 10:00:04 BST 2014
2014-04-24 10:00:02.418784534 +0100 ./output/b/8/0/result-156f76a87a57649491214cc316023149.xml
2014-04-24 10:00:02.407784493 +0100 ./output/d/0/b/result-79a777f50e8c52e998b8118bf81fced9.xml
2014-04-24 07:43:39.645877018 +0100 ./output/1/2/2/result-a15fce419c688ce9f8f065cd2ac64ec7.xml
2014-04-24 07:43:28.438782553 +0100 ./output/6/e/0/result-12324f5a79ee40012a9db8285daadd6c.xml
2014-04-24 07:43:26.019751959 +0100 ./output/0/3/8/result-17fc03ad109acb812d18dd5f8f1be125.xml
2014-04-24 07:43:16.812830188 +0100 ./output/3/0/e/result-0192e3ad1742d9b92d6ed8bfe6ff1540.xml
2014-04-24 07:43:16.808791163 +0100 ./output/5/1/d/result-0cf22ceb3d9fff3888c389769c873d01.xml
2014-04-24 07:43:01.737767522 +0100 ./output/9/d/f/result-13b591ff833c209fef2be28c1aa62789.xml
2014-04-24 07:42:45.573845799 +0100 ./output/7/a/4/result-641c8a84dc935330d36c4e04aa1c59f2.xml
2014-04-24 07:42:45.568845835 +0100 ./output/a/d/2/result-22f8f317db0b9508f8717c969292a510.xml

The gap in the above maps to when I am not connected to the server (in this case I would have disconnected a little bit before 0742 server time). What can I do to stop my tmux script going to sleep? I would really love if this could run properly 24/7 so that it could finish sooner!

1 Answer 1


Looking through /var/log/messages on the server showed a whole bunch of MCE errors - I believe this was the underlying cause and that it was just chance it didn't go to sleep while I was connected (or maybe it was using a physically different part of the memory? I don't know enough about the architecture or architecture in general to really say).

mcelog didn't generate any output though and because I did not have console or physical access to the server I couldn't run memtest or find a way to debug this further so I left it unsolved and shifted my script to a different server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .