Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2006 14:23:37 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Brett Glass <brett@lariat.net>, questions@freebsd.org
Subject:   Re: Best way to "renice" a process by name?
Message-ID:  <p0623090ec13f1fb4ea38@[128.113.24.47]>
In-Reply-To: <7.0.1.0.2.20060926090533.083a2a88@lariat.net>
References:  <7.0.1.0.2.20060926090533.083a2a88@lariat.net>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
At 9:32 AM -0600 9/26/06, Brett Glass wrote:
>
>Is there a "renice by name" utility for FreeBSD (sort of an 
>equivalent of "killall")? I could gin one up, but since this seems 
>like something that people would want to do frequently, find it hard 
>to believe that someone hasn't already written one.

FreeBSD added the `pgrep' command sometime ago.  Your renice-by-name
script would turn into something like:

     renice +2 `pgrep diskd`

(I have not tested that, and you might want to embellish it by adding
some of the other options to the `pgrep' command)

-- 
Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?p0623090ec13f1fb4ea38>