Re: Enhacement request - 'date' util

2009-08-13 Thread Philip Rowlands

On Wed, 12 Aug 2009, Alejandro Redondo wrote:


Well, the first clock set, when ntpd starts, is made in just one step.
This can be a problem when the client host is several seconds different than 
the ntp server.


Stepping versus slewing can be configured in ntpd. By default small time 
offsets are slewed, and large offsets stepped.


In the example I suffered, I had to sync different flavors clients with the 
ntpd servers.
Unluckily some of them had the ntpd daemon stopped for a lot of time and they 
had differences, to have an example, about 100secs (ntpdate -d ntp_serve 
used to know it).
It was not a problem on solaris/hpux boxes to use the date -a 100.00 and 
then restart the ntpd daemon with the right config avoiding a 100secs jump in 
time.


How fast does the kernel slew? A 0.5ms/s drift rate will fix 100s error 
in around 2.3 days; slewing is inappropriate for large corrections. If 
software can't tolerate backward steps in time then perhaps it's better 
to halt it while the system clock is fixed. (BTW, leap seconds make 
this hard.)


These commands are better suited to altering the frequency of the system 
clock:

ntpdate -B
ntpd -g -q -x
adjtimex --singleshot


Cheers,
Phil




Re: Enhacement request - 'date' util

2009-08-13 Thread Matthew Woehlke

Alejandro Redondo wrote:

Hi again,
sorry about those HTML characters... I sent the first email from a 
webmail client.

And sorry about my bad English too, it's not my natal language.


I didn't notice anything wrong with your English, actually :-).

(Why is it, I wonder, that non-native speakers always assume their 
English is bad? ;-) Or do us native speakers simply not notice because 
/our/ English is equally bad? And I am serious about that, English is a 
notoriously abused language and there are /very/ few people that use it 
properly. I'm not one of them.)



Well, the first clock set, when ntpd starts, is made in just one step.


Ideally that should be at system startup, when nothing that would get 
confused is running yet ;-).


--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
ELANG: input is in wrong language (please use English on English lists)





Enhacement request - 'date' util

2009-08-12 Thread Alejandro Redondo
Good morning from Spain,first of all, thanks for your effort and for this rich
featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; feature, like
other UNIXes distros do?Man from solaris 10:-a [-]sss.fffnbsp;nbsp; Slowly
adjust the timenbsp; bynbsp; sss.fffnbsp; seconds (fff represents fractions
of a second). This adjustment can be positive or negative.nbsp; The
system'snbsp; clocknbsp; isnbsp; spednbsp; up or slowed down untilnbsp;
itnbsp; has drifftednbsp; bynbsp; thenbsp; numbernbsp; of secondsnbsp;
specified.Man from hpux 11.23:-a [-]sss[.fff] Slowly adjust the time by
sss.fff seconds (fff represents fractions of a second).nbsp; This adjustment
can be positive or negative.nbsp; The system's clock will be sped up or
slowed down until it has drifted by the number of seconds specified.Really
useful feature to avoid crashes and dumps in apps like SAP or Oracle when
changing time is needed.Thanks for your time,sincerelyAlejandro Redondo.
_
This mail sent using V-webmail - http://www.v-webmail.org


Re: Enhacement request - 'date' util

2009-08-12 Thread Matthew Woehlke
Please use newlines and don't use HTML entities in text mail (or don't 
send HTML, if that was the problem).


Your original mail looked like this:

Good morning from Spain,first of all, thanks for your effort and for this rich
featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; feature, like


It is extremely difficult to read this block of text that has no 
newlines except where line wrapping occurred, is missing spaces between 
paragraphs, and is strewn with HTML entities.


I have reformatted the relevant parts so that it is legible.

Alejandro Redondo wrote:

Secondly, to the date command developers, it would be possible to
develop the -a feature, like other UNIXes distros do?

Man from solaris 10:
-a [-]sss.fff   Slowly adjust the time by sss.fff seconds (fff
represents fractions of a second). This adjustment can be positive or
negative.  The system's clock is sped up or slowed down until it has
drifted by the number of seconds specified.

Man from hpux 11.23:
[snipped; same as above]

Really useful feature to avoid crashes and dumps in apps like SAP or
Oracle when changing time is needed.


While that does indeed sound like an interesting option, and there is 
precedent of other OS's having it, I am curious why you don't just use ntpd?


--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
ESIG: .sig file not available




Re: Enhacement request - 'date' util

2009-08-12 Thread Alejandro Redondo

Matthew Woehlke escribió:
Please use newlines and don't use HTML entities in text mail (or don't 
send HTML, if that was the problem).


Your original mail looked like this:
Good morning from Spain,first of all, thanks for your effort and for 
this rich

featured tools... awesome work!Secondly, to the quot;datequot; command
developers, it would be possible to develop the quot;-aquot; 
feature, like


It is extremely difficult to read this block of text that has no 
newlines except where line wrapping occurred, is missing spaces 
between paragraphs, and is strewn with HTML entities.


I have reformatted the relevant parts so that it is legible.

Alejandro Redondo wrote:

Secondly, to the date command developers, it would be possible to
develop the -a feature, like other UNIXes distros do?

Man from solaris 10:
-a [-]sss.fff   Slowly adjust the time by sss.fff seconds (fff
represents fractions of a second). This adjustment can be positive or
negative.  The system's clock is sped up or slowed down until it has
drifted by the number of seconds specified.

Man from hpux 11.23:
[snipped; same as above]

Really useful feature to avoid crashes and dumps in apps like SAP or
Oracle when changing time is needed.


While that does indeed sound like an interesting option, and there is 
precedent of other OS's having it, I am curious why you don't just use 
ntpd?



Hi again,
sorry about those HTML characters... I sent the first email from a 
webmail client.

And sorry about my bad English too, it's not my natal language.

Well, the first clock set, when ntpd starts, is made in just one step.
This can be a problem when the client host is several seconds different 
than the ntp server.


In the example I suffered, I had to sync different flavors clients with 
the ntpd servers.
Unluckily some of them had the ntpd daemon stopped for a lot of time and 
they had differences, to have an example, about 100secs (ntpdate -d 
ntp_serve used to know it).
It was not a problem on solaris/hpux boxes to use the date -a 100.00 
and then restart the ntpd daemon with the right config avoiding a 
100secs jump in time.
This was not the same for the Linux ones as I did not find a solution to 
slowly (but without notorious jumps) adjust the system clock and then 
restart the ntpd.


Best regards,