[chrony-dev] [PATCH] OS X - contrib - chronylogrotate.sh - Update script
1. Remove obsolete options when running chronyc 2. Add copyright/licence notice 3. Use logger utility to print/store error messages --- contrib/bryan_christianson_1/chronylogrotate.sh | 39 - 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/contrib/bryan_christianson_1/chronylogrotate.sh b/contrib/bryan_christianson_1/chronylogrotate.sh index 632aba3..f919544 100755 --- a/contrib/bryan_christianson_1/chronylogrotate.sh +++ b/contrib/bryan_christianson_1/chronylogrotate.sh @@ -1,20 +1,27 @@ #!/bin/sh -# chronylogrotate.sh -# ChronyControl -# -# Created by Bryan Christianson on 12/07/15. +# chronyd/chronyc - Programs for keeping computer clocks accurate. # +# ** +# * Copyright (C) Bryan Christianson 2015 +# * +# * This program is free software; you can redistribute it and/or modify +# * it under the terms of version 2 of the GNU General Public License as +# * published by the Free Software Foundation. +# * +# * This program is distributed in the hope that it will be useful, but +# * WITHOUT ANY WARRANTY; without even the implied warranty of +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# * General Public License for more details. +# * +# * You should have received a copy of the GNU General Public License along +# * with this program; if not, write to the Free Software Foundation, Inc., +# * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# * +# ** LOGDIR=/var/log/chrony -if [ ! -e "$LOGDIR" ]; then - echo "missing directory: $LOGDIR" - exit 1 -fi - -cd $LOGDIR - rotate () { prefix=$1 @@ -33,13 +40,19 @@ rotate () { fi } +if [ ! -e "$LOGDIR" ]; then + logger -s "missing directory: $LOGDIR" + exit 1 +fi + +cd $LOGDIR + rotate measurements rotate statistics rotate tracking # # signal chronyd via chronyc - -/usr/local/bin/chronyc -a -f /etc/chrony.d/chrony.conf cyclelogs > /dev/null +/usr/local/bin/chronyc cyclelogs > /dev/null exit $? \ No newline at end of file -- 2.4.9 (Apple Git-60) -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
Re: [chrony-dev] [PATCH] OS X - contrib - chronylogrotate.sh - Update script
On Mon, Nov 30, 2015 at 10:13:03AM +1300, Bryan Christianson wrote: > 1. Remove obsolete options when running chronyc > 2. Add copyright/licence notice > 3. Use logger utility to print/store error messages Applied. Thanks. -- Miroslav Lichvar -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.
[chrony-dev] [GIT] chrony/chrony.git branch, master, updated. 2.2-29-g024842a
This is an automated email from git. It was enerated because a ref change was pushed to the repository "chrony/chrony.git". The branch, master has been updated via 024842a38b9cff743de8101429f1c8e693070730 (commit) via 657929f8ec8fe7483c8e857d2aa3ba80ce8c4410 (commit) via b506594c2d964ae462be6688f82b103195837821 (commit) via 830135edea4c59c5b0a2f352bfd3309a1ca90893 (commit) via 464cdbbb6e242c0daf2cdf3870439f035af4c00d (commit) via 086e886d1e074e4a372d287f6508fa0a8c861c35 (commit) via f2b82c1e1d67ce3edec1b4da005c1ab46f27633e (commit) via 801830df57ac866a69c0393dc58ae418788a2df9 (commit) via 8b235297a596f3ddd6050994c845e2d7e22e72b2 (commit) via 59a3140621e723d631aaf99230db3f7c52b41192 (commit) via 16bd56ae7e59651583f3d0e495f8eeb60462f7b2 (commit) from 750d82f1d10c838ce889d19921d7cb1cd0bb417a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 024842a38b9cff743de8101429f1c8e693070730 Author: Bryan ChristiansonList-Post: chrony-dev@chrony.tuxfamily.org Date: Mon Nov 30 10:13:03 2015 +1300 contrib: update chronylogrotate.sh script 1. Remove obsolete options when running chronyc 2. Add copyright/licence notice 3. Use logger utility to print/store error messages commit 657929f8ec8fe7483c8e857d2aa3ba80ce8c4410 Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Fri Nov 27 15:25:24 2015 +0100 cmdmon: update CLIENT_ACCESSES_BY_INDEX command Add new fields from clientlog to the report and print them in chronyc. Rework the code to skip empty records in the hash table. The reply no longer has variable length, all client fields are filled even if some are empty. Reply with RPY_NULL when the facility is disabled. commit b506594c2d964ae462be6688f82b103195837821 Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Wed Nov 25 13:23:52 2015 +0100 clientlog: limit response rate When the measured NTP or command request rate of a client exceeds a threshold, reply only to a small fraction of the requests to reduce the network traffic. Clients are allowed to send a burst of requests. Try to detect broken clients which increase the request rate when not getting replies and suppress the rate limiting for them. Add ratelimit and cmdratelimit directives to configure the thresholds, bursts and leak rates independently for NTP and command response rate limiting. Both are disabled by default. Commands from localhost are never limited. commit 830135edea4c59c5b0a2f352bfd3309a1ca90893 Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Wed Nov 25 09:57:12 2015 +0100 clientlog: measure request rates Extend the record with estimates of the current client's NTP and command request rates. Store them as 8-bit scaled log2 values to save memory. commit 464cdbbb6e242c0daf2cdf3870439f035af4c00d Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Tue Nov 24 14:51:15 2015 +0100 clientlog: store records in hash table instead of tree This simplifies the code and allows older records to be reused when no more memory can be allocated for new addresses. Each slot of the hash table has 16 records and there is no chaining between different slots. Reused records may be newer than records in other slots, but the search time remains constant. commit 086e886d1e074e4a372d287f6508fa0a8c861c35 Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Mon Nov 23 15:53:45 2015 +0100 clientlog: reduce amount of logged information Don't log NTP peer access and auth/bad command access. Also, change types for logging number of hits from long to uint32_t. This reduces the size of the node and allows more clients to be monitored in the same amount of memory. commit f2b82c1e1d67ce3edec1b4da005c1ab46f27633e Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Tue Nov 24 12:30:54 2015 +0100 conf: don't allow disabling clientloglimit Don't treat zero as a special value disabling clientloglimit. It's not useful, the amount of available memory is never unlimited. commit 801830df57ac866a69c0393dc58ae418788a2df9 Author: Miroslav Lichvar List-Post: chrony-dev@chrony.tuxfamily.org Date: Fri Nov 27 11:03:16 2015 +0100 util: add macros for maximum, minimum and clamp If MAX/MIN are defined in system headers, undefine them first. commit 8b235297a596f3ddd6050994c845e2d7e22e72b2 Author: Miroslav Lichvar