You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Alexey Serbin (Code Review)" <ge...@cloudera.org> on 2023/02/06 22:43:27 UTC
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Alexey Serbin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/19478
Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................
[clock] output more info in SystemNtp::DumpDiagnostics()
This patch adds more details to the output of the DumpDiagnostics()
method for the system clock synchronized with NTP. In particular,
the output now contains relevant metrics for the hybrid clock, the
output of the 'ntpstat' utility (if present), the output of
'chronyc activity' (if the 'chronyc' CLI is present), and a snapshot
of the newly introduced 'clock_ntp_status' metric.
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.
The corresponding HybridClockTest.TestNtpDiagnostics scenario has been
updated correspondingly.
Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
---
M src/kudu/clock/hybrid_clock-test.cc
M src/kudu/clock/hybrid_clock.cc
M src/kudu/clock/system_ntp.cc
M src/kudu/clock/system_ntp.h
4 files changed, 97 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/78/19478/1
--
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: newchange
Gerrit-Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
Gerrit-Change-Number: 19478
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <al...@apache.org>
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Hello Yuqi Du, Yifan Zhang, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/19478
to look at the new patch set (#2).
Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................
[clock] output more info in SystemNtp::DumpDiagnostics()
This patch adds more details to the output of the DumpDiagnostics()
method for the system clock synchronized with NTP. In particular,
the output now contains relevant metrics for the hybrid clock, the
output of the 'ntpstat' utility (if present), the output of
'chronyc activity' (if the 'chronyc' CLI is present), and a snapshot
of the newly introduced 'clock_ntp_status' metric.
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.
The corresponding HybridClockTest.TestNtpDiagnostics scenario has been
updated correspondingly.
Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
---
M src/kudu/clock/hybrid_clock-test.cc
M src/kudu/clock/hybrid_clock.cc
M src/kudu/clock/system_ntp.cc
M src/kudu/clock/system_ntp.h
4 files changed, 99 insertions(+), 4 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/78/19478/2
--
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: newpatchset
Gerrit-Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
Gerrit-Change-Number: 19478
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/19478 )
Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................
Patch Set 2: Code-Review+2
--
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 <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Wed, 08 Feb 2023 02:46:58 +0000
Gerrit-HasComments: No
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
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 4.2.6p5@1.2349-o 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 4.2.6p5@1.2349-o 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 4.2.6p5@1.2349-o 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 <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Wed, 08 Feb 2023 18:43:07 +0000
Gerrit-HasComments: Yes
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Posted by "Ashwani Raina (Code Review)" <ge...@cloudera.org>.
Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/19478 )
Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Looks good to me.
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 that contains the output ?
--
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 <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Tue, 07 Feb 2023 14:49:45 +0000
Gerrit-HasComments: Yes
[kudu-CR] [clock] output more info in SystemNtp::DumpDiagnostics()
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19478 )
Change subject: [clock] output more info in SystemNtp::DumpDiagnostics()
......................................................................
[clock] output more info in SystemNtp::DumpDiagnostics()
This patch adds more details to the output of the DumpDiagnostics()
method for the system clock synchronized with NTP. In particular,
the output now contains relevant metrics for the hybrid clock, the
output of the 'ntpstat' utility (if present), the output of
'chronyc activity' (if the 'chronyc' CLI is present), and a snapshot
of the newly introduced 'clock_ntp_status' metric.
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.
The corresponding HybridClockTest.TestNtpDiagnostics scenario has been
updated correspondingly.
Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
Reviewed-on: http://gerrit.cloudera.org:8080/19478
Tested-by: Kudu Jenkins
Reviewed-by: Ashwani Raina <ar...@cloudera.com>
Reviewed-by: Yifan Zhang <ch...@163.com>
---
M src/kudu/clock/hybrid_clock-test.cc
M src/kudu/clock/hybrid_clock.cc
M src/kudu/clock/system_ntp.cc
M src/kudu/clock/system_ntp.h
4 files changed, 99 insertions(+), 4 deletions(-)
Approvals:
Kudu Jenkins: Verified
Ashwani Raina: Looks good to me, but someone else must approve
Yifan Zhang: Looks good to me, approved
--
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: merged
Gerrit-Change-Id: Ibb74e81ba1e4bc4c60acc6bd49bb458085e28207
Gerrit-Change-Number: 19478
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Ashwani Raina <ar...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>