nose si han notado pero muchas veces nuestros relojes en linux no tienen la misma hora que nuestro hardware… la solución es simple y ademas con esto podemos estar a la hora oficial chilena todo el tiempo.
lo que debemos hacer es sincronizar con un servidor online o NTP en chile hay uno que es quien lleva la hora oficial y es SHOA.CL, para sincronizar desde linux con shoa.cl debemos logearnos como root y hacer lo siguiente…
# ntpdate ntp.shoa.cl
si no tienen instalado el NTPDATE entonces….
apt-ger install ntpdate
yum install ntpdate
zypper install ntpdate
con eso ya tenemos la hora seteada y sincronizada con SHOA.CL … hora oficial de chile. Ahora para sincronizar la hora con nuestro hardware debemos escribir lo siguiente en consola.
# hwclock –systohc
esto nos pone la misma hora de nuestro software con nuestro hardware…
por ultimo, si deseamos que nuestra hora esta SIEMPRE a la hora oficial y se actualice sola entonces podemos agregar una regla al CRON y decirle que se actualice cada cierto tiempo, esto sirve mucho cuando tenemos un servidor y es necesario de que nuestra hora sea la correcta, para agregar la regla al CRON hacemos lo siguiente
# nano /etc/crontab
para los que tienen miedo a la consola pueden reemplazar el nano por un gedit
ahora dentro del archivo cron debemos agregar las siguientes linea:
# m h dom mon dow user command
30 * * * * root ntpdate ntp.shoa.cl
30 * * * * root hwclock –systohc
solo copiar las lineas que comienzan con 30…
ahora explico…
m = MINUTOS
h = HORA
dom = DIA
mon = MES
dow = DIA DE LA SEMANA (0-6), SIENDO 1=LUNES
user = USER
command = COMANDO
en lo que hice le dije a cron que
m = 30 <- todos los minutos 30
h = * <- Cualquier hora
dom = * <- Todos los días
mon = * <- Cualquier mes o todos los meses
dow = * <- Cualquier dia de la semana
user = root <- el usuario root
command = ntpdate ntp.shoa.cl <- ejecute ese comando.
ahora para salimos del nano con CTRL + X … guardamos los cambios y reiniciamos el CRON así:
# /etc/init.d/cron restart
y vuala! cualquier corrección la hacen saber.
RSS
Twitter![Linux Puerto Montt [DOT] CL Linux Puerto Montt [DOT] CL](http://www.linuxpuertomontt.cl/LINUX_GULIPM-427x142.png)
marzo 16th, 2009
Ov3R
Posted in
Tags: 




















There is visibly a lot to know about this. I believe you made certain nice points in features also.
any videos make your mind up to do it a lot of sensible approach. people I’d just bookmark
Terrific information on Como estar siempre a la hora. | Linux Puerto Montt [DOT] CL. The post was right on target. Continue with the great work.
The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important.
I am really impressed with your writing skills and also with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the excellent quality writing, it is rare to see a great blog like this one today..
Good site! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a nice day!
Great suggestions! Thanks for posting this:-)