Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19478 )

Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/19478/2//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/19478/2//COMMIT_MSG@16
PS2, Line 16: As already mentioned, this patch also adds a new 
'clock_ntp_status'
            : metric that provides information on ntp_gettime()/ntp_adjtime() 
call
            : result.  It's a string containing current timestamp (usec),
            : max error (usec), and the result status of the call.
> nit: Is it possible to show that output somewhere here or upload the file t
Ah, sure!  That's how it looks like now on a machine where the system clock is 
synchronized with ntpd (this particular snippet captured from the 
HybridClockTest.TestNtpDiagnostics scenario where a mock clock is used):

--- snip ---
/usr/bin/ntpstat
------------------------------------------
stdout:
synchronised to NTP server (172.17.64.15) at stratum 3
   time correct to within 102 ms
   polling server every 1024 s

/usr/sbin/ntptime
------------------------------------------
stdout:
ntp_gettime() returns code 0 (OK)
  time e78e6abb.56371520  Wed, Feb  8 2023 10:38:51.336, (.336778055),
  maximum error 485735 us, estimated error 299 us, TAI offset 0
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 882.218 us, frequency 7.269 ppm, interval 1 s,
  maximum error 485735 us, estimated error 299 us,
  status 0x6001 (PLL,NANO,MODE),
  time constant 10, precision 0.001 us, tolerance 500 ppm,

/usr/sbin/ntpq -n -c timeout 1000 -c readvar -c sysinfo -c lpeers -c opeers -c 
version
------------------------------------------
stdout:
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd [email protected] Mon Mar 16 14:53:03 UTC 2015 (1)",
processor="x86_64", system="Linux/2.6.32-504.30.3.el6.x86_64", leap=00,
stratum=3, precision=-23, rootdelay=32.052, rootdisp=85.575,
refid=172.17.64.15,
reftime=e78e67a3.9ffe42f8  Wed, Feb  8 2023 10:25:39.624,
clock=e78e6abb.58f0d7da  Wed, Feb  8 2023 10:38:51.347, peer=32669,
tc=10, mintc=3, offset=1.070, frequency=7.269, sys_jitter=2.457,
clk_jitter=0.299, clk_wander=0.076
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*172.17.64.15    204.17.205.24    2 u  792 1024  377    0.222    2.140   0.166
+172.18.7.3      204.11.201.10    3 u  230 1024  377    0.731   -1.442   0.237
+10.16.10.15     172.17.64.11     4 u 1014 1024  377    1.031    2.620   1.382
     remote           local      st t when poll reach   delay   offset    disp
==============================================================================
*172.17.64.15    10.17.240.17     2 u  792 1024  377    0.222    2.140  19.211
+172.18.7.3      10.17.240.17     3 u  230 1024  377    0.731   -1.442  15.077
+10.16.10.15     10.17.240.17     4 u 1014 1024  377    1.031    2.620  15.251
ntpq [email protected] Mon Mar 16 14:53:07 UTC 2015 (1)

stderr:
***Command `sysinfo' unknown

/usr/sbin/ntpdc -n -c timeout 1000 -c peers -c sysinfo -c sysstats -c version
------------------------------------------
stdout:
     remote           local      st poll reach  delay   offset    disp
=======================================================================
=10.16.10.15     10.17.240.17     4 1024  377 0.00102  0.002620 0.12349
*172.17.64.15    10.17.240.17     2 1024  377 0.00021  0.002140 0.13860
=172.18.7.3      10.17.240.17     3 1024  377 0.00072 -0.001442 0.12279
system peer:          172.17.64.15
system peer mode:     client
leap indicator:       00
stratum:              3
precision:            -23
root distance:        0.03204 s
root dispersion:      0.08557 s
reference ID:         [172.17.64.15]
reference time:       e78e67a3.9ffe42f8  Wed, Feb  8 2023 10:25:39.624
system flags:         auth monitor ntp kernel stats
jitter:               0.002457 s
stability:            0.000 ppm
broadcastdelay:       0.000000 s
authdelay:            0.000000 s
time since restart:     94332055
time since reset:       94332055
packets received:       273712
packets processed:      273198
current version:        273198
previous version:       8
declined:               0
access denied:          48
bad length or format:   4
bad authentication:     0
rate exceeded:          0
ntpdc [email protected] Mon Mar 16 14:53:05 UTC 2015 (1)

could not find executable: chronyc
could not find executable: chronyc
could not find executable: chronyc
{
    "type": "server",
    "id": "clock-test",
    "metrics": [
        {
            "name": "clock_ntp_status",
            "value": "now:1675881531382242 maxerror:485735 status:ok"
        },
        {
            "name": "hybrid_clock_timestamp",
            "value": 6864410752541884416
        },
        {
            "name": "hybrid_clock_extrapolating",
            "value": false
        },
        {
            "name": "hybrid_clock_max_errors",
            "total_count": 1,
            "min": 0,
            "mean": 0.0,
            "percentile_75": 0,
            "percentile_95": 0,
            "percentile_99": 0,
            "percentile_99_9": 0,
            "percentile_99_99": 0,
            "max": 0,
            "values": [
                0
            ],
            "counts": [
                1
            ],
            "total_sum": 0
        },
        {
            "name": "hybrid_clock_error",
            "value": 0
        },
        {
            "name": "hybrid_clock_extrapolation_intervals",
            "total_count": 0,
            "min": 0,
            "mean": 0.0,
            "percentile_75": 0,
            "percentile_95": 0,
            "percentile_99": 0,
            "percentile_99_9": 0,
            "percentile_99_99": 0,
            "max": 0,
            "total_sum": 0
        }
    ]
}
--- snip ---



--
To view, visit http://gerrit.cloudera.org:8080/19478
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
Gerrit-Change-Number: 19478
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Wed, 08 Feb 2023 18:43:07 +0000
Gerrit-HasComments: Yes

Reply via email to