diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-06-25 10:32:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-25 10:32:05 -0400 |
| commit | 49b549d50a5b28685ef9c8c351496140193d632a (patch) | |
| tree | 724247d00d9bbdcf938b0fe2e9d596f836513701 /lib/command.c | |
| parent | b4835c13b0aff66ee1891f8250519540e7f0f5c3 (diff) | |
| parent | 5c076fe7e71f67cdc81bd72433117ca461102d58 (diff) | |
Merge pull request #8463 from opensourcerouting/build-assorted-20210413
build system housekeeping
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index 7be54907ed..e00d84a051 100644 --- a/lib/command.c +++ b/lib/command.c @@ -434,6 +434,36 @@ static int config_write_host(struct vty *vty) } log_config_write(vty); + /* print disable always, but enable only if default is flipped + * => prep for future removal of compile-time knob + */ + if (!cputime_enabled) + vty_out(vty, "no service cputime-stats\n"); +#ifdef EXCLUDE_CPU_TIME + else + vty_out(vty, "service cputime-stats\n"); +#endif + + if (!cputime_threshold) + vty_out(vty, "no service cputime-warning\n"); +#if defined(CONSUMED_TIME_CHECK) && CONSUMED_TIME_CHECK != 5000000 + else /* again, always print non-default */ +#else + else if (cputime_threshold != 5000000) +#endif + vty_out(vty, "service cputime-warning %lu\n", + cputime_threshold); + + if (!walltime_threshold) + vty_out(vty, "no service walltime-warning\n"); +#if defined(CONSUMED_TIME_CHECK) && CONSUMED_TIME_CHECK != 5000000 + else /* again, always print non-default */ +#else + else if (walltime_threshold != 5000000) +#endif + vty_out(vty, "service walltime-warning %lu\n", + walltime_threshold); + if (host.advanced) vty_out(vty, "service advanced-vty\n"); |
