[Git][NTPsec/ntpsec][master] 2 commits: mru now prints memory usage
Hal Murray
gitlab at mg.gitlab.com
Fri Dec 23 07:35:45 UTC 2016
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
192bd349 by Hal Murray at 2016-12-22T23:28:52-08:00
mru now prints memory usage
- - - - -
a7845e3f by Hal Murray at 2016-12-22T23:28:52-08:00
Remove tos beacon, leftover from multicast
- - - - -
7 changed files:
- docs/miscopt.txt
- include/ntp.h
- ntpclients/ntpq
- ntpd/keyword-gen.c
- ntpd/ntp_config.c
- ntpd/ntp_parser.y
- ntpd/ntp_proto.c
Changes:
=====================================
docs/miscopt.txt
=====================================
--- a/docs/miscopt.txt
+++ b/docs/miscopt.txt
@@ -23,7 +23,7 @@ include::includes/misc-options.txt[]
// If you change this, be very sure to keep that synchronized.
[[tos]]
-+tos+ [+beacon+ 'beacon' | +ceiling+ 'ceiling' | +cohort+ {+0+ | +1+} | +floor+ 'floor' | +maxclock+ 'maxclock' | +maxdist+ 'maxdist' | +minclock+ 'minclock' | +mindist+ 'mindist' | +minsane+ 'minsane' | +orphan+ 'stratum' | +orphanwait+ 'delay']::
++tos+ [+ceiling+ 'ceiling' | +cohort+ {+0+ | +1+} | +floor+ 'floor' | +maxclock+ 'maxclock' | +maxdist+ 'maxdist' | +minclock+ 'minclock' | +mindist+ 'mindist' | +minsane+ 'minsane' | +orphan+ 'stratum' | +orphanwait+ 'delay']::
This command alters certain system variables used by the clock
selection and clustering algorithms. The default values of these
variables have been carefully optimized for a wide range of network
@@ -32,12 +32,6 @@ include::includes/misc-options.txt[]
knobs. It can be used to select the quality and quantity of peers used
to synchronize the system clock and is most useful in dynamic server
discovery schemes. The options are as follows:
- +beacon+ 'beacon';;
- The manycast server sends packets at intervals of 64 s if less than
- _maxclock_ servers are available. Otherwise, it sends packets at the
- _beacon_ interval in seconds. The default is 3600 s. See the
- link:discover.html[Automatic Server Discovery] page for further
- details.
+ceiling+ 'ceiling';;
Specify the maximum stratum (exclusive) for acceptable server
packets. The default is 16. See the link:discover.html[Automatic
=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -126,7 +126,6 @@ typedef unsigned int u_int;
#define HUFFPUFF 900 /* huff-n'-puff sample interval (s) */
#define MAXHOP 2 /* anti-clockhop threshold */
#define MAX_TTL 8 /* max ttl mapping vector size */
-#define BEACON 7200 /* manycast beacon interval */
#define NTP_MAXEXTEN 2048 /* max extension field size */
#define NTP_ORPHWAIT 300 /* orphan wair (s) */
@@ -637,7 +636,7 @@ struct pkt {
#define PROTO_MAXDIST 22
#define PROTO_MAXDISP 23
#define PROTO_MAXHOP 24
-#define PROTO_BEACON 25
+/* #define PROTO_BEACON 25 */
#define PROTO_ORPHAN 26
#define PROTO_ORPHWAIT 27
/* #define PROTO_MODE7 28 was ntpdc */
=====================================
ntpclients/ntpq
=====================================
--- a/ntpclients/ntpq
+++ b/ntpclients/ntpq
@@ -11,7 +11,7 @@
# SPDX-License-Identifier: BSD-2-clause
from __future__ import print_function, division
-import os, sys, getopt, cmd, re, time
+import os, sys, getopt, cmd, re, resource, time
import socket, hashlib
try:
@@ -1240,6 +1240,9 @@ usage: config_from_file <configuration filename>
delta2 = time.time() - self.session.start
self.say("# Processed %d slots in %.3f seconds\n" \
% (self.session.slots, delta2) )
+ usage = resource.getrusage(resource.RUSAGE_SELF)
+ self.say("# Used %d megabytes of memory\n" % \
+ (usage.ru_maxrss/1000) )
except ntp.packet.ControlException as e:
# Giving up after 8 restarts from the beginning.
# With high-traffic NTP servers, this can occur if the
=====================================
ntpd/keyword-gen.c
=====================================
--- a/ntpd/keyword-gen.c
+++ b/ntpd/keyword-gen.c
@@ -132,7 +132,6 @@ struct key_tok ntp_keywords[] = {
{ "mindist", T_Mindist, FOLLBY_TOKEN },
{ "maxdisp", T_Maxdisp, FOLLBY_TOKEN },
{ "maxdist", T_Maxdist, FOLLBY_TOKEN },
-{ "beacon", T_Beacon, FOLLBY_TOKEN },
{ "orphan", T_Orphan, FOLLBY_TOKEN },
{ "orphanwait", T_Orphanwait, FOLLBY_TOKEN },
{ "nonvolatile", T_Nonvolatile, FOLLBY_TOKEN },
=====================================
ntpd/ntp_config.c
=====================================
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -1298,9 +1298,6 @@ config_tos(
item = PROTO_MINSANE;
break;
- case T_Beacon:
- item = PROTO_BEACON;
- break;
}
proto_config(item, 0, val);
}
=====================================
ntpd/ntp_parser.y
=====================================
--- a/ntpd/ntp_parser.y
+++ b/ntpd/ntp_parser.y
@@ -58,7 +58,6 @@
%token <Integer> T_Auth
%token <Integer> T_Average
%token <Integer> T_Baud
-%token <Integer> T_Beacon
%token <Integer> T_Broadcast
%token <Integer> T_Burst
%token <Integer> T_Calibrate
@@ -620,7 +619,6 @@ tos_option_int_keyword
| T_Orphan
| T_Orphanwait
| T_Minsane
- | T_Beacon
;
tos_option_dbl_keyword
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -100,7 +100,6 @@ int sys_maxclock = NTP_MAXCLOCK; /* maximum candidates */
int sys_cohort = 0; /* cohort switch */
int sys_orphan = STRATUM_UNSPEC + 1; /* orphan stratum */
int sys_orphwait = NTP_ORPHWAIT; /* orphan wait */
-int sys_beacon = BEACON; /* manycast beacon interval */
int sys_ttlmax; /* max ttl mapping vector index */
uint8_t sys_ttl[MAX_TTL]; /* ttl mapping vector */
@@ -2818,9 +2817,6 @@ proto_config(
/*
* tos command - arguments are double, sometimes cast to int
*/
- case PROTO_BEACON: /* manycast beacon (beacon) */
- sys_beacon = (int)dvalue;
- break;
case PROTO_CEILING: /* stratum ceiling (ceiling) */
sys_ceiling = (int)dvalue;
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/0460b6a39815eb4dc05b297142e1996f27949966...a7845e3fb5210b3f32fe8df093447b789230f997
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161223/10386195/attachment.html>
More information about the vc
mailing list