Thread: Utility Linux Admining
View Single Post
  #58  
Old March 31st, 2010, 06:41 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Linux Admining

Im not sure if Ive mentioned this little bit. But with the growth of usage on my server, plus doing more and more automation, this has become useful...
Quote:
while [ ` cut -d. -f1 /proc/loadavg ` -gt 2 ]; do sleep 10 ;done
This will loop until the load on the system is below 2. Particularly important for large games, or generating maps, or extensive backups. It will keep those from kicking in while the system is already suffering under some other major process.

Its also handy to use the nice command with Dom3. Such as
Quote:
nice -15 dom3
to tell it to operate at a lower priority than more immediate activities. After all, we usually arent that concerned with how long it takes to do a hosting in a server game. Not so much that it should take equal position to email, web, ftp, etc.
Reply With Quote