0

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

Nyan Cat
  • 3
  • 1

2 Answers2

2

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?

ewwhite
  • 197,159
  • 92
  • 443
  • 809
1

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.

Sven
  • 98,649
  • 14
  • 180
  • 226