Port-sparc archive

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

Re: Adding nice to an rc.d script



On 8/27/2011 19:14, matthew green wrote:
I'm trying to figure out how I can add a nice command to daemons started
by rc.d so that I can adjust system performance a little bit.

Specifically I want to start by raising ntpd's priority to -5.  The
built in priority command line optiosn of ntpd (-N or -P -5) don't seem
to be working when I add them to the rc_flags variable in the precmd
function.  Top says priority is still zero.  Manually running ntpd using
nice -5 does work so I'm trying to incorporate this into the startup
script somehow.

you should just be able to set ntpd_flags="-N" or so.  look at the
stuff in /etc/defaults/rc.conf.  you may also be interested in
ntpd_chrootdir, for the paranoid.

for real hacking, you can re-set things in /etc/rc.conf.d/ntpd and
have almost full control...

I did try to put just -N on the flags but it doesn't work. I can see in top that ntpd is not running at higher priority as if the rc_flags were being ignored entirely.

The current setting is:

rc_flags="-N -u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"

I added the -N, the rest was already there from the install.

Unless this isn't supposed to be called rc_flags.


Home | Main Index | Thread Index | Old Index