Find the answer to your Linux question:
Results 1 to 6 of 6
Hey forums! I am running a small minecraft server off of my old computer, and am having a big issue. My computer isn't very good, and even just running this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3

    Minecraft/Terminal issues


    Hey forums!
    I am running a small minecraft server off of my old computer, and am having a big issue.
    My computer isn't very good, and even just running this server is an issue. I use a command in terminal to run the server with more RAM. This helps with lag compensation, but the server crashes every few hours requiring a manual reboot. Is there a way that I can have terminal automatically restart my server if it crashes?
    Thanks in advance.

  2. #2
    Just Joined!
    Join Date
    Jul 2006
    Location
    localhost
    Posts
    31
    Welcome to the forums!

    If it's just the server crashing (as in the server prints an error and returns you to the command line) you could encapsulate the command in an infinite loop:
    Code:
    while true; do minecraft-server; done
    Where minecraft-sever is the command you use to start the server. This will cause the server to restart over and over until you Ctrl-C out of this 1 line script in the terminal.

    Just out of curiosity, how much RAM does the computer have?

  3. #3
    Linux Newbie
    Join Date
    Nov 2009
    Posts
    218
    You could also make an entry in /etc/inittab to start your server at, I guess, run level 3 and use the "respawn" option so that if it dies, init will retart it for you.

    See man inittab.

  4. #4
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    My computer is 4GB of ram. Thanks for the advice.

  5. #5
    Just Joined!
    Join Date
    Jul 2006
    Location
    localhost
    Posts
    31
    Quote Originally Posted by HappyJalepeno View Post
    My computer is 4GB of ram. Thanks for the advice.
    Sorry, I was thinking of the RAM available on the server machine.

  6. #6
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    Oh haha. I have found that allocating 1-1.5 GB works the best, so that is what I have had it at for the last few months.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •