Date: Mon, 07 Jul 2014 07:40:44 +0200 From: Ralf Mardorf <ralf.mardorf@rocketmail.com> To: freebsd-questions@freebsd.org Subject: Re: Updating and displaying CMOS clock Message-ID: <1404711644.16024.1.camel@archlinux> In-Reply-To: <20140707045720.GA63735@admin.sibptus.tomsk.ru> References: <20140706153206.GA46262@admin.sibptus.tomsk.ru> <53B9BC4B.4030609@gooch.io> <20140707021022.GB58025@admin.sibptus.tomsk.ru> <53BA0493.1030205@gooch.io> <20140707034300.GA60208@admin.sibptus.tomsk.ru> <CA%2Bg%2BBvggA%2B4%2Bk=M-nmGZtKxsDTQNf3QFM4r9ZB05F4VAMgS7KQ@mail.gmail.com> <20140707045720.GA63735@admin.sibptus.tomsk.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2014-07-07 at 11:57 +0700, Victor Sudakov wrote:
> Olivier Nicole wrote:
> > If all you need is a daily update, why not a cron to restart ntp once
> > a day?
The OP ask for a command like Liunx's hwclock, to set up the RTC.
I for example on Linux do it like that:
$ cat /usr/local/bin/tool
[snip]
ntp)
ntpdate ntp.favey.ch
hwclock --set --date "$(date)";;
[snip]
> Because no matter how often you restart ntp, it does not update the
> CMOS (hardware) clock.
>
> My question was about updating the CMOS clock.
"In the last episode (Mar 10), Kelly Jones said:
> What are the FreeBSD equivalents of hwclock (view/set the BIOS
> hardware clock) and adjtimex (adjust clock speed)? I couldn't find
> these two well-known Linux commands in ports?
FreeBSD sets the hardware clock whenever settimeofday() is called
(unless the sysctl machdep.disable_rtc_set is set). I don't think
there's a way to retrieve the current hardware clock settings from
userland.
Linux's adjtimex(2) is called ntp_adjtime(2) in FreeBSD." -
http://lists.freebsd.org/pipermail/freebsd-questions/2007-March/144321.html
Regards,
Ralf
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1404711644.16024.1.camel>
