You are supposed to be able to use the -N (--nice) option to ntpd but
upstream ntp bug report shows it doesn't work:
http://bugs.ntp.org/show_bug.cgi?id=1230
Testing on 11.04
$ lsb_release -ds
Ubuntu 11.04
$ uname -srv
Linux 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011
$ ntpd
I thought it might be because the setpriority() call was tried after
permissions were dropped but running as UID 0 doesn't change the
niceness as seen in ps output
$ (ps alx | head -1) ; (ps alx | grep ntpd) | grep -v grep
F UID PID PPID PRI NIVSZ RSS WCHAN STAT TTYTIME
When run with -N and -u 117:126
Aug 19 08:14:22 linux ntpd[14158]: sched_setscheduler(): Operation not permitted
Aug 19 08:14:22 linux ntpd[14158]: setpriority() error: Permission denied
Aug 19 08:14:22 linux ntpd[14158]: set_process_priority: No way found to
improve our priority
Freaking
This can be added to the apparmor profile to allow -N option to work:
capability sys_nice,
Then run:
$ sudo apparmor_parser -r /etc/apparmor.d/usr.sbin.ntpd
I'm preparing an upload for this policy change now.
--
You received this bug notification because you are a member of Ubuntu
Server
ntp (1:4.2.6.p2+dfsg-1ubuntu11) oneiric; urgency=low
* debian/apparmor-profile: allow sys_nice for -N option to work. More
work is needed to make ntpd start niced, so not auto-closing the bug.
- LP: 229632
--
You received this bug notification because you are a member of Ubuntu
Server
I switched AppArmor for ntpd into complain mode
$ sudo aa-complain /usr/sbin/ntpd
Setting /usr/sbin/ntpd to complain mode.
after that the ntpd -N flag started to work.
$ (ps alx | head -1) ; (ps alx | grep ntpd) | grep -v grep
F UID PID PPID PRI NIVSZ RSS WCHAN STAT TTYTIME
Oops, didn't read Jamie's posts until just now, thanks Jamie!
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/229632
Title:
ntpd should run niced
To manage notifications about this bug
Can an SRU for Lucid be done for the AppArmor modification too?
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/229632
Title:
ntpd should run niced
To manage notifications about this
@Jamie given that the default ntpd configuration is to poll and the
stability of the clock affects the polling interval[1] I would strongly
suggest the default ntpd configuration be adjusted to run with the -N
option since it would cut down on the load of NTP servers if polling was
less frequent.
The minimum sleep time between ntpd upstream requests is 64 seconds.
With 64000 clients an ntpd server must answer one thousand requests per
second.
If the client ntpd clocks are very stable they will ratchet back to one
request every 1024 seconds (about 17 minutes) so the same 6400 clients
would
Try with and with out ntpd -N option.
Use ntpq -p or ntpdc -c peers to view the polling interval. Both
reports have a poll column which is the sleep time in seconds between
requests being sent out over the network to the upstream NTP source.
The poll column will eventually change from 64 to 128
@Weisi comment #7 is comment #6 in a patch file without line-breaks.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/229632
Title:
ntpd should run niced
To manage notifications about
I should probably submit this change to Debian not Canonical.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/229632
Title:
ntpd should run niced
To manage notifications about this bug
I fully support this request.
Comment #6 is a good solution. Please note that due to the line-breaks the diff
won't work without mangling.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in Ubuntu.
** Tags added: patch
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in ubuntu.
--
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings
** Patch added: Adds an option to /etc/default/ntp to make the priority level
of ntpd configurable.
http://launchpadlibrarian.net/39006866/ntp-priority.patch
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of
We are limited a single NTP upstream source due to political reasons
outside our control and our Ubuntu ntpd loses sync periodically. I
tried a number of solutions but they all failed. When I tried setting
the ntpd server's nice value to negative eight it just works. Clearly
the stability of
Edit:
while true ; do ntpq -p | grep name-of-upstream-time-source | logger -t
ntpq -p daemon.info; sleep 64; done
the sleep 64 was missing.
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of Ubuntu
Server Team, which
Scheduler preemption of ntpd causes the time on other systems to appear
unstable since measurements are ruined if preemption occurs during them.
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of Ubuntu
Server Team,
You can edit your defaults file to run ntpd at maximum priority:
--- /etc/default/ntp~ 2009-12-04 13:07:15.0 -0500
+++ /etc/default/ntp2010-02-09 17:56:07.0 -0500
@@ -1 +1 @@
-NTPD_OPTS='-g'
+NTPD_OPTS='-g -N'
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
Actually the -N argument does nothing.
--
ntpd should run niced
https://bugs.launchpad.net/bugs/229632
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to ntp in ubuntu.
--
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Hacking the startup script seems to be the best temporary fix.
-- default-intrepid-ntp-init-script 2010-02-09 15:01:43.255277872 -0500
+++ /etc/init.d/ntp 2010-02-09 15:02:48.0 -0500
@@ -57,7 +57,7 @@
exit 1
fi
lock_ntpdate
-
22 matches
Mail list logo