summaryrefslogtreecommitdiff
path: root/ntpshmmon.c
Commit message (Collapse)AuthorAgeFilesLines
* SPDXify the licerse references.Eric S. Raymond2018-03-081-1/+1
|
* Whitespace cleanups related to recent changes.Fred Wright2017-02-201-4/+7
|
* Explicit marking of ignoring fprintf() resultRobert Norris2017-02-201-7/+7
| | | | | | | | | Ensure consistent marking of '(void)' for most normal usage of fprintf() TESTED: 'scons build-all check' passes Signed-off-by: Fred Wright <fw@fwright.net>
* sys/ipc.h needs _XOPEN_SOURCEGary E. Miller2016-08-151-0/+4
|
* usleep() is removed from POSIX-2008. Replace with nanosleep()Gary E. Miller2016-08-151-2/+7
| | | | I sure hope I did not drop a zero anywhere...
* Add missing include.Gary E. Miller2016-08-091-0/+1
| | | | | | ntpshmmon.c:34:5: warning: implicit declaration of function 'memset' ntpshmmon.c:34:5: warning: incompatible implicit declaration of built-in function 'memset'
* Try to prevent ntpshmmon from writing a short record on interrupt.Eric S. Raymond2016-07-161-0/+7
|
* Minor fix to ntpshmmon data header.Eric S. Raymond2016-07-131-1/+1
|
* Restore the original output format of ntpshmmon.Eric S. Raymond2016-07-131-2/+2
| | | | | | | | | | | | | | | Changing the output format without bumping the version number was wrong. Changing the output format without fixing the documentation and examples (in INSTALL and elsewhere) was wrong. Removing the 'sample' keyword at the beginning of the line was wrong. It broke contrib/ntpshmviz. More generally, it broke the property that the format was self-describing and extensible. Removing the comment leader on the second line was wrong. That meant parsers for the format, such as the one in contrib/ntpshmviz, would try to interpret the header as data and throw errors.
* Fix formatting of ntpshmmon to match recent output change.Gary E. Miller2016-06-171-1/+1
|
* Make ntpshmmon take less CPUGary E. Miller2016-06-171-3/+9
| | | | No point polling the system clock when the result is not used.
* Only read the system clock for tvc is we are going to use it.Gary E. Miller2016-06-161-0/+2
| | | | Stop reading time that is just going to be thrown away.
* Expand the -h option in ntpshmmon.Gary E. Miller2016-06-151-2/+11
| | | | | Many thanks to Nuno Gonçalves <nunojpg@gmail.com> for clarifying the problems in ntpshmmon.
* Fix double counting in ntpshmmonGary E. Miller2016-06-151-22/+38
| | | | | | ntpshmmon no longer prints duplicates ntpshmmon can now work with 5Hz PPS removed no longer needed -c (cycle time) option
* Add include for safe_atof().Gary E. Miller2016-04-051-0/+1
|
* Cleanup: atof() -> safe_atof()Gary E. Miller2016-04-051-1/+1
|
* Remove duplicate definition of timespec_diff_ns()Gary E. Miller2015-06-041-5/+1
| | | | | Plus a logical reordering of things so more timespec stuff is in timespec.h
* Fix overflow issue on 32 bit binaries.Gary E. Miller2015-06-031-1/+1
| | | | | | | | | Timespec is a 62 bit number, it does not fit in the 32 bits of a long. Use 'long long' instead. 'long long' is always at least 64 bits long and is the same as a native int when compiled as 64 bit. Note that many 64 bit OS still run 32 bit binaries, and many small devices like RasPi's are 32 bit.
* ntpshmmon overflowed diff time on 32 bit hosts.Gary E. Miller2015-06-031-5/+11
| | | | Timespec is a 62 bit quantity that does not fit in a 32 bit long.
* Print ntpshmmon banner as comment to follow specMiroslav Lichvar2015-05-071-1/+1
| | | | Signed-off-by: Gary E. Miller <gem@rellim.com>
* More trailing whitespace fixups.Gary E. Miller2015-04-301-2/+2
|
* Line up the column headings betterGary E. Miller2015-04-011-1/+1
|
* Document ntpshmmon structure and add heading to outputGary E. Miller2015-04-011-0/+1
| | | | All the clocks look alike...
* Retire splint from our set of static analyzers.Eric S. Raymond2015-03-301-10/+0
| | | | | | | | | | | | | | | | | | | The proximate cause was that we've been seing emission of error messages that were randomly and disturbingly variable across different environments - notably Raspbian and Gentoo splint gave nontrivially different results than Ubuntu 14.10 splint. And this was *not* due to Ubuntu patches! A pristine splint built from the 3.1.2 tarball on Ubuntu didn't match the Raspbian and Gentoo results either. But this has been coming for a while. Easy access to more modern static analyzers such as coverity, scan-build and cppcheck has been decreasing the utility of splint, which is unmaintained and somewhat buggy and not easy to use. Only file not cleaned is ppsthread.c, because Gary has been working on it during this cleanup. All regression tests pass. PPS observed live on GR601-W.
* splint cleanup. Fixes for minor but real issues...Eric S. Raymond2015-03-281-1/+1
| | | | | ...no attempt to address the weird cross-platfprm variability we've seen lately. All regression tests pass.
* Rate-limit ntpshmmon properly, and make the limit settable.Eric S. Raymond2015-03-171-3/+12
|
* Appeasement cast for 32-bit maxhines.Eric S. Raymond2015-03-141-3/+3
|
* Fix minor bug in ntpshmmon uncovered by Coverity.Eric S. Raymond2015-03-131-19/+13
|
* Begin factoring out ntplib.Eric S. Raymond2015-03-071-4/+4
| | | | | | | All knowledge of the ntpd SHM format is now confined to the three files ntpshm.h, ntpshmread.c, and ntpshmwrite.c. No logic changes. All regression tests pass. PPS works on GR-601W.
* Tell ntpshhmon to merely snoop SHM updates, not consume them.Eric S. Raymond2015-03-031-1/+1
|
* splint cleanup. All regression tests pass.Eric S. Raymond2015-03-021-4/+4
|
* Added -n and -t termination options to ntpshmmon.Eric S. Raymond2015-03-021-7/+18
|
* Generqte -V messages in a uniform way.Eric S. Raymond2015-03-021-2/+2
| | | | All regression tests pass.
* Add -V option to ntpshmmon.Eric S. Raymond2015-03-021-2/+8
|
* ntpshm.c -> ntpshmwrite.c; ntpmon -> ntpshmmon.Eric S. Raymond2015-02-271-0/+127
All regression tests pass.