[ut2004] Tweaking Linux for playing games

zybhjk at verizon.net zybhjk at verizon.net
Fri Aug 13 01:18:05 EDT 2004

> >     Yeah, mine does the same thing and always at 4am. There must be 
> > some way to do all the cron jobs manually.
> >
> >                Rick B
> >
> >
>     I was looking at my cron files and there are cron jobs that get run 
> hourly, daily, weekly and monthly. The hourly job is "diskcheck" that 
> checks for free disk space. I'm sure everyone would agree that it 
> wouldn't be a good idea if that was to run in the middle of a game. I 
> wonder if the patches that Kolivas is putting out have a way to deal 
> with this problem? Guess I need to do some reading.
>                 Rick B

A manual cron job would kinda defeat the purpose of the daemon in the first place wouldnt it?

I am sure you could write a script to only run cpu intensive background tasks (updatedb etc) when the cpu usage is  <x%.  for a really ugly one off the top of my head: (just a rough outline this will not work)

if [ `ps aux | awk '{ print $7 (not sure which column is cpu usage) }' | `(some bc command to add all elements together)`` -l "50" ]
echo "Cron job delayed at `(command for date/time)`" >> ~/.cron_log

then for extra points you can add a sleep to the else statement and have it loop until sucessful, then have it be run daily by cron.  (sorry about syntax/other errors I havent touched a command prompt in a few months, but you get the idea.)


More information about the ut2004 mailing list