Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Brian Inglis
On 2017-03-21 08:05, Harlan Stenn wrote:
> Miroslav Lichvar writes:
>> On Tue, Mar 21, 2017 at 12:01:21PM +, Ra=FAl wrote:
>>> But I don't need anything special, I'm just looking how to know
>>> the load of my NTP server, how many request I'm receiving from
>>> clients. I thought that doing that would be easy.
>>
>> If you just need current rate of requests and don't care about 
>> individual clients, you could periodically call ntpdc -c iostats
>> and calculate the rate from the total number of received packets
>> using awk for instance:
>>
>> while true; do ntpdc -c iostats; sleep 1; done | \
>>  awk '/received packets/{ print $3 - last; last=3D$3}' =
> 4.2.6 should have a similar command via ntpdc.
> And in 4.2.8 (at least) , iostats is available in ntpq.

http://doc.ntp.org/4.2.6p5/ntpdc.html documents monlist but not 
its output. It's been disabled in newer releases and deconfigured 
in older releases since the DDoS attacks using it against 
misconfigured public servers. So I can't easily try it and it may 
not work for you if that was one of the patches applied to CentOS.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Brian Inglis
On 2017-03-21 05:44, Charles Elliott wrote:
> Will you please go to http://bugs.ntp.org/enter_bug.cgi and file a
> bug report saying that the ntpq mrulist command is not working for
> you, if that is the case as you allege. In the alternative, please go
> to the same Web page (http://bugs.ntp.org/enter_bug.cgi) and file a
> request for enhancement saying exactly what your requirements are and
> why you need them.

He said he's running CentOS stable NTP 4.2.6p5 which did not support 
the mru conf statement or ntpq monstats or mrulist commands
http://doc.ntp.org/4.2.6p5/monopt.html
http://doc.ntp.org/4.2.6p5/ntpq.html

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Harlan Stenn
4.2.6 should have a similar command via ntpdc.

And in 4.2.8 (at least) , iostats is available in ntpq.

H
--
Miroslav Lichvar writes:
> On Tue, Mar 21, 2017 at 12:01:21PM +, Ra=FAl wrote:
> > But I don't need anything special, I'm just looking how to know the load =
> of
> > my NTP server, how many request I'm receiving from clients. I thought that
> > doing that would be easy.
> 
> If you just need current rate of requests and don't care about
> individual clients, you could periodically call ntpdc -c iostats and
> calculate the rate from the total number of received packets using awk
> for instance:
> 
> while true; do ntpdc -c iostats; sleep 1; done | \
>   awk '/received packets/{ print $3 - last; last=3D$3}' =
> 
> 
> -- =
> 
> Miroslav Lichvar
> ___
> questions mailing list
> questions@lists.ntp.org
> http://lists.ntp.org/listinfo/questions
> 
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Thank you very much, Miroslav.


On 21 March 2017 at 12:43, Miroslav Lichvar  wrote:

> On Tue, Mar 21, 2017 at 12:30:01PM +, Raúl wrote:
> > So, using "ntpdc -c iostats", the numbers under the labels "received
> > packets" and "packets sent" are the total number of requests
> > received/served since the last server reboot?
>
> Yes, except the numbers include all received and transmitted NTP
> packets, not just clients' requests and responses. That is, it will
> include also ntpd's own requests and responses from its servers, and
> also ntpdc/ntpq requests and responses, even from localhost.
>
> --
> Miroslav Lichvar
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Miroslav Lichvar
On Tue, Mar 21, 2017 at 12:30:01PM +, Raúl wrote:
> So, using "ntpdc -c iostats", the numbers under the labels "received
> packets" and "packets sent" are the total number of requests
> received/served since the last server reboot?

Yes, except the numbers include all received and transmitted NTP
packets, not just clients' requests and responses. That is, it will
include also ntpd's own requests and responses from its servers, and
also ntpdc/ntpq requests and responses, even from localhost.

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Miroslav,

Of course, I'm not interested in individual clients, just the total number
of requests in, f.e., one hour. Maybe I did not explain myself correctly in
my previous messages.

So, using "ntpdc -c iostats", the numbers under the labels "received
packets" and "packets sent" are the total number of requests
received/served since the last server reboot?

Thanks for your help,

Raúl.

On 21 March 2017 at 12:17, Miroslav Lichvar  wrote:

> On Tue, Mar 21, 2017 at 12:01:21PM +, Raúl wrote:
> > But I don't need anything special, I'm just looking how to know the load
> of
> > my NTP server, how many request I'm receiving from clients. I thought
> that
> > doing that would be easy.
>
> If you just need current rate of requests and don't care about
> individual clients, you could periodically call ntpdc -c iostats and
> calculate the rate from the total number of received packets using awk
> for instance:
>
> while true; do ntpdc -c iostats; sleep 1; done | \
> awk '/received packets/{ print $3 - last; last=$3}'
>
> --
> Miroslav Lichvar
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Miroslav Lichvar
On Tue, Mar 21, 2017 at 12:01:21PM +, Raúl wrote:
> But I don't need anything special, I'm just looking how to know the load of
> my NTP server, how many request I'm receiving from clients. I thought that
> doing that would be easy.

If you just need current rate of requests and don't care about
individual clients, you could periodically call ntpdc -c iostats and
calculate the rate from the total number of received packets using awk
for instance:

while true; do ntpdc -c iostats; sleep 1; done | \
awk '/received packets/{ print $3 - last; last=$3}' 

-- 
Miroslav Lichvar
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Charles,

I think that my problem with mrulist is not a bug. As Mike Cook sais in a
previous message, mrulist was added to NTP in the 4.2.7 version and I'm
using 4.2.6 (CentOS default one).

> In the alternative, please go to the same Web page (
http://bugs.ntp.org/enter_bug.cgi) and file a request for enhancement
saying exactly what your requirements are and why you need them.

But I don't need anything special, I'm just looking how to know the load of
my NTP server, how many request I'm receiving from clients. I thought that
doing that would be easy.

Thanks for your help,
Regards.

Raúl.


On 21 March 2017 at 11:44, Charles Elliott  wrote:

> Will you please go to http://bugs.ntp.org/enter_bug.cgi and file a bug
> report saying that the ntpq mrulist command is not working for you, if that
> is the case as you allege.  In the alternative, please go to the same Web
> page (http://bugs.ntp.org/enter_bug.cgi) and file a request for
> enhancement saying exactly what your requirements are and why you need them.
>
> If your English language skills are a barrier, then send me a copy of your
> request in Spanish.  I live in an Hispanic neighborhood, and will try to
> find someone to translate your email request.  No guarantees, but I am
> surrounded by Spanish speakers.  I should be able to find someone to
> translate.
>
> Charles Elliott
>
> ___
> questions mailing list
> questions@lists.ntp.org
> http://lists.ntp.org/listinfo/questions
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Charles Elliott
Will you please go to http://bugs.ntp.org/enter_bug.cgi and file a bug report 
saying that the ntpq mrulist command is not working for you, if that is the 
case as you allege.  In the alternative, please go to the same Web page 
(http://bugs.ntp.org/enter_bug.cgi) and file a request for enhancement saying 
exactly what your requirements are and why you need them.

If your English language skills are a barrier, then send me a copy of your 
request in Spanish.  I live in an Hispanic neighborhood, and will try to find 
someone to translate your email request.  No guarantees, but I am surrounded by 
Spanish speakers.  I should be able to find someone to translate.

Charles Elliott

___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Mike,

CentOS is very conservative with versions. CentOS has the same backporting
practice that RHEL (https://access.redhat.com/security/updates/backporting)
and ntp, f.e., is patched in CentOS when a security problem occurs, but the
core it's not updated.

I have to learn how to install the RPM versions from the NTP page. I started
with Linux very recently and still have many doubts.

Thanks for your help,
Regards.

Raúl.



On 21 March 2017 at 07:18, Mike Cook  wrote:

> Looking a bit further it seems that mrulist was introduced in 4.2.7,
> however you should install the LATEST version compatible with your OS as
> there is a DOS bug in the initial code.
> I had a look at the CENTOS-7 git ntp page and they do not seem to have
> versions above 2.6.5 ??? see < https://git.centos.org/git/rpms > . That
> seem strange to me so I may be on the wrong page.
> You could try checking which RPM is available and in the event that a
> later version is not available I should look at getting the main source
> from ntp.org and testing that.
>
>
> > Le 21 mars 2017 à 00:17, Raúl  a écrit :
> >
> > Hi Mike,
> >
> > I'm using the ntpd version 4.2.6p5, the default one with CentOS 7.
> >
> > I have to investigate how to update ntpd to last available version.
> >
> > Thanks for your help,
> > Regards.
> >
> > Raúl.
> >
> > On 20 March 2017 at 23:12, Mike Cook  wrote:
> > Hi Raul,
> >If the mrulist command is unknown, you must be running a back level
> ntp though I don’t know which version first introduced the command. You can
> run ntpd --version to see what you have. There are good reasons, esp
> security, that you use a recent version.
> >
> > Mike
> >
> > > Le 20 mars 2017 à 20:10, Raúl  a écrit :
> > >
> > > Hello Mike,
> > >
> > > Thanks for your answer.
> > >
> > > This is my first time using a mailing list (my first question was done
> via Google Groups) and I I hope to be doing it the right way.
> > >
> > > My fault, maybe "petitions" was not the right word, "request" is the
> right one. My english level is not good and in Spanish, you can use
> "petitions" with no problem. For example, "Las peticiones recibidas por el
> servidor". Sorry for that.
> > >
> > > I'm just trying to know the load of my NTP server. The number of
> requests done by clients, not addresses or anything else, just the number
> of request in a given moment.
> > >
> > > I read in NTP documentation ntpdc it's deprecated but when i run "ntpq
> -c mrulist" I receive "***Command `mrulist' unknown".
> > >
> > > Thanks again for your help.
> > >
> > >
> > >
> > > On 8 March 2017 at 11:05, Mike Cook  wrote:
> > >
> > > > Le 8 mars 2017 à 11:53, Micron  a écrit :
> > > >
> > > > Hello.
> > > >
> > > > Recently, I've added my NTP server in the pool and I'm looking for
> the way to know the number of petitions received from clients.
> > > >
> > > > If I run "ntpdc -c iostats", the number under the label "received
> packets" are the petitions received in my server?
> > >
> > > That’s about right. Petitions isn’t the right word . requests is
> better.
> > > You get more interesting data with.
> > > ntpq -c mrulist
> > >
> > > regards
> > >
> > >
> > > >
> > > > Thanks.
> > > >
> > > >
> > > > ___
> > > > questions mailing list
> > > > questions@lists.ntp.org
> > > > http://lists.ntp.org/listinfo/questions
> > >
> > > "The power of accurate observation is commonly called cynicism by
> those who have not got it. »
> > > George Bernard Shaw
> > >
> > >
> >
> > "The power of accurate observation is commonly called cynicism by those
> who have not got it. »
> > George Bernard Shaw
> >
> >
>
> "The power of accurate observation is commonly called cynicism by those
> who have not got it. »
> George Bernard Shaw
>
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hi Mike,

I'm using the ntpd version 4.2.6p5, the default one with CentOS 7.

I have to investigate how to update ntpd to last available version.

Thanks for your help,
Regards.

Raúl.

On 20 March 2017 at 23:12, Mike Cook  wrote:

> Hi Raul,
>If the mrulist command is unknown, you must be running a back level ntp
> though I don’t know which version first introduced the command. You can run
> ntpd --version to see what you have. There are good reasons, esp security,
> that you use a recent version.
>
> Mike
>
> > Le 20 mars 2017 à 20:10, Raúl  a écrit :
> >
> > Hello Mike,
> >
> > Thanks for your answer.
> >
> > This is my first time using a mailing list (my first question was done
> via Google Groups) and I I hope to be doing it the right way.
> >
> > My fault, maybe "petitions" was not the right word, "request" is the
> right one. My english level is not good and in Spanish, you can use
> "petitions" with no problem. For example, "Las peticiones recibidas por el
> servidor". Sorry for that.
> >
> > I'm just trying to know the load of my NTP server. The number of
> requests done by clients, not addresses or anything else, just the number
> of request in a given moment.
> >
> > I read in NTP documentation ntpdc it's deprecated but when i run "ntpq
> -c mrulist" I receive "***Command `mrulist' unknown".
> >
> > Thanks again for your help.
> >
> >
> >
> > On 8 March 2017 at 11:05, Mike Cook  wrote:
> >
> > > Le 8 mars 2017 à 11:53, Micron  a écrit :
> > >
> > > Hello.
> > >
> > > Recently, I've added my NTP server in the pool and I'm looking for the
> way to know the number of petitions received from clients.
> > >
> > > If I run "ntpdc -c iostats", the number under the label "received
> packets" are the petitions received in my server?
> >
> > That’s about right. Petitions isn’t the right word . requests is better.
> > You get more interesting data with.
> > ntpq -c mrulist
> >
> > regards
> >
> >
> > >
> > > Thanks.
> > >
> > >
> > > ___
> > > questions mailing list
> > > questions@lists.ntp.org
> > > http://lists.ntp.org/listinfo/questions
> >
> > "The power of accurate observation is commonly called cynicism by those
> who have not got it. »
> > George Bernard Shaw
> >
> >
>
> "The power of accurate observation is commonly called cynicism by those
> who have not got it. »
> George Bernard Shaw
>
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Mauricio,

Bing Translator was the culprit.

Thanks.



On 20 March 2017 at 10:23, Mauricio Tavares  wrote:

> On Mon, Mar 20, 2017 at 6:10 AM, David Woolley
>  wrote:
> > On 08/03/17 10:53, Micron wrote:
> >>
> >> Recently, I've added my NTP server in the pool and I'm looking for the
> way
> >> to know the number of petitions received from clients.
> >
> >
> > Please could you indicate where petition is defined in the context of
> NTP.
> > I have never seen it used before.
> >
>   He probably meant "request", but google translate got the best of
> him.
>
> > ___
> > questions mailing list
> > questions@lists.ntp.org
> > http://lists.ntp.org/listinfo/questions
> ___
> questions mailing list
> questions@lists.ntp.org
> http://lists.ntp.org/listinfo/questions
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Elliot,

I think number 5 it's the correct one.

Thanks for your help.



On 8 March 2017 at 11:41, Charles Elliott  wrote:

> I don't understand what you mean by the word "petition."
>
> Petition:
>
> 1.  A formally drawn request, often bearing the names of a number of those
> making the request, that is addressed to a person or group of persons in
> authority or power, soliciting some favor, right, mercy, or other benefit:
> a
> petition for clemency; a petition for the repeal of an unfair law.
>
> 2.  A request made for something desired, especially a respectful or humble
> request, as to a superior or to one of those in authority; a supplication
> or
> prayer: a petition for aid; a petition to God for courage and strength.
>
> 3.  Something that is sought by request or entreaty: to receive one's full
> petition.
>
> 4.  Law: an application for a court order or for some other judicial
> action.
> -v.t
> 5.  To beg for or request (something).
>
> 6.  To address a formal petition to (a sovereign, a legislative body,
> etc.):
> He received everything for which he had petitioned the king.
>
> 7.  To ask by petition for (something).
> -v.i
> 8.  To present a petition.
>
> 9.  To address our present a formal petition.
>
> 10.  To request or solicit, as by a petition: to petition for redress of
> grievances.
>
>
> That being said, according to the comments in the NTPD code listing, the
> ability to monitor and record incoming requests for time has been disabled
> in production servers because of the time it takes.
>
> Ntpdc has been deprecated and is no longer supported.
>
> Brian Inglis, Calgary, Alberta, Canada, recently wrote this to this NTP
> questions mail list:
>
> You can tweak the monitor stats collection with the mru conf statement:
>
> mru [maxdepth count | maxmem kilobytes | mindepth count | maxage seconds
> | initalloc count | initmem kilobytes | incalloc count
> | incmem kilobytes]
>
> https://www.eecis.udel.edu/~mills/ntp/html/miscopt.html#mru
>
> e.g. you may want to increase maxage to e.g. 86400s from default 64s and
> reduce mindepth to your max peak addresses count from default 600, so when
> you hit your peak addresses count, anything older than a day is evicted and
> replaced by a newer entry.
>
> I'd use awk for simple filtering of values like this e.g.
>
> $ ntpq -c mrulist 2> /dev/null | awk '$8 == "123" && $1 <= 86400'
>
> which you can easily expand on to do stats, or pass to a plot package.
>
> Good luck,
>
> Charles Elliott
>
> -Original Message-
> From: questions
> [mailto:questions-bounces+elliott.ch=comcast@lists.ntp.org] On Behalf
> Of
> Micron
> Sent: Wednesday, March 8, 2017 5:53 AM
> To: questions@lists.ntp.org
> Subject: [ntp:questions] NTP server - Number of received petitions.
>
> Hello.
>
> Recently, I've added my NTP server in the pool and I'm looking for the way
> to know the number of petitions received from clients.
>
> If I run "ntpdc -c iostats", the number under the label "received packets"
> are the petitions received in my server?
>
> Thanks.
>
>
> ___
> questions mailing list
> questions@lists.ntp.org
> http://lists.ntp.org/listinfo/questions
>
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions


Re: [ntp:questions] NTP server - Number of received petitions.

2017-03-21 Thread Raúl
Hello Mike,

Thanks for your answer.

This is my first time using a mailing list (my first question was done via
Google Groups) and I I hope to be doing it the right way.

My fault, maybe "*petitions*" was not the right word, "*request*" is the
right one. My english level is not good and in Spanish, you can use "
*petitions*" with no problem. For example, "*Las peticiones recibidas por
el servidor*". Sorry for that.

I'm just trying to know the load of my NTP server. The number of requests
done by clients, not addresses or anything else, just the number of request
in a given moment.

I read in NTP documentation ntpdc it's deprecated but when i run "*ntpq -c
mrulist*" I receive "

Command `mrulist' unknown".*
Thanks again for your help.



On 8 March 2017 at 11:05, Mike Cook  wrote:

>
> > Le 8 mars 2017 à 11:53, Micron  a écrit :
> >
> > Hello.
> >
> > Recently, I've added my NTP server in the pool and I'm looking for the
> way to know the number of petitions received from clients.
> >
> > If I run "ntpdc -c iostats", the number under the label "received
> packets" are the petitions received in my server?
>
> That’s about right. Petitions isn’t the right word . requests is better.
> You get more interesting data with.
> ntpq -c mrulist
>
> regards
>
>
> >
> > Thanks.
> >
> >
> > ___
> > questions mailing list
> > questions@lists.ntp.org
> > http://lists.ntp.org/listinfo/questions
>
> "The power of accurate observation is commonly called cynicism by those
> who have not got it. »
> George Bernard Shaw
>
>
___
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions