On 30. June 2012 at 23:59:60 UTC (1. July 2012 at 01:59:60 CEST) a
leap second was inserted. This leap second was announced from IERS (International Earth Rotation and
Reference Systems Service) on 5. January 2012 in the Bulletin
C 43.
To track what the systems were doing during this event, I created a few Shell Scripts for reporting. Below in Reports and Log File Entries are the outputs available. |
Reports and Log File EntriesThis reports and log file entries below are from the leap second on 30. June 2012 at 23:59:60 UTC (1. July 2012 at 01:59:60 CEST).
|
ntp1.home4u.ch was running in
CEST on batman.home4u.ch, a FreeBSD 7.4-RELEASE-p9 system with ntpd
4.2.4p5 and GPS 18x LVC.
Output from report-timechange-ntp.sh (reduced to the relevant seconds): |
Log of ntp time during 2 minutes with milliseconds: before time change: assID=0 status=4464 leap_add_sec, sync_uhf_clock, 6 events, event_peer/strat_chg, version="ntpd 4.2.4p5-a Wed May 30 16:35:27 CEST 2012 (1)", processor="amd64", system="FreeBSD/7.4-RELEASE-p9", leap=01, stratum=1, precision=-19, rootdelay=0.000, rootdispersion=1.126, peer=50663, refid=PPS, reftime=d39a113a.a1d6e5c7 Sun, Jul 1 2012 1:58:50.632, poll=6, clock=d39a1144.e25cba32 Sun, Jul 1 2012 1:59:00.884, state=4, offset=0.043, frequency=39.946, jitter=0.002, noise=0.002, stability=0.000, hostname="batman.home4u.ch", signature="md5WithRSAEncryption", flags=0x80003, update=201206302225, leapsec=201201110000, tai=34, cert="batman.home4u.ch batman.home4u.ch 0x0", expire=201303221945 Sun, Jul 1 2012 1:59:00.915 Sun, Jul 1 2012 1:59:01.421 Sun, Jul 1 2012 1:59:01.931 Sun, Jul 1 2012 1:59:02.440 Sun, Jul 1 2012 1:59:02.949 ... Sun, Jul 1 2012 1:59:57.030 Sun, Jul 1 2012 1:59:57.540 Sun, Jul 1 2012 1:59:58.046 Sun, Jul 1 2012 1:59:58.556 Sun, Jul 1 2012 1:59:59.065 Sun, Jul 1 2012 1:59:59.578 Sun, Jul 1 2012 1:59:59.085 Sun, Jul 1 2012 1:59:59.594 Sun, Jul 1 2012 2:00:00.105 Sun, Jul 1 2012 2:00:00.615 Sun, Jul 1 2012 2:00:01.135 Sun, Jul 1 2012 2:00:01.641 Sun, Jul 1 2012 2:00:02.151 Sun, Jul 1 2012 2:00:02.907 ... Sun, Jul 1 2012 2:01:02.685 Sun, Jul 1 2012 2:01:04.556 Sun, Jul 1 2012 2:01:05.482 Sun, Jul 1 2012 2:01:08.061 Sun, Jul 1 2012 2:01:09.917 after time change: assID=0 status=4464 leap_add_sec, sync_uhf_clock, 6 events, event_peer/strat_chg, version="ntpd 4.2.4p5-a Wed May 30 16:35:27 CEST 2012 (1)", processor="amd64", system="FreeBSD/7.4-RELEASE-p9", leap=01, stratum=1, precision=-19, rootdelay=0.000, rootdispersion=1.149, peer=50663, refid=PPS, reftime=d39a11bb.a5daf630 Sun, Jul 1 2012 2:00:59.647, poll=6, clock=d39a11c6.d3232fe4 Sun, Jul 1 2012 2:01:10.824, state=4, offset=0.043, frequency=39.947, jitter=0.002, noise=0.002, stability=0.000, hostname="batman.home4u.ch", signature="md5WithRSAEncryption", flags=0x80003, update=201206302225, leapsec=201201110000, tai=35, cert="batman.home4u.ch batman.home4u.ch 0x0", expire=201303221945 |
Output from report-timechange-unix.sh (reduced to the relevant seconds): |
Log of unix time during 2 minutes: Sun Jul 1 01:59:00 CEST 2012 Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:02 CEST 2012 Sun Jul 1 01:59:02 CEST 2012 ... Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:01 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 ... Sun Jul 1 02:01:00 CEST 2012 Sun Jul 1 02:01:01 CEST 2012 Sun Jul 1 02:01:02 CEST 2012 Sun Jul 1 02:01:04 CEST 2012 Sun Jul 1 02:01:05 CEST 2012 |
Entries in the log file: |
Jul 1 02:00:59 batman ntpd[1047]: kernel time sync status change 2001 |
ntp2.home4u.ch was running in UTC on goliath.home4u.ch, a Gentoo Linux system with kernel 3.2.12, ntpd 4.2.6p5 and DCF77 mouseCLOCK. Output from report-timechange-ntp.sh (reduced to the relevant seconds): |
Log of ntp time during 2 minutes with milliseconds: before time change: associd=0 status=4219 leap_add_sec, sync_lf_radio, 1 event, leap_armed, version="ntpd 4.2.6p5@1.2349-o Sun May 6 15:35:24 UTC 2012 (1)", processor="x86_64", system="Linux/3.2.12-gentoo", leap=01, stratum=1, precision=-22, rootdelay=0.000, rootdisp=1.258, refid=DCFa, reftime=d39a1144.40a83f5c Sat, Jun 30 2012 23:59:00.252, clock=d39a1145.ba8c5798 Sat, Jun 30 2012 23:59:01.728, peer=4414, tc=6, mintc=3, offset=-0.090, frequency=3.226, sys_jitter=0.155, clk_jitter=0.276, clk_wander=0.011, tai=34, leapsec=201207010000, expire=201212280000 Sat, Jun 30 2012 23:59:01.744 Sat, Jun 30 2012 23:59:02.246 Sat, Jun 30 2012 23:59:02.748 Sat, Jun 30 2012 23:59:03.250 Sat, Jun 30 2012 23:59:03.752 ... Sat, Jun 30 2012 23:59:57.462 Sat, Jun 30 2012 23:59:57.964 Sat, Jun 30 2012 23:59:58.466 Sat, Jun 30 2012 23:59:58.968 Sat, Jun 30 2012 23:59:59.470 Sat, Jun 30 2012 23:59:59.972 Sat, Jun 30 2012 23:59:59.474 Sat, Jun 30 2012 23:59:59.976 Sun, Jul 1 2012 0:00:00.478 Sun, Jul 1 2012 0:00:00.980 Sun, Jul 1 2012 0:00:01.483 Sun, Jul 1 2012 0:00:01.985 Sun, Jul 1 2012 0:00:02.487 Sun, Jul 1 2012 0:00:02.989 ... Sun, Jul 1 2012 0:00:59.212 Sun, Jul 1 2012 0:00:59.714 Sun, Jul 1 2012 0:01:00.216 Sun, Jul 1 2012 0:01:00.718 Sun, Jul 1 2012 0:01:01.221 after time change: associd=0 status=021b leap_none, sync_lf_radio, 1 event, leap_event, version="ntpd 4.2.6p5@1.2349-o Sun May 6 15:35:24 UTC 2012 (1)", processor="x86_64", system="Linux/3.2.12-gentoo", leap=00, stratum=1, precision=-22, rootdelay=0.000, rootdisp=2.024, refid=DCFa, reftime=d39a1183.4094e0e1 Sun, Jul 1 2012 0:00:03.252, clock=d39a11bd.b95a38e4 Sun, Jul 1 2012 0:01:01.724, peer=4414, tc=6, mintc=3, offset=-0.108, frequency=3.219, sys_jitter=0.106, clk_jitter=0.258, clk_wander=0.011, tai=35, leapsec=201207010000, expire=201212280000 |
Output from report-timechange-unix.sh (reduced to the relevant seconds): |
Log of unix time during 2 minutes: Sat Jun 30 23:59:01 UTC 2012 Sat Jun 30 23:59:02 UTC 2012 Sat Jun 30 23:59:02 UTC 2012 Sat Jun 30 23:59:03 UTC 2012 Sat Jun 30 23:59:03 UTC 2012 ... Sat Jun 30 23:59:57 UTC 2012 Sat Jun 30 23:59:57 UTC 2012 Sat Jun 30 23:59:58 UTC 2012 Sat Jun 30 23:59:58 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sun Jul 1 00:00:00 UTC 2012 Sun Jul 1 00:00:00 UTC 2012 Sun Jul 1 00:00:01 UTC 2012 Sun Jul 1 00:00:01 UTC 2012 Sun Jul 1 00:00:02 UTC 2012 Sun Jul 1 00:00:02 UTC 2012 ... Sun Jul 1 00:00:58 UTC 2012 Sun Jul 1 00:00:59 UTC 2012 Sun Jul 1 00:01:00 UTC 2012 Sun Jul 1 00:01:00 UTC 2012 Sun Jul 1 00:01:01 UTC 2012 |
Entries in the log file: |
Jun 30 23:59:59 goliath kernel: [4172115.751906] Clock: inserting leap second 23:59:60 UTC Jul 1 00:01:00 goliath ntpd[25915]: parse: convert_rawdcf: parity check FAILED for "-#--#-#-####-#--A--LS------4p1----2P-----212412---1--8---8" Jul 1 00:01:00 goliath ntpd[25915]: PARSE receiver #0: interval for following error message class is at least 00:01:00 Jul 1 00:01:00 goliath ntpd[25915]: PARSE receiver #0: FAILED TIMECODE: "-#--#-#-####-#--A--LS------4p1----2P-----212412---1--8---" (check receiver configuration / wiring) |
ntp3.home4u.ch was running in CEST on superman.wenks.ch, a FreeBSD 7.4-RELEASE-p9 system with ntpd 4.2.4p5 and DCF77 mouseCLOCK. Output from report-timechange-ntp.sh (reduced to the relevant seconds): |
Log of ntp time during 2 minutes with milliseconds: before time change: assID=0 status=42f4 leap_add_sec, sync_lf_clock, 15 events, event_peer/strat_chg, version="ntpd 4.2.4p5-a Wed May 30 16:30:06 CEST 2012 (1)", processor="amd64", system="FreeBSD/7.4-RELEASE-p9", leap=01, stratum=1, precision=-19, rootdelay=0.000, rootdispersion=5.174, peer=36828, refid=DCFa, reftime=d39a1117.3ba7ff30 Sun, Jul 1 2012 1:58:15.233, poll=10, clock=d39a1145.0c1b6759 Sun, Jul 1 2012 1:59:01.047, state=4, offset=0.295, frequency=25.359, jitter=2.381, noise=1.239, stability=0.000, hostname="superman.wenks.ch", signature="md5WithRSAEncryption", flags=0x80003, update=201206300622, leapsec=201201110000, tai=34, cert="superman.wenks.ch superman.wenks.ch 0x0", expire=201303222005 Sun, Jul 1 2012 1:59:01.085 Sun, Jul 1 2012 1:59:01.743 Sun, Jul 1 2012 1:59:02.596 Sun, Jul 1 2012 1:59:03.740 Sun, Jul 1 2012 1:59:04.300 ... Sun, Jul 1 2012 1:59:57.326 Sun, Jul 1 2012 1:59:57.843 Sun, Jul 1 2012 1:59:58.351 Sun, Jul 1 2012 1:59:58.878 Sun, Jul 1 2012 1:59:59.393 Sun, Jul 1 2012 1:59:59.906 Sun, Jul 1 2012 1:59:59.415 Sun, Jul 1 2012 1:59:59.933 Sun, Jul 1 2012 2:00:00.442 Sun, Jul 1 2012 2:00:00.972 Sun, Jul 1 2012 2:00:01.482 Sun, Jul 1 2012 2:00:01.996 Sun, Jul 1 2012 2:00:02.513 Sun, Jul 1 2012 2:00:03.025 ... Sun, Jul 1 2012 2:01:09.492 Sun, Jul 1 2012 2:01:10.004 Sun, Jul 1 2012 2:01:10.517 Sun, Jul 1 2012 2:01:11.051 Sun, Jul 1 2012 2:01:11.587 after time change: assID=0 status=42f4 leap_add_sec, sync_lf_clock, 15 events, event_peer/strat_chg, version="ntpd 4.2.4p5-a Wed May 30 16:30:06 CEST 2012 (1)", processor="amd64", system="FreeBSD/7.4-RELEASE-p9", leap=01, stratum=1, precision=-19, rootdelay=0.000, rootdispersion=4.988, peer=36828, refid=DCFa, reftime=d39a1195.3baf223b Sun, Jul 1 2012 2:00:21.233, poll=10, clock=d39a11c8.3557d94f Sun, Jul 1 2012 2:01:12.208, state=4, offset=-0.545, frequency=25.359, jitter=1.900, noise=1.103, stability=0.000, hostname="superman.wenks.ch", signature="md5WithRSAEncryption", flags=0x80003, update=201206300622, leapsec=201201110000, tai=35, cert="superman.wenks.ch superman.wenks.ch 0x0", expire=201303222005 |
Output from report-timechange-unix.sh (reduced to the relevant seconds): |
Log of unix time during 2 minutes: Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:02 CEST 2012 Sun Jul 1 01:59:02 CEST 2012 Sun Jul 1 01:59:03 CEST 2012 ... Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:01 CEST 2012 Sun Jul 1 02:00:01 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 ... Sun Jul 1 02:01:07 CEST 2012 Sun Jul 1 02:01:07 CEST 2012 Sun Jul 1 02:01:08 CEST 2012 Sun Jul 1 02:01:08 CEST 2012 Sun Jul 1 02:01:09 CEST 2012 |
Entries in the log file: |
Jul 1 02:00:21 superman ntpd[24748]: kernel time sync status change 2001 Jul 1 02:01:00 superman ntpd[24748]: parse: convert_rawdcf: parity check FAILED for "-#--#-#-####-#--A--LS------4p1----2P-----212412---1--8---8" Jul 1 02:01:00 superman ntpd[24748]: PARSE receiver #0: interval for following error message class is at least 00:01:00 Jul 1 02:01:00 superman ntpd[24748]: PARSE receiver #0: FAILED TIMECODE: "-#--#-#-####-#--A--LS------4p1----2P-----212412---1--8---" (check receiver configuration / wiring) Jul 1 02:02:00 superman ntpd[24748]: synchronized to 2001:8a8:1005:1::8, stratum 1 Jul 1 02:05:43 superman ntpd[24748]: synchronized to GENERIC(0), stratum 0 |
gentoo.home4u.ch was running in UTC, a Gentoo Linux system with kernel 3.2.12, ntpd 4.2.6p5. Output from report-timechange-ntp.sh (reduced to the relevant seconds): |
Log of ntp time during 2 minutes with milliseconds: before time change: associd=0 status=4615 leap_add_sec, sync_ntp, 1 event, clock_sync, version="ntpd 4.2.6p5@1.2349-o Sun May 6 14:17:50 UTC 2012 (1)", processor="x86_64", system="Linux/3.2.12-gentoo", leap=01, stratum=2, precision=-23, rootdelay=0.691, rootdisp=33.628, refid=87.90.14.154, reftime=d39a0d3d.6ccbcd6c Sat, Jun 30 2012 23:41:49.424, clock=d39a1145.e0a228c2 Sat, Jun 30 2012 23:59:01.877, peer=4067, tc=10, mintc=3, offset=-0.025, frequency=48.838, sys_jitter=0.211, clk_jitter=0.218, clk_wander=0.031 Sat, Jun 30 2012 23:59:01.881 Sat, Jun 30 2012 23:59:02.385 Sat, Jun 30 2012 23:59:02.888 Sat, Jun 30 2012 23:59:03.391 Sat, Jun 30 2012 23:59:03.895 ... Sat, Jun 30 2012 23:59:57.230 Sat, Jun 30 2012 23:59:57.733 Sat, Jun 30 2012 23:59:58.236 Sat, Jun 30 2012 23:59:58.740 Sat, Jun 30 2012 23:59:59.243 Sat, Jun 30 2012 23:59:59.746 Sat, Jun 30 2012 23:59:59.250 Sat, Jun 30 2012 23:59:59.753 Sun, Jul 1 2012 0:00:00.256 Sun, Jul 1 2012 0:00:00.759 Sun, Jul 1 2012 0:00:01.263 Sun, Jul 1 2012 0:00:01.766 Sun, Jul 1 2012 0:00:02.269 Sun, Jul 1 2012 0:00:02.772 ... Sun, Jul 1 2012 0:00:59.638 Sun, Jul 1 2012 0:01:00.141 Sun, Jul 1 2012 0:01:00.645 Sun, Jul 1 2012 0:01:01.148 Sun, Jul 1 2012 0:01:01.651 after time change: associd=0 status=061b leap_none, sync_ntp, 1 event, leap_event, version="ntpd 4.2.6p5@1.2349-o Sun May 6 14:17:50 UTC 2012 (1)", processor="x86_64", system="Linux/3.2.12-gentoo", leap=00, stratum=2, precision=-23, rootdelay=0.691, rootdisp=35.443, refid=87.90.14.154, reftime=d39a0d3d.6ccbcd6c Sat, Jun 30 2012 23:41:49.424, clock=d39a11be.27f5cd97 Sun, Jul 1 2012 0:01:02.156, peer=4067, tc=10, mintc=3, offset=-0.025, frequency=48.838, sys_jitter=0.211, clk_jitter=0.218, clk_wander=0.031 |
Output from report-timechange-unix.sh (reduced to the relevant seconds): |
Log of unix time during 2 minutes: Sat Jun 30 23:59:01 UTC 2012 Sat Jun 30 23:59:02 UTC 2012 Sat Jun 30 23:59:02 UTC 2012 Sat Jun 30 23:59:03 UTC 2012 Sat Jun 30 23:59:03 UTC 2012 ... Sat Jun 30 23:59:57 UTC 2012 Sat Jun 30 23:59:57 UTC 2012 Sat Jun 30 23:59:58 UTC 2012 Sat Jun 30 23:59:58 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sat Jun 30 23:59:59 UTC 2012 Sun Jul 1 00:00:00 UTC 2012 Sun Jul 1 00:00:00 UTC 2012 Sun Jul 1 00:00:01 UTC 2012 Sun Jul 1 00:00:01 UTC 2012 Sun Jul 1 00:00:02 UTC 2012 Sun Jul 1 00:00:02 UTC 2012 ... Sun Jul 1 00:00:59 UTC 2012 Sun Jul 1 00:00:59 UTC 2012 Sun Jul 1 00:01:00 UTC 2012 Sun Jul 1 00:01:00 UTC 2012 Sun Jul 1 00:01:01 UTC 2012 |
Entries in the log file: |
Jun 30 23:59:59 gentoo kernel: [1320862.936994] Clock: inserting leap second 23:59:60 UTC |
flashback.wenks.ch was running in CEST, a Mac OS X 10.6.8 system with ntpd 4.2.4p4. Output from report-timechange-unix.sh (reduced to the relevant seconds): |
Log of unix time during 2 minutes: before time change: assID=0 status=46f4 leap_add_sec, sync_ntp, 15 events, event_peer/strat_chg, version="ntpd 4.2.4p4@1.1520-o Mon May 18 19:38:25 UTC 2009 (1)", processor="x86_64", system="Darwin/10.8.0", leap=01, stratum=2, precision=-20, rootdelay=0.251, rootdispersion=9.017, peer=51492, refid=87.90.14.154, reftime=d39a110d.e3034b86 Sun, Jul 1 2012 1:58:05.886, poll=7, clock=d39a1144.1e2eb241 Sun, Jul 1 2012 1:59:00.117, state=4, offset=-1.357, frequency=50.876, jitter=0.656, noise=0.300, stability=0.009, tai=0 Sun Jul 1 01:59:00 CEST 2012 Sun Jul 1 01:59:00 CEST 2012 Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:01 CEST 2012 Sun Jul 1 01:59:02 CEST 2012 ... Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:57 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:58 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 01:59:59 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:00 CEST 2012 Sun Jul 1 02:00:01 CEST 2012 Sun Jul 1 02:00:01 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 Sun Jul 1 02:00:02 CEST 2012 ... Sun Jul 1 02:00:58 CEST 2012 Sun Jul 1 02:00:59 CEST 2012 Sun Jul 1 02:00:59 CEST 2012 Sun Jul 1 02:01:00 CEST 2012 Sun Jul 1 02:01:00 CEST 2012 after time change: assID=0 status=46f4 leap_add_sec, sync_ntp, 15 events, event_peer/strat_chg, version="ntpd 4.2.4p4@1.1520-o Mon May 18 19:38:25 UTC 2009 (1)", processor="x86_64", system="Darwin/10.8.0", leap=01, stratum=2, precision=-20, rootdelay=0.251, rootdispersion=10.832, peer=51492, refid=87.90.14.154, reftime=d39a110d.e3034b86 Sun, Jul 1 2012 1:58:05.886, poll=7, clock=d39a11bd.78e6b0ae Sun, Jul 1 2012 2:01:01.472, state=4, offset=-1.357, frequency=50.876, jitter=0.656, noise=0.300, stability=0.009, tai=0 |
Shell Scripts |
report-timechange-ntp.sh
To run the scripts below, add a line to crontab. Something like this for UTC on Linux (adjust path to script, mday, month and e-mail address): |
#minute hour mday month wday command 59 23 30 06 * /path/to/report-timechange-ntp.sh 2>&1 | /bin/mail -s "ntp time change log leap second (`hostname -s`)" hostmaster@example.com |
Or something like this for CEST on FreeBSD (adjust path to script, mday, month and e-mail address): |
#minute hour mday month wday command 59 01 01 07 * /path/to/report-timechange-ntp.sh 2>&1 | /usr/bin/mail -s "ntp time change log leap second (`hostname -s`)" hostmaster@example.com |
FreeBSD (also needs the Ports shells/bash and
sysutils/coreutils installed): |
#!/usr/local/bin/bash echo "Log of ntp time during 2 minutes with milliseconds:" echo echo "before time change:" ntpq -c rv echo for i in `/usr/local/bin/gseq 0 240` do ntptime | awk '/time d3/ {print $3" "$4" "$5" "$6" "$7}' | sed 's/,$//' sleep 0.5 done echo echo "after time change:" ntpq -c rv exit 0 |
Linux: |
#!/bin/bash echo "Log of ntp time during 2 minutes with milliseconds:" echo echo "before time change:" ntpq -c rv echo for i in `seq 0 240` do ntptime | awk '/time d3/ {print $3" "$4" "$5" "$6" "$7}' | sed 's/,$//' sleep 0.5 done echo echo "after time change:" ntpq -c rv exit 0 |
report-timechange-unix.sh To run the scripts below, add a line to crontab. Something like this for UTC on Linux (adjust path to script, mday, month and e-mail address): |
#minute hour mday month wday command 59 23 30 06 * /path/to/report-timechange-unix.sh 2>&1 | /bin/mail -s "unix time change log leap second (`hostname -s`)" hostmaster@example.com |
Or something like this for CEST on FreeBSD or Mac OS X (adjust path to script, mday, month and e-mail address): |
#minute hour mday month wday command 59 01 01 07 * /path/to/report-timechange-unix.sh 2>&1 | /usr/bin/mail -s "unix time change log leap second (`hostname -s`)" hostmaster@example.com |
FreeBSD (also needs the Ports shells/bash and
sysutils/coreutils installed): |
#!/usr/local/bin/bash echo "Log of unix time during 2 minutes:" echo for i in `/usr/local/bin/gseq 0 240` do date sleep 0.5 done exit 0 |
Linux: |
#!/bin/bash echo "Log of unix time during 2 minutes:" echo for i in `seq 0 240` do date sleep 0.5 done exit 0 |
Mac OS X (also needs MacPorts coreutils installed): |
#!/bin/bash echo "Log of unix time during 2 minutes:" echo echo "before time change:" ntpq -c rv echo for i in `/opt/local/bin/gseq 0 240` do date sleep 0.5 done echo echo "after time change:" ntpq -c rv exit 0 |
Document History |
|
20-Jul-2012 | Initial publication |
home4u.ch | last update 20-Jul-2012 |