Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Service] CLOCK (sur le talon à cause de mes chaussures)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
jul16ar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2007
Posts: 100

PostPosted: Fri Feb 23, 2007 1:42 am    Post subject: [Service] CLOCK (sur le talon à cause de mes chaussures) Reply with quote

Bonsoir,

Depuis quelques jours j'ai un problème très étrange, le lancement du service /etc/init.d/clock me dérègle l'horloge .... plutôt sympa....

Comment cela est-ce arrivé ?

J'ai ressorti d'un coin de ma clé usb, un vieux projet php/sql.
Le script d'install doit allez insérer en base de données des éléments qu'il va récupérer dans un répertoire de fichier de logs.
Ce script pour des raisons légales ne doit lire que la dernière année de logs à partir de la date courante (et effacer de la bdd les éléments plus vieux que 365jours évidement), mais mes fichiers ont déjà plus d'un an (les fichiers sont de la forme hh-mm-dd-mm-yyyy.log en gros).
J'ai donc remonté mon horloge système d'un an en arrière (via l'applet de gnome) pour que mon script aille analyser les bons fichiers (à la bonne date).
Bref, tout marche bien niquel, mon vieux projet est de nouveau en route pour démonstration.

(Si vous avez pas suivi/compris l'explication du dessus c'est pas grave, ce qui compte c'est que j'ai remonté mon horloge d'un an en arrière et oublié de la remettre à l'heure avant le reboot. =) )

Sauf qu'après ça j'ai oublié de remettre mon horloge à l'heure.
Au reboot j'ai eu le droit à ce message au lancement de CHAQUE service (je l'ai donc pas raté :p) :
Code:
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!


