Re: Setting the clock
Boot in MacOS and change it. Not nice but it does the job. Otherwise, I haven't succeded in the past to make linux remember it after a reboot by using the gnome clock applet, mcc or the command line. It's fine as long as I don'T reboot. So it's a reason to keep MacOs on the drive. P. > > De: "Alex Horvath" <[EMAIL PROTECTED]> > Date: 2003/03/27 jeu. PM 06:42:23 GMT-05:00 > À: <[EMAIL PROTECTED]> > Subject: Setting the clock > > Silly question, but how do I set the clock on the computer. > > I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write > : : No such file or directory" > > Also, ntpd doesn't seem to work. I have servers configured, but the time never > changes. Also, it there a way to display the time ? > > My battery is dead so the clock defaults to 1956, which is obviously wrong. I just > need the computer to get the correct time when it boots and maybe sync it every once > in a while. > > Thanks, > > AH > > > > Silly question, but how do I set the clock on the computer. I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write : : No such file or directory" Also, ntpd doesn't seem to work. I have servers configured, but the time never changes. Also, it there a way to display the time ? My battery is dead so the clock defaults to 1956, which is obviously wrong. I just need the computer to get the correct time when it boots and maybe sync it every once in a while. Thanks, AH
Re: Setting the clock
On Thu, 27 Mar 2003, Alex Horvath wrote: > OK, > > fist, no X on this machine, it is strictly a router with CLI. > > Second, got ntpdate to work, so I now have the correct time. > > I think I can do it this way, if someone can help me on how to program it. > > use ntpdate to set the clock BEFORE loading ntpd, otherwise ntpdate will > fail saying that the ntp socket is already in use. > > Question is, where should i put the command for ntpdate so it gets executed > (preferably right after the internet stuff is loaded) before ntpd ? > rc.local will be too late I think. You could hack the ntpd initscript to run it before the daemon. rc.sysinit is probably too early. -- Stew Benedict -- MandrakeSoft PPC FAQ: http://www.linux-mandrake.com/en/ppcFAQ.php3 IRC: irc.freenode.net #cooker-ppc Archives: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppc&r=1&w=2
Re: Setting the clock
On Thu, 27 Mar 2003, Alex Horvath wrote: > Silly question, but how do I set the clock on the computer. > > I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write > : : No such file or directory" > [EMAIL PROTECTED] root]# ls -l /dev/adb crw---1 root root 56, 0 Dec 31 1969 /dev/adb On 2 systems here. 1 was a clean install today, so I know there is no cruft from old installs. The rpm database says it isn't owned by any packages it's either made by devfs or makedev I would guess. You could make the device node yourself for now. > Also, ntpd doesn't seem to work. I have servers configured, but the time never > changes. Also, it there a way to display the time ? > I was using xnptd on the RS6000, which seemed time/date challenged. Just installed ntpd, seems to be working, your variance may be too great for it to deal with. I forced the clock back an hour and ntpd wasn't happy: [EMAIL PROTECTED] root]# tail -2 /var/log/messages Mar 27 20:35:49 powerbook ntpd: ntpd startup succeeded Mar 27 19:39:56 powerbook ntpd[5248]: time correction of 3619 seconds exceeds sanity limit (1000); set clock manually to the correct UTC time. I used this guide to tweak the setup (google): http://www.bo.infn.it/alice/alice-doc/mll-doc/linux/admin/node25.html hwclock or date will display the current time date -s can be used to set the time also > My battery is dead so the clock defaults to 1956, which is obviously wrong. I just > need the computer to get the correct time when it boots and maybe sync it every once > in a while. > HTH, -- Stew Benedict -- MandrakeSoft PPC FAQ: http://www.linux-mandrake.com/en/ppcFAQ.php3 IRC: irc.freenode.net #cooker-ppc Archives: http://marc.theaimsgroup.com/?l=mandrake-cooker-ppc&r=1&w=2
Re: Setting the clock
OK, fist, no X on this machine, it is strictly a router with CLI. Second, got ntpdate to work, so I now have the correct time. I think I can do it this way, if someone can help me on how to program it. use ntpdate to set the clock BEFORE loading ntpd, otherwise ntpdate will fail saying that the ntp socket is already in use. Question is, where should i put the command for ntpdate so it gets executed (preferably right after the internet stuff is loaded) before ntpd ? Thanks, AH - Original Message - From: "Quentin Mason" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 27, 2003 6:53 PM Subject: Re: Setting the clock > Hi, > > Remember that ntp does not like changing the clock by very much -- it is > designed to correct a small difference in frequencies, not huge jumps. If > it crashes and the time is wrong by more than ~5mins it will NOT sort you > out. In KDE a right-click on the time will give you an option [for root] > to change the time. > > I believe that "date" can be used to set the time, but I have to look up > the syntax every time. I thought that ntp would correct a jump during the > boot sequence, if not then try /usr/sbin/ntpdate server; OR rdate -s > server followed by hwclock --systohc to do the trick. > > Once you have ntp setup it is worth checking the "quality" of your time > with /usr/sbin/ntptrace. > > Quentin. > > > > If you have always on internet, you could consider installing a ntp client. > > > > Installing the rpm should either create, or set permissions for the > > clock so that you can access it at a later point, or have it execute on > > connect to your ppp account. > > > > > > ----- Original Message - > > From: Alex Horvath > > To: [EMAIL PROTECTED] > > Sent: Thursday, March 27, 2003 4:42 PM > > Subject: Setting the clock > > > > > > Silly question, but how do I set the clock on the computer. > > > > I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write : : No such file or directory" > > > > Also, ntpd doesn't seem to work. I have servers configured, but the time never changes. Also, it there a way to display the time ? > > > > My battery is dead so the clock defaults to 1956, which is obviously wrong. I just need the computer to get the correct time when it boots and maybe sync it every once in a while. > > > > Thanks, > > > > AH > > > > > >
Re: Setting the clock
Hi, Remember that ntp does not like changing the clock by very much -- it is designed to correct a small difference in frequencies, not huge jumps. If it crashes and the time is wrong by more than ~5mins it will NOT sort you out. In KDE a right-click on the time will give you an option [for root] to change the time. I believe that "date" can be used to set the time, but I have to look up the syntax every time. I thought that ntp would correct a jump during the boot sequence, if not then try /usr/sbin/ntpdate server; OR rdate -s server followed by hwclock --systohc to do the trick. Once you have ntp setup it is worth checking the "quality" of your time with /usr/sbin/ntptrace. Quentin. > If you have always on internet, you could consider installing a ntp client. > > Installing the rpm should either create, or set permissions for the > clock so that you can access it at a later point, or have it execute on > connect to your ppp account. > > > - Original Message - > From: Alex Horvath > To: [EMAIL PROTECTED] > Sent: Thursday, March 27, 2003 4:42 PM > Subject: Setting the clock > > > Silly question, but how do I set the clock on the computer. > > I have tried hwclock, but I get an error saying "unable to open /dev/adb > read/write : : No such file or directory" > > Also, ntpd doesn't seem to work. I have servers configured, but the time never > changes. Also, it there a way to display the time ? > > My battery is dead so the clock defaults to 1956, which is obviously wrong. I > just need the computer to get the correct time when it boots and maybe sync it every > once in a while. > > Thanks, > > AH > >
Re: Setting the clock
If you have always on internet, you could consider installing a ntp client. Installing the rpm should either create, or set permissions for the clock so that you can access it at a later point, or have it execute on connect to your ppp account. - Original Message - From: Alex Horvath To: [EMAIL PROTECTED] Sent: Thursday, March 27, 2003 4:42 PM Subject: Setting the clock Silly question, but how do I set the clock on the computer. I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write : : No such file or directory" Also, ntpd doesn't seem to work. I have servers configured, but the time never changes. Also, it there a way to display the time ? My battery is dead so the clock defaults to 1956, which is obviously wrong. I just need the computer to get the correct time when it boots and maybe sync it every once in a while. Thanks, AH
Setting the clock
Silly question, but how do I set the clock on the computer. I have tried hwclock, but I get an error saying "unable to open /dev/adb read/write : : No such file or directory" Also, ntpd doesn't seem to work. I have servers configured, but the time never changes. Also, it there a way to display the time ? My battery is dead so the clock defaults to 1956, which is obviously wrong. I just need the computer to get the correct time when it boots and maybe sync it every once in a while. Thanks, AH