renice

Warren Tucker wht at tridom.uucp
Sat May 13 03:46:09 AEST 1989


In article <46 at utower.UUCP> fischer at utower.UUCP (Axel Fischer) writes:
>Some time ago someone has posted a "renice" program for SCO Xenix 286/386 .
>
>If anyone is using this could you please help me out ?
>
>I have installed renice as 4711 (owner: root) and uxlst as 0755 (owner: root)
>When I run renice on a process it doesn't even shows me the correct nice
>value of the process.
>It shows *always* a priority of -20.
>And renice doesn't changes the nice value - it just remains the same.
>
>If someone knows my fault or have a tip *please* send a mail to me.
>
>-Axel
>-- 
>Domain: fischer at utower.UUCP
>USA:    ...!uunet!pyramid!tmpmbx!utower!fischer
>Europe: ...!tmpmbx!utower!fischer
>======> Beam me up, Scotty - there is no intelligent life down here ! <======

I hacked that renice for the 286 to use kmem values stored in a
file (hence uxlst) since the original 286 renice (written by
Mike "Ford" Ditto) took so long to run on my 8MHz machine.
What I also did (since I use a BSD machine too) was to
change the syntax of the command to compky with the BSD
syntax.

renice 0 <pid> sets the SysV nice factor to 20
renice -20 <pid> sets the nice to 0
renice 19 <pid> sets to 39

Sorry for the confusion.  I am posting this since others may have
gotten confused as well.

If you want to become compatible with sys V values, in renice.c
find and change the following :

/* in main() as it is now */
    value = atoi(argv[1]);
    if(value < -20)
        usage();
    if(value > 19)
        usage();
 
    value += 20;
 
/* in main() make it: */
    value = atoi(argv[1]);
    if(value < 0)
        usage();
    if(value > 39)
        usage();
 

/* in renice(), as it is now */
    printf("%d: old priority %d, new priority %d\n",
        pid,oldnice - 20,value - 20);

/* in renice() make it: */
    printf("%d: old priority %d, new priority %d\n",
        pid,oldnice,value);

I thought I had documented the "wierd" syntax in the README file.
If you got the program without the README file, I'll be glad to repost
the shar.
-- 
-------------------------------------------------------------------
Warren Tucker, Tridom Corporation       ...!gatech!emory!tridom!wht 
Sforzando (It., sfohr-tsahn'-doh).  A direction to perform the tone
or chord with special stress, or marked and sudden emphasis.


-- 
-------------------------------------------------------------------
Warren Tucker, Tridom Corporation       ...!gatech!emory!tridom!wht 
Sforzando (It., sfohr-tsahn'-doh).  A direction to perform the tone
or chord with special stress, or marked and sudden emphasis.



More information about the Alt.sources mailing list