Networking Forums

Networking Forums > Computer Networking > Linux Networking > NTPd questions

Reply
Thread Tools Display Modes

NTPd questions

 
 
Ignoramus28151
Guest
Posts: n/a

 
      12-18-2007, 10:53 AM
My biggest problems with ntpd are:

1) I have no idea whether it is actually working and doing its job, or
failing for whatever reasons

and

2) There is no way to force it to just "query the time now".

Consequently, for now, I am switching from it to just running ntpdate
from cron.

I want to know if anyone has resolved these issues.


Thanks

i
 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      12-18-2007, 11:19 AM
On Dec 18, 3:53 am, Ignoramus28151 <ignoramus28...@NOSPAM.
28151.invalid> wrote:
> My biggest problems with ntpd are:
>
> 1) I have no idea whether it is actually working and doing its job, or
> failing for whatever reasons


That's what programs like 'ntpq' and 'ntpdc' are for.

> and
>
> 2) There is no way to force it to just "query the time now".


Since that's not its purpose, why should there be? If you want to
query the time now, use a time querying program (like ntpdate) rather
than a time synchronization program like ntpd.

> Consequently, for now, I am switching from it to just running ntpdate
> from cron.


That's not good. If your clock is too fast, every time you run
'ntpdate' there may be a backwards jump.

> I want to know if anyone has resolved these issues.


Can you be a bit more specific? What are you seeing? What are you
expecting to see? What is your configuration? What does 'ntpq -np' or
'ntpdc -c sysinfo' show?

DS
 
Reply With Quote
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      12-18-2007, 11:20 AM
On 12/18/2007 05:23 PM, Ignoramus28151 wrote:
> My biggest problems with ntpd are:
>
> 1) I have no idea whether it is actually working and doing its job, or
> failing for whatever reasons
>
> and
>
> 2) There is no way to force it to just "query the time now".
>
> Consequently, for now, I am switching from it to just running ntpdate
> from cron.
>
> I want to know if anyone has resolved these issues.


Run from the rc scripts:

ntpd -q

before, daemonizing your ntpd, the manpage reads that above mimics the
'ntpdate' program.

Please see the ntpd manpage for further details.

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME (Unix Shoppe) Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
 
Reply With Quote
 
Robert Harris
Guest
Posts: n/a

 
      12-18-2007, 11:32 AM
Ignoramus28151 wrote:
> My biggest problems with ntpd are:
>
> 1) I have no idea whether it is actually working and doing its job, or
> failing for whatever reasons


Read your log files!

Robert

>
> and
>
> 2) There is no way to force it to just "query the time now".
>
> Consequently, for now, I am switching from it to just running ntpdate
> from cron.
>
> I want to know if anyone has resolved these issues.
>
>
> Thanks
>
> i

 
Reply With Quote
 
Douglas O'Neal
Guest
Posts: n/a

 
      12-18-2007, 12:07 PM
Ignoramus28151 wrote:
> My biggest problems with ntpd are:
>
> 1) I have no idea whether it is actually working and doing its job, or
> failing for whatever reasons
>
> and
>
> 2) There is no way to force it to just "query the time now".
>
> Consequently, for now, I am switching from it to just running ntpdate
> from cron.
>
> I want to know if anyone has resolved these issues.
>
>
> Thanks
>
> i


Issues resolved long ago.
1. Read the log files. ntpd outputs information through syslog. If
what is says isn't enough, try adding a -d or two to the startup
command line.
2. "query the time now" is something you generally want done only at
startup, which is when you run either ntpdate or ntpd -b.
 
Reply With Quote
 
Ignoramus28151
Guest
Posts: n/a

 
      12-18-2007, 01:01 PM
On 2007-12-18, Douglas O'Neal <(E-Mail Removed)> wrote:
> Ignoramus28151 wrote:
>> My biggest problems with ntpd are:
>>
>> 1) I have no idea whether it is actually working and doing its job, or
>> failing for whatever reasons
>>
>> and
>>
>> 2) There is no way to force it to just "query the time now".
>>
>> Consequently, for now, I am switching from it to just running ntpdate
>> from cron.
>>
>> I want to know if anyone has resolved these issues.
>>
>>
>> Thanks
>>
>> i

>
> Issues resolved long ago.
> 1. Read the log files. ntpd outputs information through syslog. If
> what is says isn't enough, try adding a -d or two to the startup
> command line.
> 2. "query the time now" is something you generally want done only at
> startup, which is when you run either ntpdate or ntpd -b.


OK. I think that my problems stemmed from mentioning clock2.redhat.com
in my ntp.conf. I went through a few servers and made sure that I
either run ntpdate regularly, or else that ntpd is set up properly.

i
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      12-18-2007, 03:56 PM
Ignoramus28151 <(E-Mail Removed)> writes:

>My biggest problems with ntpd are:


>1) I have no idea whether it is actually working and doing its job, or
>failing for whatever reasons


ntpq -p
will show you what the last query of the verious clocks was.
and will show you the offsets calculated for the various clocks.

Note that ntp will not do better than about a few msec because of latencies
in the networking software.


>and


>2) There is no way to force it to just "query the time now".


Why do you want it to do that? You could use chrony which has a burst
command to chronyc which queries the remote clocks now.
But it is not clear what this will accomplish. Perhaps if you told us why
you want these things, we could help you accomplish what you really want.
If you really want accurate times, why not use the Garmin GPS18LVM to set
up a microsecond accurate time standard on your machine?




>Consequently, for now, I am switching from it to just running ntpdate
>from cron.


While possible, this does not adjust the rate of the clock to take out the
worst discrepancies. Most computer clocks run from 10 to a hundred parts
per million out in the rate of the cpu tick. That is seconds per day. ntp
tries to adjust the clock rate so that the computer tick clock is accurate
as well as the time being accurate. ntpdate simply adjusts the time itself
AFAIK, and not the rate.



>I want to know if anyone has resolved these issues.


What issues? Neither of those sound like issues to me.



>Thanks


>i

 
Reply With Quote
 
s. keeling
Guest
Posts: n/a

 
      12-19-2007, 01:14 AM
["Followup-To:" header set to comp.os.linux.misc.]
David Schwartz <(E-Mail Removed)>:
>
> Can you be a bit more specific? What are you seeing? What are you
> expecting to see? What is your configuration? What does 'ntpq -np' or
> 'ntpdc -c sysinfo' show?


I don't know about him, but here lots of interesting stuff, thanks. I
didn't know about those before either.


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NTPD howto? Jack Snodgrass Linux Networking 15 05-14-2008 02:17 AM
ntpd kills ppp/pppoe/DSL r.u Linux Networking 4 06-16-2005 10:12 PM
ntpd Charles Linux Networking 3 01-07-2005 09:43 AM
ntpd log question James Knott Linux Networking 2 01-02-2004 07:37 PM
ntpdate / ntpd noone Linux Networking 2 11-21-2003 02:19 PM



1 2 3 4 5 6 7 8 9 10 11