Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
There is less than 12 hours left to vote in the 2015 LinuxQuestions.org Members Choice Awards. Click here to go to the polls. Vote now and make sure your voice is heard!
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I hope this is the right forum.
I was running a large program on a remote SSH server the other day when I was disconnected. This is a large program, ~48 hours to complete, and I was disconnected around hour 40. I have restarted the program using the following (Note: I am already ssh'd into the server)
./20090427_9crossing > 20090427_9crossing.out &
Now, I believe this will run the program in the background and output to the file. So, if I get disconnected again will it continue to run? If not, is there a way that I can get it to keep running?
I believe you've detached the command from your terminal with the ampersand (&), so I think you should be fine. You can log back into the machine and check to see if your process is still running with the ps command.
The OP did not give any details, there could be a lot of (deliberate: security!) reasons why the session was closed: A time limit on idle ssh sessions or idle logins are at the top of my 'probably' list
The command I gave (nohup command &) will avoid stopping the program from running when the shell is detached, not the disconnect itself. After the nohup command you can log out and the command will keep running until it is done.
To clarify: there is not a time limit or idle close, as these boxes are dedicated to running large programs. When using nohup, it seems that if I close the shell and then reopen it the command has stopped. My problem is when my network (at home) goes down, as my ISP sucks, is there a way to keep the program going?
After logging in remotely start your command with: nohup whatever.the.command &
You should get the prompt back and a message from nohup, something like this:
nohup: appending output to `nohup.out'
After logging out and back in again the program should still run (if it hasn't finished).
Check with ps -ef | grep whatever.the.command. You can also check the nohup.out file in real time (if your program outputs anything that is) with tail -f nohup.out
This solution solves your connection problem as well.