limiting nohup cpu usage?
Im running a game server off my linode and was wondering if there was a way to limit the nohup commands cpu usage?
If i keep my putty connection open without nohup the usage hovers around +- 10% with players connected but when i start the program with nohup it automatically darts up to 100% usage.
plz keep in mind im still learning
**edit
system specs
im currently running debian 4 for my destro with a 256MB swap image.
thanks
–- Vague
13 Replies
nohup ./paintball2 +set dedicated 2 +set public 1 +exec server.cfg +map tlc &
nohup ./paintball2 +set dedicated 2 +set public 1 +exec server.cfg +map tlc > /dev/null 2>&1 &
to send the output to a black hole.
what does the ending addon do if you dont mind me asking?
any other suggestions man?
@vague312:
didnt work. At least it only shot up to 93%
any other suggestions man?
Use screen (that's the name of the program). Probably have to install it. If you get logged out, accidently or otherwise, it should just detach the session and continue working. Then you can restore it with "screen -r" later.
ill give it another shot tomorrow
nohup nice -20 ./paintball2 +set dedicated 2 +set public 1 +exec server.cfg +map tlc > /dev/null 2>&1 &
nohup nice -20 ./paintball2 +set dedicated 2 +set public 1 +exec server.cfg +map tlc > /dev/null 2>&1 &
still shootin up. I updated my original post with my system specs.
Are there any destros than have screen pre installed?
@vague312:
Are there any destros than have screen pre installed?
This command:
sudo apt-get install screen
on Ubuntu told me it was already installed and at the latest version. Try the same command on Debian.
(or as root: apt-get install screen)
James
yum install screen
Then "man screen" for options and commands. The idea is when screen is running you send commands to it with a control key of some sort, default is ctrl-a. So like ctrl-a D will detach the screen and leave it running on its own.
screen also allows you to run multiple shells in one logon. Used to be a must-have back in old terminal dial-up days but now you can just open several ssh sessions in. It still has its uses.
man screen for the lowdown after installing.
The "apt-get install screen" command worked with debian.
just had to modify my original command line to
screen ./paintball2 +set dedicated 2 +set public 1 +exec server.cfg +map tlc &
The cpu usage is now hovering below 10% even with 12 players.
much thanks for the help with this guys.
–- Vague