Path: utzoo!attcan!uunet!shelby!agate!ucbvax!tut.cis.ohio-state.edu!emory!tridom!wht From: wht@tridom.uucp (Warren Tucker) Newsgroups: alt.sources Subject: Re: renice Summary: notes on how to use renice 286 Message-ID: <114@tridom.uucp> Date: 12 May 89 17:46:09 GMT References: <46@utower.UUCP> Organization: Tridom Corporation, Atlanta Lines: 77 In article <46@utower.UUCP> fischer@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@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 sets the SysV nice factor to 20 renice -20 sets the nice to 0 renice 19 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.