]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
docs: add hwclock -c to TODO file
authorKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2011 13:08:02 +0000 (14:08 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 9 Dec 2011 13:08:02 +0000 (14:08 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
Documentation/TODO

index f6ddedea59cdd8c13406fcdc526b731710546f86..848900cc7836d662174cb943c8b16aed7e7c1e85 100644 (file)
@@ -9,6 +9,27 @@ dmesg
 
  - add --color to colorize err and panic messages
 
+hwclock
+-------
+
+ - (!!!) add "hwclock -c|--compare" to provide info about RTC frequency offset
+   like "adjtimex -c", shell version:
+
+       #!/bin/bash
+       date > /dev/null
+       hwdate=$(hwclock -r)
+       time1_sys=$(date +'%s.%N')
+       time1_hw=$(date -d "${hwdate% -*}" +'%s')
+
+       while sleep 10; do
+           hwdate=$(hwclock -r)
+           time2_sys=$(date +'%s.%N')
+           time2_hw=$(date -d "${hwdate% -*}" +'%s')
+           awk "END { x = (($time1_hw - $time1_sys) - ($time2_hw - $time2_sys)) /
+       ($time2_hw - $time1_hw); printf \"sysclock/RTC frequency offset: %.0f ppm (%.0f
+       ticks)\n\", x * 1e6, x * 1e4}" < /dev/null
+       done
+
 ldattach
 --------