Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NTPD
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
Norad
n00b
n00b


Joined: 07 Nov 2004
Posts: 29

PostPosted: Tue Dec 28, 2004 9:54 am    Post subject: NTPD Reply with quote

Salve a tutti.....ho un problema con NTPD. Ho la necessità di tenere sotto controllo l'orologio del sistema continuamente e di aggiustarlo al volo perchè pare che il quarzo del processore stia andando un po' per i conti suoi.
Ora un'amico mi ha consigliato ntpd. Installo e lo lascio andare.
Dopo un quarto d'ora mi accorgo che non è cambiato nulla.
Allora ho dato
Code:

ntpd -d

per vedere che cavolo succedeva e mi da questo:
Code:

reply from 63.127.106.213: offset 346.387289 delay 0.148960, next query 30s
reply from 81.169.154.44: offset 346.670488 delay 0.420657, next query 30s
reply from 207.234.209.181: offset 347.083618 delay 0.196941, next query 30s
reply from 198.144.202.250: offset 347.080624 delay 0.252524, next query 30s
reply from 213.98.118.5: offset 347.176619 delay 0.142338, next query 30s
adjusting local clock by 342.941877s
reply from 216.252.70.172: offset 347.334616 delay 0.456206, next query 30s
reply from 80.253.108.112: offset 347.631511 delay 0.095236, next query 30s
reply from 195.197.87.213: offset 347.631667 delay 0.108517, next query 30s
reply from 63.127.106.213: offset 347.609897 delay 0.175175, next query 30s
reply from 81.169.154.44: offset 347.820413 delay 0.203478, next query 30s


Ora, come si può vedere da qui si accorge che c'è un offset di 347.176619 secondi al che aggiorna ( o meglio tenta di aggiornare) di 342.941877 secondi. Solo che al controllo dopo si nota un offset addirittura maggiore di quello precedente alla procedura di aggiornamento dell'o ra, infatti segna 347.334616 come offset.
Chiaro che qualcosa non va. Il problema è: cosa?
Sembra quasi che per lui l'ora venga aggiornata ma in realtà no....ideas?
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue Dec 28, 2004 10:04 am    Post subject: Reply with quote

Prova a lanciare:

Code:
ntpdate -Q -b -u pool.ntp.org

_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
[PHT]Giangi
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2004
Posts: 110
Location: Rome - ITALY -

PostPosted: Tue Dec 28, 2004 10:55 am    Post subject: Reply with quote

prova come nel mio caso :
root # ntpq
ntpq> pe
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp2.ien.it .IEN. 1 u 765 1024 347 23.413 0.308 4.749
+ntp1.ien.it .IEN. 1 u 994 1024 377 20.605 -1.009 1.784
_________________
Powered by : Gentoo Linux on PowerMac G5 2 CPU 2.00GHz.
Back to top
View user's profile Send private message
Norad
n00b
n00b


Joined: 07 Nov 2004
Posts: 29

PostPosted: Tue Dec 28, 2004 11:04 am    Post subject: Reply with quote

Mi dice che -Q non è una flag conosciuta...ho usato -q e mi ha dato questo:

Code:

root@alpha norad # ntpdate -q -b -u pool.ntp.org
server 62.212.114.68, stratum 2, offset 884.605921, delay 0.21144
28 Dec 11:48:49 ntpdate[1686]: step time server 62.212.114.68 offset 884.605921 sec
root@alpha norad #


Per l'altro comando suggerito da mister nucleare (non mi ricordo il nick e non ho voglia di andarlo a guardare):
Code:

ntpq
ntpq> pe
ntpq: read: Connection refused
ntpq> pe
ntpq: read: Connection refused
ntpq> pe
ntpq: read: Connection refused
ntpq>


Last edited by Norad on Tue Dec 28, 2004 11:07 am; edited 1 time in total
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue Dec 28, 2004 11:07 am    Post subject: Reply with quote

Ora l'ora è corretta ?!?
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
Norad
n00b
n00b


Joined: 07 Nov 2004
Posts: 29

PostPosted: Tue Dec 28, 2004 11:08 am    Post subject: Reply with quote

Gutter, no.....
Back to top
View user's profile Send private message
[PHT]Giangi
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2004
Posts: 110
Location: Rome - ITALY -

PostPosted: Tue Dec 28, 2004 11:16 am    Post subject: Reply with quote

Norad wrote:
Mi dice che -Q non è una flag conosciuta...ho usato -q e mi ha dato questo:

Code:

root@alpha norad # ntpdate -q -b -u pool.ntp.org
server 62.212.114.68, stratum 2, offset 884.605921, delay 0.21144
28 Dec 11:48:49 ntpdate[1686]: step time server 62.212.114.68 offset 884.605921 sec
root@alpha norad #


Per l'altro comando suggerito da mister nucleare (non mi ricordo il nick e non ho voglia di andarlo a guardare):
Code:

ntpq
ntpq> pe
ntpq: read: Connection refused
ntpq> pe
ntpq: read: Connection refused
ntpq> pe
ntpq: read: Connection refused
ntpq>


