initial
This commit is contained in:
16
snippets/ntp/test.py
Normal file
16
snippets/ntp/test.py
Normal file
@ -0,0 +1,16 @@
|
||||
import ntp.packet
|
||||
|
||||
session = ntp.packet.ControlSession()
|
||||
session.openhost('localhost')
|
||||
|
||||
peers = session.readstat()
|
||||
|
||||
l = session.readvar(0)
|
||||
print(f"{l=}")
|
||||
|
||||
for p in peers:
|
||||
l = session.readvar(p.associd)
|
||||
print(f"{p.associd}: {dict(l)}")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user