More on ntpq

Eric S. Raymond esr at thyrsus.com
Fri Dec 2 08:07:34 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> 
> > Done, and for good measure I've similarly wrapped the peers display.
> 
> Should it be around the whole command loop?  Do we want ^C when reading a 
> command to start over reading a command or exit?  I vote for try again.  I'll 
> use ^D if I want to exit.

I thought of that already. I looked for a way to do it and found one, but
the way the cmd.Cmd class is implemented means it could have unintended
consequences if the internals change even a little.  I think it's safer
to have our traps out where we can see them.
 
> Is DNS lookup called by any other commands?  What's the longest timeout if 
> the target doesn't respond?  (30 seconds on my system.)  ...

Don't knpow what the longest timeout is, but the only places DNS lookups
hapen are in peer lists, MRU lists, openhost, and variable displays.
I just wrapped all of them.

> Does the hostname command do the lookup right then or wait until the next 
> time it tries to send a packet?

Right then.

>                                I vote that ^C cover that DNS lookup. (If I 
> typo a host that should be in the local list, it goes out to the net.  That 
> can take a long time.  I'd like to be able to ^C out of that lookup.)

It's done.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list