Re: ntpstat

2016-02-15 Thread Miroslav Lichvar
On Fri, Feb 12, 2016 at 08:48:41AM -0500, Przemek Klosowski wrote:
> On 02/12/2016 06:10 AM, Miroslav Lichvar wrote:
> >It has been included in the ntp package for a very long time, but it's
> >not actually part of the upstream ntp package (and can't be as it's
> >licensed under GPL). I guess ntpstat should rather have its own
> >package.
> Since you are thinking of rewriting, it would make sense to offer it to
> upstream. Do you think they'd take it?

That's a good point. I'll ask them. I think they wouldn't be
interested in the part of the script that adds chrony support, so it
would continue as an ntpd only utility.

-- 
Miroslav Lichvar
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: ntpstat

2016-02-12 Thread Japheth Cleaver

On 2/12/2016 3:36 AM, Peter Lemenkov wrote:

2016-02-12 12:10 GMT+01:00 Miroslav Lichvar :


I could write a new man page and put it in the ntp package as a
replacement. Or it could be added as a new package in Fedora, which
ntp could recommend or suggest. Would that make sense? Another option
is to simply drop ntpstat from ntp with no replacement.

Thoughts?

I'd simply remove it. Otherwise you have to act as upstream for this
outdated thing.


Whatever "outdated" means in this context, if it's functional (or can be 
made functional) and provides actual utility then why /not/ keep it?
I'd suggest it getting its own package, though, lest it get sucked into 
whatever systemd is doing with ntp.


-jc
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: ntpstat

2016-02-12 Thread Przemek Klosowski

On 02/12/2016 06:10 AM, Miroslav Lichvar wrote:

ntpstat is a small utility included in the ntp package, which prints
the synchronization status of ntpd, the maximum error of the clock and
few other fields. Apparently, there are people who find it useful for
monitoring.

It has been included in the ntp package for a very long time, but it's
not actually part of the upstream ntp package (and can't be as it's
licensed under GPL). I guess ntpstat should rather have its own
package.
Since you are thinking of rewriting, it would make sense to offer it to 
upstream. Do you think they'd take it?
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: ntpstat

2016-02-12 Thread Miroslav Lichvar
On Fri, Feb 12, 2016 at 12:36:16PM +0100, Peter Lemenkov wrote:
> 2016-02-12 12:10 GMT+01:00 Miroslav Lichvar :
> 
> > I could write a new man page and put it in the ntp package as a
> > replacement. Or it could be added as a new package in Fedora, which
> > ntp could recommend or suggest. Would that make sense? Another option
> > is to simply drop ntpstat from ntp with no replacement.
> >
> > Thoughts?
> 
> I'd simply remove it. Otherwise you have to act as upstream for this
> outdated thing.

FWIW, I'd have no problem with maintaining a hundred-line shell
script. I think it would rarely need an update. Of course, if there
were no users for it, then I'd rather drop it.

-- 
Miroslav Lichvar
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


Re: ntpstat

2016-02-12 Thread Peter Lemenkov
2016-02-12 12:10 GMT+01:00 Miroslav Lichvar :

> I could write a new man page and put it in the ntp package as a
> replacement. Or it could be added as a new package in Fedora, which
> ntp could recommend or suggest. Would that make sense? Another option
> is to simply drop ntpstat from ntp with no replacement.
>
> Thoughts?

I'd simply remove it. Otherwise you have to act as upstream for this
outdated thing.


-- 
With best regards, Peter Lemenkov.
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org


ntpstat

2016-02-12 Thread Miroslav Lichvar
ntpstat is a small utility included in the ntp package, which prints
the synchronization status of ntpd, the maximum error of the clock and
few other fields. Apparently, there are people who find it useful for
monitoring.

It has been included in the ntp package for a very long time, but it's
not actually part of the upstream ntp package (and can't be as it's
licensed under GPL). I guess ntpstat should rather have its own
package.

There are few issues with it, however. The last ntpstat release is
from 2002 and there is no upstream now. We have a couple of patches
that make it work with the current ntp code. It implements the mode 6
protocol (used by ntpq for instance), but it's really the minimum
needed to send a request and parse the data if it happens to be in the
first packet of the response. It can break easily. Also, it doesn't
support IPv6, to get an IPv6 address for the system peer it would have
to iterate over the NTP associations.

Instead of fixing and maitaining the C code, I thought it would be
much easier to rewrite it from scratch as a bash script using ntpq.
Also, it would be easy to add support for chronyd using the chronyc
utility. This is what I have now, its output should be in most cases
identical to what the original ntpstat produced.

https://raw.githubusercontent.com/mlichvar/ntpstat/master/ntpstat

I could write a new man page and put it in the ntp package as a
replacement. Or it could be added as a new package in Fedora, which
ntp could recommend or suggest. Would that make sense? Another option
is to simply drop ntpstat from ntp with no replacement.

Thoughts?

-- 
Miroslav Lichvar
--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org