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 Sat, Aug 27, 2011 at 10:44:50PM -0700, AGC wrote:
> On 8/27/2011 22:29, Ben Cottrell wrote:
> >On Sat, 27 Aug 2011 19:23:51 -0700, AGC wrote:
> >>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.
> >
> >"Nice" is different from "priority". Are you looking at the correct
> >field in top?
> >
> >You can also check nice values with, say, "ps -o nice -p<pid>".
> >
> >The nice value *influences* the priority, but sometimes not as
> >much as you would think :-)
>
> I am looking at the right field. ;)
>
> But I can also see that all the options set in rc_flags already
> (before I did any editing) are not showing up in ps.
>
> For example, I can see several things running with options:
>
> 115 ? Ss 0:47.73 /usr/sbin/syslogd -s
> 374 ? IWs 0:00.06 /usr/sbin/inetd -l
> 377 ? I 0:25.43 qmgr -l -t unix -u
>
> However, ntpd isn't:
>
> 9116 ? Ss 0:02.50 /susr/sbin/ntpd
>
> But, rc_flags in an unmodified /etc/rc.d/ntpd says:
>
> rc_flags="-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags"
This line may not be executed, there's some 'return 0' before
in ntpd_precmd().
The correct way to set flags to ntpd is to use the ntpd_flags in /etc/rc.conf.
For example I have:
ntpd_flags="-A"
and ntpd is started with:
rochebonne:/home/bouyer/tmp/src/sys/dev/ic>ps axuww |grep ntpd
root 287 0.0 1.4 5472 5668 ? Ss 11:45AM 0:00.87 /usr/sbin/ntpd
-A
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index