Kai Ponte wrote:
I personally fire it up about once a week on the laptop by clicking an icon which simply runs
su /etc/init.d/ntp start
and then closes.
If you're only after adhoc/on-demand time-sync, why not just run ntpdate?
Well, a few reasons: First, I cannot find any good documentation. Second, it seems to do the same as ntp start. Third, it appears to be depricated from what I can find on google. Fourth, I still have to su to run it. Now, it would be nice if changing the system date/time on a single-user system could be made a non-root action. -- kai ponte www.perfectreign.com linux - genuine windows replacement part
Kai Ponte wrote:
If you're only after adhoc/on-demand time-sync, why not just run ntpdate?
Well, a few reasons:
First, I cannot find any good documentation.
Did you try "man ntpdate"? That produces about a page and half on my 10.1 beta3 system.
Second, it seems to do the same as ntp start.
"/etc/init.d/ntp start" is a script that starts the ntpd daemon. ntpdate just sets set time and date and exits.
Third, it appears to be depricated from what I can find on google.
Yeah, I think the ntpdate function is now covered by "ntpd -q" - maybe that's what you've got the startup script configured to do? If so, you could just do "ntpd -q".
Fourth, I still have to su to run it.
Yep.
Now, it would be nice if changing the system date/time on a single-user system could be made a non-root action.
I think you can set that up using "sudoers". /Per Jessen, Zürich -- http://www.spamchek.com/ - managed anti-spam and anti-virus solution. Let us analyse your spam- and virus-threat - up to 2 months for free.
Wednesday, 22 February 2006 22:21 samaye, Per Jessen alekhiit:
Did you try "man ntpdate"? That produces about a page and half on my 10.1 beta3 system.
For me on 10.0, man ntpdate does not give anything even though xntp-doc is installed. -- Tux #395953 resides at http://samvit.org playing with KDE 3.51 on SUSE Linux 10.0 $ date [] CCE +2006-02-23 W08-4 UTC+0530
Shriramana Sharma wrote:
Wednesday, 22 February 2006 22:21 samaye, Per Jessen alekhiit:
Did you try "man ntpdate"? That produces about a page and half on my 10.1 beta3 system.
For me on 10.0, man ntpdate does not give anything even though xntp-doc is installed.
Maybe you need to update your ntp-package? On 10.1 Beta3 mine is xntp-4.2.0a-57. /Per Jessen, Zürich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2006-02-23 at 12:41 +0530, Shriramana Sharma wrote:
Did you try "man ntpdate"? That produces about a page and half on my 10.1 beta3 system.
For me on 10.0, man ntpdate does not give anything even though xntp-doc is installed.
| cer@nimrodel:~> man ntpdate | Reformatting ntpdate(1), please wait... | NAME | NTP - Network Time Protocol | | SEE ALSO | | The NTP distribution does not include man pages. To learn more | about the NTP protocol and this software, please install the | xntp-doc package included in you SuSE Linux distribution. | |> In /usr/share/doc/packages/xntp-doc you will find the complete | set of documentation on building and configur ing a NTP server or | client. The documentation is in the form of HTML files suitable | for browsing and contains links to additional documentation at | various web sites. That is in 9.3 - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD/bhetTMYHG2NR9URAiviAJ9DDH70Gfrvuaom9DDFbayBD16hfwCeIIqC OI1PkltDXFoRYnnNZc3lRvY= =V9TO -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2006-02-22 at 08:14 -0800, Kai Ponte wrote:
If you're only after adhoc/on-demand time-sync, why not just run ntpdate?
Well, a few reasons:
First, I cannot find any good documentation.
No? Did you look well? "man ntpdate" says that the main documentation is in "/usr/share/doc/packages/xntp-doc". In there, you find two directories: NTP-FAQ and html - the names are self-explanatory. I fact, if you run "locate ntpdate" you find "/usr/share/doc/packages/xntp-doc/html/ntpdate.html", which is a fairly good doc.
Second, it seems to do the same as ntp start.
Not really. The script call "ntp start" calls ntpdate, and then it starts the "ntpd" daemon, which remains running till you stop it or halt the computer. Remember it needs a permanent network connection. In fact, the script call "rcxntpd ntptimeset" is the one that really sets the clock once and exits, not "start". And it use the "/etc/ntp.conf" configuration file, so it is far easier to call than ntpdate.
Third, it appears to be depricated from what I can find on google.
So they have been saying for some years now: I have stopped paying attention to that.
Fourth, I still have to su to run it.
Same as for "ntp start".
Now, it would be nice if changing the system date/time on a single-user system could be made a non-root action.
Never! Use 'sudo' if you must. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD/K4gtTMYHG2NR9URArBWAJ4yJy0I8B8+aP1g3yj+B+ArpcGu6QCgkL0P qs7MPXd/F1PsPn2etOdsPI8= =A0cv -----END PGP SIGNATURE-----
Carlos E. R. wrote:
The script call "ntp start" calls ntpdate, and then it starts the "ntpd" daemon, which remains running till you stop it or halt the computer. Remember it needs a permanent network connection.
Perhaps as a last comment - ntpd does't actually need a permanent network connection. When it has one, it'll try to sync with whichever server you have specified, and when it doesn't have a connection, you can configure it to pretend the local clock is good enough (I think this is the default SUSE config).
And it use the "/etc/ntp.conf" configuration file, so it is far easier to call than ntpdate.
Actually, I think the advantage of ntpdate is that you can use without a fully configured ntpd. "ntpdate <server> works fine regardless of what you've got in ntp.conf. /Per Jessen, Zürich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2006-02-22 at 21:17 +0100, Per Jessen wrote:
The script call "ntp start" calls ntpdate, and then it starts the "ntpd" daemon, which remains running till you stop it or halt the computer. Remember it needs a permanent network connection.
Perhaps as a last comment - ntpd does't actually need a permanent network connection. When it has one, it'll try to sync with whichever server you have specified, and when it doesn't have a connection, you can configure it to pretend the local clock is good enough (I think this is the default SUSE config).
True enough. But it is pointless to start it then, anyway :-)
And it use the "/etc/ntp.conf" configuration file, so it is far easier to call than ntpdate.
Actually, I think the advantage of ntpdate is that you can use without a fully configured ntpd. "ntpdate <server> works fine regardless of what you've got in ntp.conf.
Well, yes, and no. The only thing needed for 'rcxntpd ntptimeset' to work is that '/etc/ntp.conf' has the servers defined, the rest is ignored. It is a trick done by SuSE, not the work of ntpdate. In other words, the script extracts the server names from the configuration file, then calls ntpdate with the servers in the command line ;-) - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD/QwktTMYHG2NR9URAoj3AJ9eFUxR0YRuLcOBSgFjix0bjp4DaACeJ/cK M1OsTj3dOhV8IZp0clxUrGA= =zVGc -----END PGP SIGNATURE-----
Carlos E. R. wrote:
Perhaps as a last comment - ntpd does't actually need a permanent network connection. When it has one, it'll try to sync with whichever server you have specified, and when it doesn't have a connection, you can configure it to pretend the local clock is good enough (I think this is the default SUSE config).
True enough. But it is pointless to start it then, anyway :-)
Not quite. I guess it depends - if I would like my system to be sync'ed to a precise clock, and my network connection is intermittent (dial-up or just unstable), I would still just start ntpd and forget about it. That way I would achieve a situation of "mostly synced clock" without giving it any more thought. /Per Jessen, Zürich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Thursday 2006-02-23 at 08:25 +0100, Per Jessen wrote:
True enough. But it is pointless to start it then, anyway :-)
Not quite. I guess it depends - if I would like my system to be sync'ed to a precise clock, and my network connection is intermittent (dial-up or just unstable), I would still just start ntpd and forget about it. That way I would achieve a situation of "mostly synced clock" without giving it any more thought.
I think that ntpd polls the server at long intervals, once it is in sync. That means that it may well happen that the poll happens when the connection is down (and it will complain), and that it doesn't poll when the connection is open. It would be far better to call either ntpd or ntpdate from the "/etc/ppp/ip-up.local" script automatically when the connection goes up, and removing the service, again automatically, when it goes down. That's what I have there, by the way. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD/beztTMYHG2NR9URAhmaAJ4jQ0CIt8daU0RdnJKJjqpRQAQmLgCeOcGI 6FCttPJ+EmSsdyhf0hjyhRU= =nR5z -----END PGP SIGNATURE-----
On Thursday 23 February 2006 01:25, Per Jessen wrote:
Carlos E. R. wrote:
Perhaps as a last comment - ntpd does't actually need a permanent network connection. When it has one, it'll try to sync with whichever server you have specified, and when it doesn't have a connection, you can configure it to pretend the local clock is good enough (I think this is the default SUSE config).
True enough. But it is pointless to start it then, anyway :-)
Not quite. I guess it depends - if I would like my system to be sync'ed to a precise clock, and my network connection is intermittent (dial-up or just unstable), I would still just start ntpd and forget about it. That way I would achieve a situation of "mostly synced clock" without giving it any more thought.
I believe Per is correct. I've used xntpd on my dial-up machine now for almost 6 months and it's not given me any troubles at all, and I got the same 'warning' about not having a permanent connection to the 'net. I've had no system inconsistencies at all.
participants (6)
-
Carlos E. R.
-
James Knott
-
JB
-
Kai Ponte
-
Per Jessen
-
Shriramana Sharma