ntpmon should be more usable now
Hal Murray
hmurray at megapathdsl.net
Fri Dec 9 02:32:12 UTC 2016
esr at thyrsus.com said:
> I don't know how to read the damned output. I have barely
> any idea what those columns mean. I can't tell descending
> from ascending from middle-outwards!
It's what you want if you are trying to figure out who is using your server.
A couple of examples from a handy server.
lstint avgint rstr r m v count rport remote address
===================================================
489277 20422 180 . 3 4 74 123 dhcp-103
492043 13366 180 . 3 4 125 123 dhcp-102
1210927 33 180 . 4 4 31564 123 tim
The count column is the total packets. I think it includes both replies from
servers as well as requests from servers in case you have too systems looking
at each other. I don't think it includes ntpq queries.
The first/lstint column is the time since the last packet. The second/avgint
column is the average time between requests.
The rstr column is the restriction bits that apply to that IP Address. The m
and v columns are the mode and version from the last packet. The above shows
2 clients and 1 server.
The rport is the remote/source port from the last packet. The remote address
should be obvious.
Yes, the server has been up a while, and 5 days ago I was playing with a
couple of new systems.
---------
The mru section will take forever on any busy server. I think the default
memory limit matches the old 600 slot default.
It will probably screwup a nice clean API, but if you want to display the
most recent slots, you can do something like:
read the whole collection. They come back sorted by lstint - most recent
last.
remember the IP Addresses of several slots just below the ones you print.
Next time, rather than read the whole thing, start with the IP Addresses
you saved.
display the new data and update the saved IP Addresses...
If you want to play, you can add keyboard commands to fiddle the sort order.
Oldest first should be easy. Just read as many as fit. Sorting by other
columns will be hard.
I'd like a q for quit.
--
These are my opinions. I hate spam.
More information about the devel
mailing list