Autre chose marrante, à chaque fois que je restart le service clock (/etc/init.d/clock restart), mon horloge RECULE de plusieurs dizaines ou centaines (c'est aléatoire) de minutes. (on passe dans le surnaturel là :p)

Bref, c'est pas bien grave, je lance un :
Code:
ntpdate ntp.univ-lyon1.fr && hwclock --systohc

et tout rentre dans l'ordre ...... jusqu'au prochain reboot, et c'est à chaque fois le même cirque... quand le daemon clock se lance il fout le bordel !!
(c'est super chiant de remettre mon pc portable à l'heure chaque fois que je le lance)

mon fichier /etc/conf.d/clock (qui est le même depuis l'install de base ...):
Code:
Jul16ar ~ # cat /etc/conf.d/clock
# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time).  If your clock is set to the local time, then
# set CLOCK to "local".  Note that if you dual boot with Windows, then
# you should set it to "local".

CLOCK="local"

# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time
# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="no"


### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".
SRM="no"

# If your alpha uses the ARC console, set this to "yes".
ARC="no"


mon timezone :
Code:
Jul16ar ~ # ll /etc/localtime
lrwxrwxrwx 1 root root 32 fév 23 02:01 /etc/localtime -> /usr/share/zoneinfo/Europe/Paris


Si quelqu'un à une idée du coupable je suis preneur (non c'est pas monsieur legris avec le chandelier dans la salle de billard :p)

Merci d'avance.

Juju
Back to top
View user's profile Send private message
CryoGen
Veteran
Veteran


Joined: 11 Feb 2004
Posts: 1426
Location: Bamako - Mali - Afrique

PostPosted: Fri Feb 23, 2007 2:47 am    Post subject: Reply with quote

Efface le fichier /etc/adjtime (je crois qu'il s'appelle comme ca ^^)

Tu n'aurais pas oublier d'updater ton fichier de config ? moi j'ai le champ TIMEZONE en plus ...
etc/conf.d/clock wrote:

# /etc/conf.d/clock

# Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then
# set CLOCK to "local". Note that if you dual boot with Windows, then
# you should set it to "local".

CLOCK="UTC"

# Select the proper timezone. For valid values, peek inside of the
# /usr/share/zoneinfo/ directory. For example, some common values are
# "America/New_York" or "EST5EDT" or "Europe/Berlin".

TIMEZONE="Africa/Bamako"

# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here.

CLOCK_OPTS=""

# If you want to set the Hardware Clock to the current System Time
# during shutdown, then say "yes" here.

CLOCK_SYSTOHC="no"


### ALPHA SPECIFIC OPTIONS ###

# If your alpha uses the SRM console, set this to "yes".
SRM="no"

# If your alpha uses the ARC console, set this to "yes".
ARC="no

_________________
- CryoGen` on #gentoofr@irc.freenode.net
- ~amd64 / KDE4
- I'm the bone of my sword...
Back to top
View user's profile Send private message
billiob
Guru
Guru


Joined: 30 Dec 2004
Posts: 425
Location: Paris, France

PostPosted: Fri Feb 23, 2007 10:23 am    Post subject: Reply with quote

Sinon, c'est peut-être un problème avec hwclock au sein de ton noyau.

Afin d'appliquer les changements en éteignant, je suggére de mettre
CLOCK_SYSTOHC="yes"
_________________
billiob
Back to top
View user's profile Send private message
jul16ar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2007
Posts: 100

PostPosted: Fri Feb 23, 2007 12:37 pm    Post subject: Reply with quote

CryoGen wrote:
Efface le fichier /etc/adjtime (je crois qu'il s'appelle comme ca ^^)

ça a fonctionné merci !!
Mais à quoi sert ce fichier ? pourquoi mon horloge se déréglais à chaque boot ?

CryoGen wrote:
Tu n'aurais pas oublier d'updater ton fichier de config ? moi j'ai le champ TIMEZONE en plus ...

ayé c'est fait. :) (un p'tit coup de etc-update)

billiob wrote:
Sinon, c'est peut-être un problème avec hwclock au sein de ton noyau.

Afin d'appliquer les changements en éteignant, je suggére de mettre
CLOCK_SYSTOHC="yes"

J'avais déjà testé.
ça n'avait rien changé.
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Fri Feb 23, 2007 2:24 pm    Post subject: Re: [Service] CLOCK (sur le talon à cause de mes chaussures Reply with quote

jul16ar wrote:

Sauf qu'après ça j'ai oublié de remettre mon horloge à l'heure.
Au reboot j'ai eu le droit à ce message au lancement de CHAQUE service (je l'ai donc pas raté :p) :
Code:
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!


si tu as encore ce message tu peux faire au choix :

emerge baselayout
ou
touch /etc/conf.d/* ---> çà c'est de mémoire :?

A+
Back to top
View user's profile Send private message
jul16ar
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jan 2007
Posts: 100

PostPosted: Fri Feb 23, 2007 5:08 pm    Post subject: Re: [Service] CLOCK (sur le talon à cause de mes chaussures Reply with quote

nemo13 wrote:
jul16ar wrote:

Sauf qu'après ça j'ai oublié de remettre mon horloge à l'heure.
Au reboot j'ai eu le droit à ce message au lancement de CHAQUE service (je l'ai donc pas raté :p) :
Code:
* One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!


si tu as encore ce message tu peux faire au choix :

emerge baselayout
ou
touch /etc/conf.d/* ---> çà c'est de mémoire :?

A+


quand l'heure est bien réglé j'ai plus ce message.

par contre "touch /etc/conf.d/*" c'est pas un peu crade ... ?
Back to top
View user's profile Send private message
nemo13
Veteran
Veteran


Joined: 08 Oct 2004
Posts: 1016
Location: France/Istres

PostPosted: Fri Feb 23, 2007 7:53 pm    Post subject: Reply with quote

A cette époque ce n'était pas crade :roll:
A+
(nous étions jeunes !!!)
Back to top
View user's profile Send private message
CryoGen
Veteran
Veteran


Joined: 11 Feb 2004
Posts: 1426
Location: Bamako - Mali - Afrique

PostPosted: Sat Feb 24, 2007 2:51 am    Post subject: Reply with quote

jul16ar wrote:
CryoGen wrote:
Efface le fichier /etc/adjtime (je crois qu'il s'appelle comme ca ^^)

ça a fonctionné merci !!
Mais à quoi sert ce fichier ? pourquoi mon horloge se déréglais à chaque boot ?



Il sert à l'horloge "software" à compenser une mauvaise horloge hardware (retard/avance)
_________________
- CryoGen` on #gentoofr@irc.freenode.net
- ~amd64 / KDE4
- I'm the bone of my sword...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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