Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
lpi1:uhrzeit [2015/08/18 11:37] ingo_wichmann [Hardwareuhr stellen] |
lpi1:uhrzeit [2023/05/04 16:28] (aktuell) |
||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Hardware ====== | ||
| + | ===== x86 CPU ===== | ||
| + | Hat die CPU einen Constant Time Stamp Counter (TSC)? | ||
| + | grep -o constant_tsc /proc/cpuinfo | ||
| + | |||
| + | Wird er benutzt? | ||
| + | journalctl -kg 'tsc|clocksource' | ||
| + | |||
| + | ====== Kernel ====== | ||
| + | Welche Zeitquelle nutzt der Kernel? | ||
| + | cat /sys/devices/system/clocksource/clocksource0/current_clocksource | ||
| + | |||
| + | Welche kann er nutzen? | ||
| + | cat /sys/devices/system/clocksource/clocksource0/available_clocksource | ||
| + | -> mögliche Werte sind u.a.: kvm-clock tsc hpet acpi_pm | ||
| + | |||
| + | Kann mit dem Kernel-Parameter clocksource= verstellt werden. (( https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt )) | ||
| + | |||
| + | Der Linux Kernel stellt u.a. folgende Devices als Zeitquellen zur Verfügung: | ||
| + | |||
| + | Real Time Clock: | ||
| + | * ''/dev/rtc*'' | ||
| + | |||
| + | Precision Time Protocol (für Virtualisierungsgäste): | ||
| + | |||
| + | modprobe ptp_kvm | ||
| + | |||
| + | * ''/dev/ptp*'' | ||
| + | |||
| + | siehe auch [[chrony#precision_time_protocol_ptp_im_kvm_gast]] | ||
| ====== Systemuhr stellen ====== | ====== Systemuhr stellen ====== | ||
| ===== date ===== | ===== date ===== | ||
| Zeile 14: | Zeile 44: | ||
| (( | (( | ||
| oder (ab systemd Version 213) | oder (ab systemd Version 213) | ||
| - | //Todo: stimmt das?// | ||
| - | |||
| ''/etc/systemd/timesyncd.conf'' : | ''/etc/systemd/timesyncd.conf'' : | ||
| <file> | <file> | ||
| Zeile 55: | Zeile 83: | ||
| oder | oder | ||
| date | date | ||
| + | oder | ||
| + | timedatectl status | ||
| - | === Doku === | + | ==== timedatectl ==== |
| - | man tzfile | + | CentOS (ab 7), Debian (ab 8), openSuSE (ab 13.1) |
| - | ==== Debian ==== | + | timedatectl set-timezone Europe/Berlin |
| - | Debian ab 3.1 | + | |
| - | tzconfig | + | |
| - | Debian ab 5.0 | + | |
| - | dpkg-reconfigure tzdata | + | |
| - | + | ||
| - | Mehr Informationen: | + | |
| - | http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html | + | |
| - | ==== SuSE ==== | + | ==== SuSE (bis SLES 11) ==== |
| ''/etc/sysconfig/clock'' : | ''/etc/sysconfig/clock'' : | ||
| <file> | <file> | ||
| Zeile 76: | Zeile 99: | ||
| </file> | </file> | ||
| - | ==== CentOS / RedHat ==== | + | ==== CentOS / RedHat (bis 6.0) ==== |
| ''/etc/sysconfig/clock'' : | ''/etc/sysconfig/clock'' : | ||
| <file> | <file> | ||
| Zeile 83: | Zeile 106: | ||
| </file> | </file> | ||
| + | ==== Debian (bis 7) ==== | ||
| + | Debian ab 5.0 | ||
| + | dpkg-reconfigure tzdata | ||
| + | |||
| + | Mehr Informationen: | ||
| + | http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html | ||
| - | ==== Debian (?) ==== | ||
| ''/etc/default/rcS'' : | ''/etc/default/rcS'' : | ||
| <file> | <file> | ||