summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-23Removing CVS/SVN tags and replacing with git-based versioningThomas Guyot-Sionnest1-6/+2
For contrib/, full tags have been imported from subversion git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Bulk EOL cleanupThomas Guyot-Sionnest1-5/+5
$ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19Fixed buffer overflow in check_ntp/check_ntp_peer (#1999319, Ubuntu #291265)Thomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2086 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07Added support for --extra-opts in all C plugins (disabled by default, see ↵Thomas Guyot-Sionnest1-0/+9
configure --help) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-29Use UT_THRESHOLDS_NOTES in all pluginsThomas Guyot-Sionnest1-3/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1986 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27--help output cleanup (plus removal of spaces on blank lines)Thomas Guyot-Sionnest1-1/+0
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-05check_ntp and check_ntp_peer now show proper jitter/stratum thresholds ↵Thomas Guyot-Sionnest1-2/+2
longopts in --help git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1977 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30Bump plugins/ to GPLv3 (check_apt to check_nwstat)Thomas Guyot-Sionnest1-25/+22
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-29Fix bugs and flaws in best offset server selection of check_ntp_time and ↵Thomas Guyot-Sionnest1-33/+35
(deprecated) check_ntp git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1909 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-05Fix Bug #1862300: check_ntp_time segfault in 1.4.11 (Also apply to check_ntp)Thomas Guyot-Sionnest1-7/+14
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1887 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11Adding missing function calls needed for i18n (only for plugins already in ↵Thomas Guyot-Sionnest1-0/+4
POTFILES.in) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1861 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10OOPS! Last commit should have included these files.Thomas Guyot-Sionnest1-5/+5
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1858 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-04missing word in comment block.Thomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1838 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-23- Use max_state_alt in check_ntp to fix some issues with the latest commits.Thomas Guyot-Sionnest1-53/+10
- Roll back the stratum check as there were issues with it and a better one is already implemented in check_ntp_peer (about to be included) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1830 f882894a-f735-0410-b71e-b25c423dba1c
2007-11-10Fix newly added stratum check (has to be decreased by one when using normal ↵Thomas Guyot-Sionnest1-1/+3
NTP packets versus control packets) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1822 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-25check_ntp now return UNKNOWN instead of WARNING if jitter isThomas Guyot-Sionnest1-6/+25
unavailable. If no offset threshold is specified and the offset is unavailable, will return UNKNOWN as well. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1811 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-11Add stratum thresholds support for check_ntp (feature request #1703823)Thomas Guyot-Sionnest1-15/+56
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1806 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-11Use provided threshold functions (no functionnal change apart the check for ↵Thomas Guyot-Sionnest1-38/+26
overlaping thresholds) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1805 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-26Patch #1798774: check_ntp: honor ntp flagsThomas Guyot-Sionnest1-0/+9
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1799 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-14check_ntp: Fixed typo in typo in argument sanity check. Thanks to Aurelien ↵Matthias Eble1-1/+1
Bompard (#1753506) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1756 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-10- Fix possibility of printing scientific numbers in perfdataThomas Guyot-Sionnest1-12/+36
- Use fperfdata function for perfdata formatting - Make the printing part a bit more flexible (similar to check_disk) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1678 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-04Fix for getting dispersion instead of jitter on older servers (like xntpd on ↵Thomas Guyot-Sionnest1-2/+13
Solaris). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1676 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-03Fix the synchronization source selection on big-endian systems.Holger Weiss1-2/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1675 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-03Temporary fix for jitter calculationThomas Guyot-Sionnest1-1/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1674 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Don't rely on the assumption that the size of a READSTAT response is aHolger Weiss1-5/+6
multiple of sizeof(ntp_assoc_status_pair). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1673 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Fix byte order in verbose loggingThomas Guyot-Sionnest1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1671 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-02Seems like we don't get any jitter sometimes. While this needs to be fixed ↵Thomas Guyot-Sionnest1-1/+2
we should at least handle it gracefully. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1670 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Fix an out-of-bounds memcpy(3) and add a realloc(3) error check inHolger Weiss1-2/+5
jitter_request(). git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1666 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Add a warning to the verbose output if jitter_request() found noHolger Weiss1-1/+4
synchronization source. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1665 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Avoid division by zero.Holger Weiss1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1664 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-31Remove the '-O' option, as it's ignored.Holger Weiss1-7/+2
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1663 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-29Adding help text for jitter flagsTon Voon1-0/+4
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1651 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28Don't try to print `optarg' (which will be a NULL pointer) if an unknownHolger Weiss1-1/+1
command line option was used, as this leads to a segfault on some systems. The unknown option will be printed by getopt(3) anyway. So, simply call print_usage() and exit UNKNOWN via the new usage5() instead. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-20compilation fixes for check_ntp.c:M. Sean Finney1-3/+3
- check_ntp.c:290: warning: overflow in implicit constant conversion fixed with an explicit cast to int8_t. - check_ntp.c:544: warning: pointer of type ‘void *’ used in arithmetic fixed by casting to ptrdiff_t before arithmetic and (void*) afterwards - in TVtoNTP64, cast arithmetic result passed to R32 as uint64_t. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1571 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19first pass at cleaning localization for new releaseBenoit Mortier1-18/+33
first pass at making all the headre be the same licence, plugin, etc... git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-12Removed extraneous comma in perf data outputTon Voon1-1/+1
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1492 f882894a-f735-0410-b71e-b25c423dba1c
2006-08-11Catch no responses from any server (1538341 - nmdias)Ton Voon1-1/+6
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1467 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-17cleaning up help and usageBenoit Mortier1-6/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1433 f882894a-f735-0410-b71e-b25c423dba1c
2006-05-01- check_ntp:M. Sean Finney1-76/+144
- now roughly feature-complete. - various bugfixes, esp. offset calculation. - enhanced the asynchronous offset polling to set requests that haven't recieved a response in >= 1 second to stale and retransmit them, which results in much better performance on unreliable networks. - we only spend timeout/2 seconds polling offsets, and if we don't get everything by that point we work with what we have and set status to warning/critical depending on how much data we have. - set the same defaults as the perl script. - commit changes to configure.in to support automatic building of check_apt (if apt-get is installed and regex libraries available) and check_ntp (unconditionally), now defaulting to check_ntp.c instead of the perl script. if this is an issue we can back out the commit of course. an eye should be kept on check_ntp building and running correctly in different environments, esp. 64-bit and big-endian platforms, and those with more "esoteric" API's (do any of the platforms not have poll()?). - similar changes to Makefile.am's. - common.h: add statement to include sys/poll.h - runcmd.c: exit STATE_UNKNOWN if execve() fails. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1386 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-12the offset_requests are now parallelized. still stuff needs to beM. Sean Finney1-62/+105
done (conveniently marked with XXX), but on well behaving networks the plugin should behave more or less identical to check_ntp.pl now. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1373 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-12added a currently unused but "good for reference" version of offset_requestM. Sean Finney1-0/+76
which attempts to behave more like ntpdate, but this doesn't yet and the code isn't actually used yet. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1372 f882894a-f735-0410-b71e-b25c423dba1c
2006-04-11another big code-commit to check_ntp. jitter calculations now work, andM. Sean Finney1-22/+247
the program is becoming much closer on the packet-for-packet level to how check_ntp.pl behaves. i'll send an email in the morning :) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1371 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-20- shuffling some code around to keep things tidy.M. Sean Finney1-19/+32
- now average the result of 4 queries just as ntpdate does - put things in place for jitter calculation git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1332 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-20ipv6 support for c-version of check_ntpM. Sean Finney1-2/+12
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1331 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-18initial version of the pure-c check_ntp implementation. jitter not yetM. Sean Finney1-0/+355
implemented, and a couple other misc things to do, so i haven't yet patched Makefile.am git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1330 f882894a-f735-0410-b71e-b25c423dba1c