Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fastidioso problema con l' orologio
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
enx89
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 192
Location: Milano

PostPosted: Sun Apr 06, 2003 8:19 pm    Post subject: fastidioso problema con l' orologio Reply with quote

E' da quando uso linux che ho dei problemi con l'orologio!! Ho fatto il link simbolico di /etc/localtime con /usr/share/zoneinfo/Europe/Rome ma l' orologio è avanti di due ore!! So che non è un problema grosso, anzi è un problemino ino ino, ma abbastanza fastidioso. :x
Cosa si può fare per metterlo a posto?
Grazie ENx
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Sun Apr 06, 2003 9:17 pm    Post subject: Reply with quote

Se è avanti, spostalo indietro :)

O forse ti avanza da solo?
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
enx89
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 192
Location: Milano

PostPosted: Sun Apr 06, 2003 9:28 pm    Post subject: Reply with quote

l' orologio impostato nel bios è giusto e quando imposto il localtime a Rome, dando il comando "date" mi restituisce un orario avanti di 2 ore?
Come mai?
Quote:
Se è avanti, spostalo indietro

Come faccio a spostarlo indietro?
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Sun Apr 06, 2003 9:43 pm    Post subject: Reply with quote

Se l'orologio hardware è in localtime, controlla che in '/etc/rc.conf' sia settato 'CLOCK="local"'.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
blaze_
n00b
n00b


Joined: 16 Mar 2003
Posts: 36
Location: Milan, Italy

PostPosted: Sun Apr 06, 2003 10:32 pm    Post subject: Reply with quote

Code:

emerge rdate
rdate -s time.ien.it


questo ti sincronizza l'ora con l'istituto elettrotecnico nazionale, io ad esempio mi son creato uno script rc che lo fa allo startup

/etc/init.d/rdate
Code:

#!/sbin/runscript

start() {
        ebegin "Getting date from time.ien.it"
        rdate -s time.ien.it
        eend $? "Date Syncronization failed"
}

stop() {

        echo "";
}


per attivare il servizio

Code:

rc-update add rdate default

_________________
Lino
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Sun Apr 06, 2003 10:43 pm    Post subject: Reply with quote

Carino, ma ha senso lo stop? Da quel che ne so nello script non è strettamente necessario, solo lo start è mandatorio quindi dato che non è che faccia granché...
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
IgaRyu
Guru
Guru


Joined: 23 Jan 2003
Posts: 302
Location: Verona

PostPosted: Mon Apr 07, 2003 8:12 am    Post subject: Reply with quote

Direi di si se non altro per una questione di compatibilita degli scripts :lol:
_________________
One Flew East
One Flew West
Some Flew On The Kukool's Nest
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Mon Apr 07, 2003 9:50 am    Post subject: Reply with quote

IgaRyu wrote:
Direi di si se non altro per una questione di compatibilita degli scripts :lol:

Appunto, per essere script validi basta contengano la funzione 'start' (credo).
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
IgaRyu
Guru
Guru


Joined: 23 Jan 2003
Posts: 302
Location: Verona

PostPosted: Mon Apr 07, 2003 9:55 am    Post subject: Reply with quote

No lo 'stadard' prevede la presenza di tutte e tre le funzioni:
start
stop
restart

Joe
_________________
One Flew East
One Flew West
Some Flew On The Kukool's Nest
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Mon Apr 07, 2003 11:15 am    Post subject: Reply with quote

IgaRyu wrote:
No lo 'stadard' prevede la presenza di tutte e tre le funzioni:
start
stop
restart

Joe

Allora questa nota trovata qui:
Quote:
Note: Any rc-script needs at least the "start" funtion.

cosa vuole dire? Bisogna farla modificare o sono io che interpreto male?


PS: modificare di sicuro... "funtion" :D
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
IgaRyu
Guru
Guru


Joined: 23 Jan 2003
Posts: 302
Location: Verona

PostPosted: Mon Apr 07, 2003 11:34 am    Post subject: Reply with quote

bhe quella affermazione ha un certo senso logico ... at least .. almeno... se non avesse almeno quella non avrebbe senso... ma su un altro doc che riguardava la reazione degli scripts (ma non ricordo quale) parlavano appunto di quello standard
_________________
One Flew East
One Flew West
Some Flew On The Kukool's Nest
Back to top
View user's profile Send private message
l0rdt
n00b
n00b


Joined: 04 Apr 2003
Posts: 34
Location: Cosenza (ITALY)

PostPosted: Mon Apr 07, 2003 11:47 am    Post subject: Reply with quote

blaze_ wrote:
/etc/init.d/rdate
Code:

#!/sbin/runscript

start() {
        ebegin "Getting date from time.ien.it"
        rdate -s time.ien.it
        eend $? "Date Syncronization failed"
}

stop() {

        echo "";
}

Idea simpatica, ma se non aggiungi un
Code:

depend() {
 need net
}
non penso sia molto efficace :wink:
Back to top
View user's profile Send private message
Ginko
Guru
Guru


Joined: 01 May 2002
Posts: 371
Location: nearby my linux laptop

PostPosted: Mon Apr 07, 2003 12:16 pm    Post subject: Reply with quote

l0rdt wrote:

Idea simpatica, ma se non aggiungi un
Code:

depend() {
 need net
}
non penso sia molto efficace :wink:


Molto giusto, infatti questo workaround funge
solo se sei in rete ed hai accesso al server ntp.

Io credo invece che tu debba settare

Code:
CLOCK="local"


in

    /etc/rc.conf


come gia' suggerito e poi affidarti a

    /etc/init.d/clock


per la sincronizzazione tra l'HW ed il System clock.

--Gianluca
Back to top
View user's profile Send private message
enx89
Apprentice
Apprentice


Joined: 21 Mar 2003
Posts: 192
Location: Milano

PostPosted: Mon Apr 07, 2003 4:02 pm    Post subject: Reply with quote

blaze_ wrote:
Code:

emerge rdate
rdate -s time.ien.it


questo ti sincronizza l'ora con l'istituto elettrotecnico nazionale, io ad esempio mi son creato uno script rc che lo fa allo startup

/etc/init.d/rdate
Code:

#!/sbin/runscript

start() {
        ebegin "Getting date from time.ien.it"
        rdate -s time.ien.it
        eend $? "Date Syncronization failed"
}

stop() {

        echo "";
}


per attivare il servizio

Code:

rc-update add rdate default


Mi sembra molto interessante quello che hai fatto e credo che prenderò spunto da te, anche perchè ho un adsl 640 sempre connessa.
Grazie a tutti ENx

P.S.: io il clock,in rc.conf, l' ho settato su local, ma a cosa devo linkare il file /etc/localtime?
Back to top
View user's profile Send private message
blaze_
n00b
n00b


Joined: 16 Mar 2003
Posts: 36
Location: Milan, Italy

PostPosted: Mon Apr 07, 2003 9:54 pm    Post subject: Reply with quote

per gli rc-script non serve la stop() o la depend() per forza
infatti il mio stop() non ha assolutamente senso :)
_________________
Lino
Back to top
View user's profile Send private message
l0rdt
n00b
n00b


Joined: 04 Apr 2003
Posts: 34
Location: Cosenza (ITALY)

PostPosted: Tue Apr 08, 2003 8:46 am    Post subject: Reply with quote

blaze_ wrote:
per gli rc-script non serve la stop() o la depend() per forza
infatti il mio stop() non ha assolutamente senso :)

in questo caso
Code:
depend(){need net}
dovrebbe essere necessario per essere sicuri che lo script sia eseguito dopo aver tirato su la rete :wink:
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Tue Apr 08, 2003 8:51 am    Post subject: Reply with quote

l0rdt wrote:
blaze_ wrote:
per gli rc-script non serve la stop() o la depend() per forza
infatti il mio stop() non ha assolutamente senso :)

in questo caso
Code:
depend(){need net}
dovrebbe essere necessario per essere sicuri che lo script sia eseguito dopo aver tirato su la rete :wink:

Credo blaze_ intendesse quello che ho detto prima anch'io, cioé che non sono "strettamente" necessari perché uno script sia valido, per esserlo può limitarsi a contenere solo 'start'.
_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
l0rdt
n00b
n00b


Joined: 04 Apr 2003
Posts: 34
Location: Cosenza (ITALY)

PostPosted: Wed Apr 09, 2003 1:26 pm    Post subject: Reply with quote

bsolar wrote:

Credo blaze_ intendesse quello che ho detto prima anch'io, cioé che non sono "strettamente" necessari perché uno script sia valido, per esserlo può limitarsi a contenere solo 'start'.

Oops sorry avevo letto male :oops:
Back to top
View user's profile Send private message
bubble27
Guru
Guru


Joined: 07 Aug 2003
Posts: 365
Location: Campobasso

PostPosted: Wed Sep 24, 2003 9:44 am    Post subject: Reply with quote

ghghgh è da un pò di tempo che ho problemi con l'ora di sistema..... a volte va avanti ed a volte va indietro ..... ho provato con ntp, adesso con rdate ma guardate qua......

dopo aver emerso rdate......


Lowenbrau root # date <=== prima di utilizzare rdate
mer set 24 11:40:24 UTC 2003
Lowenbrau root # rdate -s time.ien.it <=== utilizzo di rdate
Lowenbrau root # date
mer set 24 09:42:29 UTC 2003 8O <=== ma ci colleghiamo con un server italiano ?_?

stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
:P :P

ciao gentooaglia
Back to top
View user's profile Send private message
darksides
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2003
Posts: 102

PostPosted: Wed Sep 24, 2003 10:44 am    Post subject: Reply with quote

hai settato l'RTC nel kernel?
Back to top
View user's profile Send private message
bubble27
Guru
Guru


Joined: 07 Aug 2003
Posts: 365
Location: Campobasso

PostPosted: Wed Sep 24, 2003 10:49 am    Post subject: Reply with quote

darksides wrote:
hai settato l'RTC nel kernel?


si se intendi questo ....

CONFIG_RTC=y

:wink:
Back to top
View user's profile Send private message
bsolar
Bodhisattva
Bodhisattva


Joined: 12 Jan 2003
Posts: 2764

PostPosted: Wed Sep 24, 2003 10:58 am    Post subject: Reply with quote

bubble27 wrote:
Lowenbrau root # date
mer set 24 09:42:29 UTC 2003 8O <=== ma ci colleghiamo con un server italiano ?_?

stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
:P :P

La loro ora mi pare corretta, ovviamente non usano l'ora locale, esattamente come stai facendo te dato che hai UTC. Controlla il link /etc/localtime.
Code:
# date
Wed Sep 24 13:00:55 CEST 2003

_________________
I may not agree with what you say, but I'll defend to the death your right to say it.
Back to top
View user's profile Send private message
darksides
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2003
Posts: 102

PostPosted: Wed Sep 24, 2003 11:02 am    Post subject: Reply with quote

bubble27 wrote:
darksides wrote:
hai settato l'RTC nel kernel?


si se intendi questo ....

CONFIG_RTC=y

:wink:


Si proprio quello.

:D
Back to top
View user's profile Send private message
bubble27
Guru
Guru


Joined: 07 Aug 2003
Posts: 365
Location: Campobasso

PostPosted: Wed Sep 24, 2003 1:20 pm    Post subject: Reply with quote

bsolar wrote:
bubble27 wrote:
Lowenbrau root # date
mer set 24 09:42:29 UTC 2003 8O <=== ma ci colleghiamo con un server italiano ?_?

stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
:P :P

La loro ora mi pare corretta, ovviamente non usano l'ora locale, esattamente come stai facendo te dato che hai UTC. Controlla il link /etc/localtime.
Code:
# date
Wed Sep 24 13:00:55 CEST 2003


ultimamente sto cambiando l'ora con date ..... esattamente

# date ggmmhhmmanno

adesso riprovo ad impostare il localtime......

grazie cmq bsolar

ciao Gentooaglia
Back to top
View user's profile Send private message
BlueRaven
Apprentice
Apprentice


Joined: 12 May 2003
Posts: 254

PostPosted: Thu Sep 25, 2003 2:11 pm    Post subject: Reply with quote

enx89 wrote:
Mi sembra molto interessante quello che hai fatto e credo che prenderò spunto da te, anche perchè ho un adsl 640 sempre connessa.


In questo caso, tieni presente che puoi anche usare ntpd, che si occuperà di mantenere l'ora sincronizzata in modo completamente automatico e non solo allo startup.
Se hai una LAN, puoi anche usarlo come stratum 3 per tutti gli altri PC. 8)
Tutte le info qui.
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
Goto page 1, 2  Next
Page 1 of 2

 
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