From owner-freebsd-stable Sun Jul 2 7:19:28 2000 Delivered-To: freebsd-stable@freebsd.org Received: from point.osg.gov.bc.ca (point.osg.gov.bc.ca [142.32.102.44]) by hub.freebsd.org (Postfix) with ESMTP id B4AF137BBD7 for ; Sun, 2 Jul 2000 07:19:24 -0700 (PDT) (envelope-from Cy.Schubert@uumail.gov.bc.ca) Received: (from daemon@localhost) by point.osg.gov.bc.ca (8.8.7/8.8.8) id HAA28230; Sun, 2 Jul 2000 07:19:16 -0700 Received: from passer.osg.gov.bc.ca(142.32.110.29) via SMTP by point.osg.gov.bc.ca, id smtpda28228; Sun Jul 2 07:19:14 2000 Received: (from uucp@localhost) by passer.osg.gov.bc.ca (8.9.3/8.9.1) id HAA04553; Sun, 2 Jul 2000 07:19:14 -0700 (PDT) Received: from cwsys9.cwsent.com(10.2.2.1), claiming to be "cwsys.cwsent.com" via SMTP by passer9.cwsent.com, id smtpdSZ4551; Sun Jul 2 07:18:59 2000 Received: (from uucp@localhost) by cwsys.cwsent.com (8.10.2/8.9.1) id e62EIww00785; Sun, 2 Jul 2000 07:18:58 -0700 (PDT) Message-Id: <200007021418.e62EIww00785@cwsys.cwsent.com> Received: from localhost.cwsent.com(127.0.0.1), claiming to be "cwsys" via SMTP by localhost.cwsent.com, id smtpdXIM779; Sun Jul 2 07:18:09 2000 X-Mailer: exmh version 2.1.1 10/15/1999 Reply-To: Cy Schubert - ITSD Open Systems Group From: Cy Schubert - ITSD Open Systems Group X-OS: FreeBSD 4.0-STABLE X-Sender: cy To: Alban Hertroys Cc: freebsd-stable@FreeBSD.ORG Subject: Re: man nice(1) In-reply-to: Your message of "Sun, 02 Jul 2000 14:09:16 +0200." <20000702120917.D5BA71E7E@wit401310.student.utwente.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 02 Jul 2000 07:18:09 -0700 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20000702120917.D5BA71E7E@wit401310.student.utwente.nl>, Alban Hertr oys writes: > Is it just me or is the man page for nice in error? > > It says I have to specify a nice value of (+)20 as "nice -20" and a nice > value of -20 as "nice --20". > > running "nice -20" results in a nice value of -20, though, > while "nice --20" says: > nice: Badly formed number. > > Eventually it turned out I had to do "nice +20" ... > The man page of renice does state the nice value parameters correctly, > which causes a confusing difference between the two commands. I see you're a csh user. C Shell has a builtin nice which is incompatible with /usr/bin/nice which is used by the Bourne shell and any of its descendants. The csh nice builtin is documented in the csh(1) man page: nice nice +number nice command nice +number command The first form sets the scheduling priority for this shell to 4. The second form sets the priority to the given number. The final two forms run command at priority 4 and number respectively. The greater the number, the less cpu the process will get. The super-user may specify negative priority by using `nice -number ...'. Command is always executed in a sub-shell, and the restrictions placed on commands in simple if statements apply. If you wish to use the Bourne nice command under csh, you must specify the full path name. Why are Bourne and C Shell nice commands not the same? Well the developers of csh so many years ago chose a different syntax. Should they be the same? To make them the same would break compatibility with all other UNIX systems. If you want to make them the same, put the following in your .cshrc: alias nice /usr/bin/nice > > > This is with a somewhat older 4.0-STABLE. > I found this when trying a buildworld "nicely", as my system hottens up > a tiny bit to much somewhere (probably my pci viper550 with bad fan) > causing spontaneous reboots after a couple of hours. I don't see how the nice command would solve this. It just assigns a different priority to a command and its children causing them to be selected for execution more or less frequently in relationship to other processes running on the system. If you have no higher priority work on the machine, a lower nice value will not make any difference in execution time or the amount of heat produced by your CPU. Replacing the bad fan or reducing your CPU's clock rate will help. Regards, Phone: (250)387-8437 Cy Schubert Fax: (250)387-5766 Team Leader, Sun/DEC Team Internet: Cy.Schubert@osg.gov.bc.ca Open Systems Group, ITSD, ISTA Province of BC To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message