View previous topic :: View next topic |
Author |
Message |
enx89 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/138203630043f8f4042cf75.gif)
Joined: 21 Mar 2003 Posts: 192 Location: Milano
|
Posted: Sun Apr 06, 2003 8:19 pm Post subject: fastidioso problema con l' orologio |
|
|
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.
Cosa si può fare per metterlo a posto?
Grazie ENx |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Sun Apr 06, 2003 9:17 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
enx89 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/138203630043f8f4042cf75.gif)
Joined: 21 Mar 2003 Posts: 192 Location: Milano
|
Posted: Sun Apr 06, 2003 9:28 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Sun Apr 06, 2003 9:43 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
blaze_ n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 16 Mar 2003 Posts: 36 Location: Milan, Italy
|
Posted: Sun Apr 06, 2003 10:32 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Sun Apr 06, 2003 10:43 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
IgaRyu Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Marvel/movie_x-men_wolverine.gif)
Joined: 23 Jan 2003 Posts: 302 Location: Verona
|
Posted: Mon Apr 07, 2003 8:12 am Post subject: |
|
|
Direi di si se non altro per una questione di compatibilita degli scripts ![Laughing :lol:](images/smiles/icon_lol.gif) _________________ One Flew East
One Flew West
Some Flew On The Kukool's Nest |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Mon Apr 07, 2003 9:50 am Post subject: |
|
|
IgaRyu wrote: | Direi di si se non altro per una questione di compatibilita degli scripts ![Laughing :lol:](images/smiles/icon_lol.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
IgaRyu Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Marvel/movie_x-men_wolverine.gif)
Joined: 23 Jan 2003 Posts: 302 Location: Verona
|
Posted: Mon Apr 07, 2003 9:55 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Mon Apr 07, 2003 11:15 am Post subject: |
|
|
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" ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ I may not agree with what you say, but I'll defend to the death your right to say it. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
IgaRyu Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/gallery/Marvel/movie_x-men_wolverine.gif)
Joined: 23 Jan 2003 Posts: 302 Location: Verona
|
Posted: Mon Apr 07, 2003 11:34 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
l0rdt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2305453923e92baf1a5bca.jpg)
Joined: 04 Apr 2003 Posts: 34 Location: Cosenza (ITALY)
|
Posted: Mon Apr 07, 2003 11:47 am Post subject: |
|
|
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 :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ginko Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/10943389714088c08ad7803.gif)
Joined: 01 May 2002 Posts: 371 Location: nearby my linux laptop
|
Posted: Mon Apr 07, 2003 12:16 pm Post subject: |
|
|
l0rdt wrote: |
Idea simpatica, ma se non aggiungi un
Code: |
depend() {
need net
}
| non penso sia molto efficace ![Wink :wink:](images/smiles/icon_wink.gif) |
Molto giusto, infatti questo workaround funge
solo se sei in rete ed hai accesso al server ntp.
Io credo invece che tu debba settare
in
come gia' suggerito e poi affidarti a
per la sincronizzazione tra l'HW ed il System clock.
--Gianluca |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
enx89 Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/138203630043f8f4042cf75.gif)
Joined: 21 Mar 2003 Posts: 192 Location: Milano
|
Posted: Mon Apr 07, 2003 4:02 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
blaze_ n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Final Fantasy/Final_Fantasy_8_-_Squall.gif)
Joined: 16 Mar 2003 Posts: 36 Location: Milan, Italy
|
Posted: Mon Apr 07, 2003 9:54 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
l0rdt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2305453923e92baf1a5bca.jpg)
Joined: 04 Apr 2003 Posts: 34 Location: Cosenza (ITALY)
|
Posted: Tue Apr 08, 2003 8:46 am Post subject: |
|
|
blaze_ wrote: | per gli rc-script non serve la stop() o la depend() per forza
infatti il mio stop() non ha assolutamente senso ![Smile :)](images/smiles/icon_smile.gif) |
in questo caso dovrebbe essere necessario per essere sicuri che lo script sia eseguito dopo aver tirato su la rete ![Wink :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Tue Apr 08, 2003 8:51 am Post subject: |
|
|
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 ![Smile :)](images/smiles/icon_smile.gif) |
in questo caso dovrebbe essere necessario per essere sicuri che lo script sia eseguito dopo aver tirato su la rete ![Wink :wink:](images/smiles/icon_wink.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
l0rdt n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/2305453923e92baf1a5bca.jpg)
Joined: 04 Apr 2003 Posts: 34 Location: Cosenza (ITALY)
|
Posted: Wed Apr 09, 2003 1:26 pm Post subject: |
|
|
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 ![Embarassed :oops:](images/smiles/icon_redface.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bubble27 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/9746486553fffdfe907475.png)
Joined: 07 Aug 2003 Posts: 365 Location: Campobasso
|
Posted: Wed Sep 24, 2003 9:44 am Post subject: |
|
|
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 <=== ma ci colleghiamo con un server italiano ?_?
stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
ciao gentooaglia |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
darksides Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/9504995743fd0934a67308.png)
Joined: 23 Jun 2003 Posts: 102
|
Posted: Wed Sep 24, 2003 10:44 am Post subject: |
|
|
hai settato l'RTC nel kernel? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bubble27 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/9746486553fffdfe907475.png)
Joined: 07 Aug 2003 Posts: 365 Location: Campobasso
|
Posted: Wed Sep 24, 2003 10:49 am Post subject: |
|
|
darksides wrote: | hai settato l'RTC nel kernel? |
si se intendi questo ....
CONFIG_RTC=y
![Wink :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bsolar Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/806967053f23f4aede2da.jpg)
Joined: 12 Jan 2003 Posts: 2764
|
Posted: Wed Sep 24, 2003 10:58 am Post subject: |
|
|
bubble27 wrote: | Lowenbrau root # date
mer set 24 09:42:29 UTC 2003 <=== ma ci colleghiamo con un server italiano ?_?
stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
![Razz :P](images/smiles/icon_razz.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
darksides Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/9504995743fd0934a67308.png)
Joined: 23 Jun 2003 Posts: 102
|
Posted: Wed Sep 24, 2003 11:02 am Post subject: |
|
|
bubble27 wrote: | darksides wrote: | hai settato l'RTC nel kernel? |
si se intendi questo ....
CONFIG_RTC=y
![Wink :wink:](images/smiles/icon_wink.gif) |
Si proprio quello.
![Very Happy :D](images/smiles/icon_biggrin.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bubble27 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/9746486553fffdfe907475.png)
Joined: 07 Aug 2003 Posts: 365 Location: Campobasso
|
Posted: Wed Sep 24, 2003 1:20 pm Post subject: |
|
|
bsolar wrote: | bubble27 wrote: | Lowenbrau root # date
mer set 24 09:42:29 UTC 2003 <=== ma ci colleghiamo con un server italiano ?_?
stessa cosa cmq con ntp ........ nn sarà ora di dire a questi tizi di aggiustare l'ora......
![Razz :P](images/smiles/icon_razz.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
BlueRaven Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/gallery/BaldursGate/baldursgate2_edwin.gif)
Joined: 12 May 2003 Posts: 254
|
Posted: Thu Sep 25, 2003 2:11 pm Post subject: |
|
|
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.
Tutte le info qui. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|