Credo che tu abbia NTPD non configurato in modo corretto, verifica con :
root#rc.update -s
se ntpd come init script sia installato è sia partito, poi verifica in /etc/ntp.conf che i server del tempo di rete sono correttamente indicati nelle direttive del file.........
_________________
Powered by : Gentoo Linux on PowerMac G5 2 CPU 2.00GHz.
Back to top
View user's profile Send private message
Norad
n00b
n00b


Joined: 07 Nov 2004
Posts: 29

PostPosted: Tue Dec 28, 2004 11:37 am    Post subject: Reply with quote

allora, ntpd è in default quindi parte all' avvio. in ntp.conf c'è questo:
Code:

server bernina.ethz.ch
server libra.rice.edu
server ntp.cox.smu.edu
server ntp.tmc.edu
server bernina.ethz.ch
server ntp.univ-lyon1.fr
server time.ien.it
server ntp0.nl.net
server ntp2.nl.net
server ntp1.nl.net

e mi sembra sia giusto.
Posto anche ntpd.conf tanto per scrupolo:
Code:

# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
# sample ntpd configuration file, see ntpd.conf(5)

# Addresses to listen on (ntpd does not listen by default)
#listen on *
#listen on 127.0.0.1
#listen on ::1

# sync to a single server
#server ntp.ubuntulinux.org

# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
servers pool.ntp.org
Back to top
View user's profile Send private message
masterbrian
Guru
Guru


Joined: 13 Feb 2004
Posts: 461

PostPosted: Tue Dec 28, 2004 11:58 am    Post subject: Reply with quote

posso consigliarti di usare rdate (in portage) al posto di ntp? Io mi sono trovato benissimo, e' molto piu' semplice di ntp (anche se non e' un server, ma tu lo devi installare sul client no?)

fai per esempio rdate -s time.ien.it e il tuo orologio e' a posto :)
Se lo metti in cron poi sei a posto 8)
Back to top
View user's profile Send private message
gutter
Bodhisattva
Bodhisattva


Joined: 13 Mar 2004
Posts: 7162
Location: Aarau, Aargau, Switzerland

PostPosted: Tue Dec 28, 2004 12:04 pm    Post subject: Reply with quote

Naturalmente poi devi settare l'orologio hardware dal momento che ntpdate configura quello software.
Il comando per configrare l'orologio hardware è hwclock.
_________________
Registered as User #281564 and Machines #163761
Back to top
View user's profile Send private message
[PHT]Giangi
Tux's lil' helper
Tux's lil' helper


Joined: 27 Dec 2004
Posts: 110
Location: Rome - ITALY -

PostPosted: Tue Dec 28, 2004 1:47 pm    Post subject: Reply with quote

Norad wrote:
allora, ntpd è in default quindi parte all' avvio. in ntp.conf c'è questo:
Code:

server bernina.ethz.ch
server libra.rice.edu
server ntp.cox.smu.edu
server ntp.tmc.edu
server bernina.ethz.ch
server ntp.univ-lyon1.fr
server time.ien.it
server ntp0.nl.net
server ntp2.nl.net
server ntp1.nl.net

e mi sembra sia giusto.
Posto anche ntpd.conf tanto per scrupolo:
Code:

# $OpenBSD: ntpd.conf,v 1.7 2004/07/20 17:38:35 henning Exp $
# sample ntpd configuration file, see ntpd.conf(5)

# Addresses to listen on (ntpd does not listen by default)
#listen on *
#listen on 127.0.0.1
#listen on ::1

# sync to a single server
#server ntp.ubuntulinux.org

# use a random selection of 8 public stratum 2 servers
# see http://twiki.ntp.org/bin/view/Servers/NTPPoolServers
servers pool.ntp.org


Per caso attraversi un proxy o un firewall .....
_________________
Powered by : Gentoo Linux on PowerMac G5 2 CPU 2.00GHz.
Back to top
View user's profile Send private message
Norad
n00b
n00b


Joined: 07 Nov 2004
Posts: 29

PostPosted: Tue Dec 28, 2004 5:48 pm    Post subject: Reply with quote

Attraverso un firewall con un po' di regole iptables ma non mi sono posto il problema in quanto a me serve solo il client e non far da server.
E poi secondo me il problema non è la connessione che viene bloccata in quanto, come scritto nel primo post, i server li becca e trova anche l'offset........ ideas?
Back to top
View user's profile Send private message
codadilupo
Advocate
Advocate


Joined: 05 Aug 2003
Posts: 3135

PostPosted: Thu Feb 03, 2005 11:23 pm    Post subject: Reply with quote

riesumo questo post... e chiedo.. ma se ti serve solo il client, perché cerchi di lanciare ntpd ? quello che devi fare é editare /etc/conf.d/ntp-client.conf e mettere un server ntp che ti aggrada... ad esempio ntp.ubuntulinux.org e poi dare un bel

Code:
# rc-update ntp-client default


Coda
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum