static int do_log_rtc = 0;
static int do_log_refclocks = 0;
static int do_log_tempcomp = 0;
-static int do_dump_on_exit = 0;
static int log_banner = 32;
static char *logdir;
static char *dumpdir;
} else if (!strcasecmp(command, "dumpdir")) {
parse_string(p, &dumpdir);
} else if (!strcasecmp(command, "dumponexit")) {
- do_dump_on_exit = parse_null(p);
+ /* Silently ignored */
} else if (!strcasecmp(command, "fallbackdrift")) {
parse_fallbackdrift(p);
} else if (!strcasecmp(command, "hwclockfile")) {
/* ================================================== */
-int
-CNF_GetDumpOnExit(void)
-{
- return do_dump_on_exit;
-}
-
-/* ================================================== */
-
double
CNF_GetMaxUpdateSkew(void)
{
extern int CNF_GetLogTempComp(void);
extern char *CNF_GetKeysFile(void);
extern char *CNF_GetRtcFile(void);
-extern int CNF_GetDumpOnExit(void);
extern int CNF_GetManualEnabled(void);
extern int CNF_GetCommandPort(void);
extern int CNF_GetRtcOnUtc(void);
+
For such systems, it is possible to save the measurement history across
restarts of *chronyd* (assuming no changes are made to the system clock
-behaviour whilst it is not running). If this capability is to be used (via the
-*dumponexit* directive in the configuration file, or the
-<<chronyc.adoc#dump,*dump*>> command in *chronyc*), the *dumpdir* directive
-should be used to define the directory where the measurement histories are
-saved.
+behaviour whilst it is not running). The *dumpdir* directive defines the
+directory where the measurement histories are saved when *chronyd* exits,
+or the <<chronyc.adoc#dump,*dump*>> command in *chronyc* is issued.
+
An example of the directive is:
+
in the file _@CHRONYRUNDIR@/1.2.3.4.dat_. History of reference clocks is saved
to files named by their reference ID in form of _refid:XXXXXXXX.dat_.
-[[dumponexit]]*dumponexit*::
-If this directive is present, it indicates that *chronyd* should save the
-measurement history for each of its time sources recorded whenever the program
-exits. (See the <<dumpdir,*dumpdir*>> directive above.)
-
[[maxsamples]]*maxsamples* _samples_::
The *maxsamples* directive sets the default maximum number of samples that
*chronyd* should keep for each source. This setting can be overridden for
RTC gains or loses time relative to true time.
When the computer is powered down, the measurement histories for all the NTP
-servers are saved to files (if the <<dumponexit,*dumponexit*>> directive is
-specified in the configuration file), and the RTC tracking information is also
+servers are saved to files, and the RTC tracking information is also
saved to a file (if the <<rtcfile,*rtcfile*>> directive has been specified).
These pieces of information are also saved if the <<chronyc.adoc#dump,*dump*>>
and <<chronyc.adoc#writertc,*writertc*>> commands respectively are issued
driftfile @CHRONYVARDIR@/drift
makestep 1.0 3
maxupdateskew 100.0
-dumponexit
dumpdir @CHRONYVARDIR@
rtcfile @CHRONYVARDIR@/rtc
----
leapsectz right/UTC
driftfile @CHRONYVARDIR@/drift
dumpdir @CHRONYRUNDIR@
-dumponexit
----
== SEE ALSO
[[dump]]*dump*::
The *dump* command causes *chronyd* to write its current history of
-measurements for each of its sources to dump files, either for inspection or to
-support the *-r* option when *chronyd* is restarted.
-+
-The *dump* command is somewhat equivalent to the
-<<chrony.conf.adoc#dumponexit,*dumponexit*>> directive in the configuration
-file.
-+
-To use the *dump* command, you might want to configure the name of the
-directory into which the dump files will be written. This can only be
-done in the configuration file with the <<chrony.conf.adoc#dumpdir,*dumpdir*>>
-directive.
+measurements for each of its sources to dump files in the directory specified
+in the configuration file by the <<chrony.conf.adoc#dumpdir,*dumpdir*>>
+directive. Note that *chronyd* does this automatically when it exits. This
+command is mainly useful for inspection of the history whilst *chronyd* is
+running.
[[rekey]]*rekey*::
The *rekey* command causes *chronyd* to re-read the key file specified in the
{
if (!initialised) exit(exit_status);
- if (CNF_GetDumpOnExit()) {
+ if (CNF_GetDumpDir()[0] != '\0') {
SRC_DumpSources();
}