[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with "at"



* dirk@bigengineer.xs4all.nl

> Yes, I also made a bash script. But "nice" didn't seem to help. 

Let work be some program, e.g.:

#!/bin/sh
  for (( i=$1; i; i=i-1)); do
    j=$i
  done

And the following be the script nicetest:

#!/bin/sh
cd /home/nbjhh1/tmp
/usr/bin/time nice -n 0 ./work 300000 >> nicetest.out 2>&1 &
/usr/bin/time nice -n 20 ./work 300000 >>  nicetest.out 2>&1 &


Then doing 'at -f ./nicetest 15:10'  gives the following in
nicetest.out:

13.83user 0.29system 0:16.80elapsed 84%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (354major+40minor)pagefaults 0swaps
13.87user 0.24system 0:29.60elapsed 47%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (354major+40minor)pagefaults 0swaps

Nicing and ating is clearly possible.  Your problem may be how to set
really nice values maybe.  Try to run it as root with negative nice
values.

-- 
 Jon Haugsand, Jon-H.Haugsand@norges-bank.no
 http://www.norges-bank.no



Reply to: