From: Sergey Vlasov <vsu@altlinux.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] p7, RTC и UTC
Date: Mon, 10 Mar 2014 13:09:44 +0400
Message-ID: <20140310090944.GB11593@atlas.home> (raw)
In-Reply-To: <531BC5F6.5050209@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 2821 bytes --]
On Sun, Mar 09, 2014 at 04:37:58AM +0300, Speccyfighter wrote:
> 09.03.2014 11:35, Sergey пишет:
> > On Sunday 09 March 2014, Sergey wrote:
> >
> >> Система - Server Light, обновлённый до p7, так что софта не сильно много.
> >> Тем не менее, кто злодей - пока непонятно.
> > ...
> > 14844 ? Ss 0:00 /sbin/minilogd
> >
> > Кто ещё это может делать - не понимаю.
> >
>
> Кажется что-то поймал?
> При UTC=false и ядре led-ws:
[...]
> Время, прочитанное с аппаратных часов: 2014/03/09 04:21:11
> Аппаратное время: 2014/03/09 04:21:11 = 1394328071 секунд с 1969
> Вс 09 мар 2014 04:21:11 -0.345221 секунд
> Вс мар 9 04:21:10 FET 2014
>
> # uname -r
> 3.4.80-led-ws-alt0.M70P.1
>
> ------------------------------------------------------------------
>
> А при UTC=false и ядре
> # rpm -qa|grep kernel-image|grep pae|grep 3.10.32
> kernel-image-std-pae-3.10.32-alt1
> точно в UTC RTC уводит несмотря на
> # cat /etc/adjtime|tail -n 1
> LOCAL
> Даже при отсутствующем в системе ntpd.
> У меня оно постоянно стоит - памяти 6Gb.
>
> Завтра, уже сегодня, надо бы посмотреть с std-def и un-def.
Вообще при наличии синхронизации с NTP-сервером ядро уже давно каждые
11 минут обновляет время в RTC. Однако, начиная с 3.10, из ядра
выпилили код, который пытался обновлять в RTC только минуты и секунды,
чтобы обновление работало независимо от часового пояса (но в этом
случае не могло быть исправлено расхождение более чем на 15 минут):
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3195ef59cb42cda3aeeb24a7fd2ba1b900c4a3cc
Теперь для правильного обновления RTC необходимо, чтобы в ядре были
соответствующим образом установлены переменные sys_tz и
persistent_clock_is_local:
http://lxr.free-electrons.com/source/kernel/time/ntp.c?v=3.10#L492
Установка этих переменных возможна только в момент первого после
загрузки системы вызова settimeofday() с указанием параметра tz:
http://lxr.free-electrons.com/source/kernel/time.c?v=3.10#L151
В нормально сконфигурированной системе этим занимается systemd:
Mar 10 11:05:07 atlas.home systemd[1]: RTC configured in localtime, applying delta of 240 minutes to system time.
Mar 10 11:05:07 atlas.home systemd[1]: systemd 201 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP -GCRYPT +ACL +XZ)
Однако я наблюдал ситуацию, когда systemd неправильно определял режим
работы RTC из-за странного содержимого файла /etc/adjtime - почему-то
после слова LOCAL там было что-то ещё:
-0.000001 1099594479 0.000000
1099594479
LOCAL 1900 0
0.000000
(нашёл такой файл в старой системе, там он последний раз менялся в
2005 году).
Правильный формат этого файла выглядит, например, так:
92.715438 1273327006 0.000000
1273327006
LOCAL
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2014-03-10 9:09 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-25 18:39 [Comm] I: p7 starterkits (20131225) Michael Shigorin
2013-12-27 0:22 ` Michael Shigorin
2014-01-05 2:17 ` Speccyfighter
2014-01-05 2:26 ` Speccyfighter
2014-01-05 7:35 ` Speccyfighter
2014-02-10 21:33 ` Michael Shigorin
2014-02-12 14:46 ` Speccyfighter
2014-02-13 2:11 ` Алексей Варакин
2014-02-13 7:36 ` Speccyfighter
2014-02-13 8:03 ` Speccyfighter
2014-01-05 19:04 ` Speccyfighter
2014-01-05 21:29 ` Michael Shigorin
2014-01-06 1:03 ` Speccyfighter
2014-02-10 21:33 ` Michael Shigorin
2014-02-12 14:29 ` Speccyfighter
2014-02-13 8:57 ` Michael Shigorin
2014-02-14 12:54 ` Speccyfighter
2014-03-01 19:51 ` [Comm] I: p7 starterkits (sysv-tde) Michael Shigorin
2014-03-09 3:25 ` Speccyfighter
2014-03-09 6:03 ` Алексей Варакин
2014-03-09 6:38 ` Sergey
2014-03-09 7:35 ` REAL
2014-03-09 8:35 ` [Comm] p7, RTC и UTC Sergey
2014-03-09 1:37 ` Speccyfighter
2014-03-10 8:29 ` Michael Shigorin
2014-03-10 9:09 ` Sergey Vlasov [this message]
2014-03-10 9:45 ` REAL
2014-03-10 11:11 ` Michael Shigorin
2014-03-10 11:34 ` Sergey Vlasov
2014-03-10 11:52 ` REAL
2014-03-09 8:40 ` Sergey
2014-03-09 15:40 ` Michael Shigorin
2014-03-09 15:40 ` [Comm] I: p7 starterkits (sysv-tde) Michael Shigorin
2013-12-30 16:22 ` [Comm] I: p7 starterkits (20131225) Dank Bagryantsev
2013-12-30 17:25 ` Michael Shigorin
2013-12-30 20:39 ` Dank Bagryantsev
2013-12-31 13:54 ` Michael Shigorin
2013-12-31 9:50 ` Andrii Dobrovol`s`kii
2013-12-31 10:04 ` Michael Shigorin
2013-12-31 10:14 ` Andrii Dobrovol`s`kii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140310090944.GB11593@atlas.home \
--to=vsu@altlinux.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git