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.
note that /etc/rc.d/ntpd is not /etc/rc.conf or /etc/rc.conf.d/ntpd :-)
in /etc/rc.conf you should have
ntpd=YES
ntpd_flags="-N"
and that should be all. you shouldn't have to edit /etc/rc.d/ntpd,
and if you do, usually you can put that into /etc/rc.conf.d/ntpd.
i've never had to set "rc_flags" manually.
.mrg.
Home |
Main Index |
Thread Index |
Old Index