Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The file ./something.sh contains multi thousands of complex jobs. this should take long time. I just simply run ./something.sh without any other command, and I must wait until it finished.

I connecting to this Ubuntu server through SSH. Now ./something.sh has run nearly 2 hours and still not finished its job.

I'm worried if this job considered as idle and server close my connection by giving Write failed: Broken pipe message

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

In the future, you should use some sort of job control (fg, bg, nohup) or try using the screen utility to allow you to detach from a session while a script or command runs.

For the existing command, can you open another ssh session and run ps aux | grep to check the running status of the process?

share|improve this answer
add comment

No, it should not. Also, I stronly recommend using screen or tmux for this kind of jobs. With this, you start screen, start your job inside it, detach it, disconnect and after a while you can reconnect, reattach the screen session and see if your process is finished.

Also, some kind of logging or status reporting in your script would help you a lot with long-running jobs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.