AS_HELP_STRING([--enable-gcc-ultra-verbose], [enable ultra verbose GCC warnings]))
AC_ARG_ENABLE([backtrace],
AS_HELP_STRING([--disable-backtrace], [disable crash backtraces (default autodetect)]))
-AC_ARG_ENABLE([time-check],
- AS_HELP_STRING([--disable-time-check], [disable slow thread warning messages]))
-AC_ARG_ENABLE([cpu-time],
- AS_HELP_STRING([--disable-cpu-time], [disable cpu usage data gathering]))
AC_ARG_ENABLE([pcreposix],
AS_HELP_STRING([--enable-pcreposix], [enable using PCRE Posix libs for regex functions]))
AC_ARG_ENABLE([pcre2posix],
AM_CONDITIONAL([NETLINK_DEBUG], [test "$enable_netlink_debug" != "no"])
-if test "$enable_time_check" != "no" ; then
- if test "$enable_time_check" = "yes" -o "$enable_time_check" = "" ; then
- AC_DEFINE([CONSUMED_TIME_CHECK], [5000000], [Consumed Time Check])
- else
- AC_DEFINE_UNQUOTED([CONSUMED_TIME_CHECK], [$enable_time_check], [Consumed Time Check])
- fi
-fi
-
-case "${enable_cpu_time}" in
- "no")
- AC_DEFINE([EXCLUDE_CPU_TIME], [1], [Exclude getrusage data gathering])
- ;;
- "*")
- ;;
-esac
-
if test "$enable_datacenter" = "yes" ; then
AC_DEFINE([HAVE_DATACENTER], [1], [Compile extensions for a DataCenter])
DFLT_NAME="datacenter"
if test -n "$enable_datacenter"; then
AC_MSG_WARN([The --enable-datacenter compile time option is deprecated. Please modify the init script to pass -F datacenter to the daemons instead.])
fi
-if test -n "$enable_time_check"; then
- AC_MSG_WARN([The --enable-time-check compile time option is deprecated. Please use the service cputime-stats configuration option instead.])
-fi
-if test -n "$enable_cpu_time"; then
- AC_MSG_WARN([The --enable-cpu-time compile time option is deprecated. Please use the service cputime-warning NNN configuration option instead.])
-fi
if test "$enable_doc" != "no" -a "$frr_py_mod_sphinx" = "false"; then
AC_MSG_WARN([sphinx is missing but required to build documentation])
of some routine in FRR mistakenly blocking/hogging the processing loop and
should be reported as a FRR bug.
- The default limit is 5 seconds (i.e. 5000), but this can be changed by the
- deprecated ``--enable-time-check=...`` compile-time option.
-
This command has no effect if :clicmd:`service cputime-stats` is disabled.
.. clicmd:: service walltime-warning (1-4294967295)
provide an immediate sign that FRR is not operating correctly due to
externally caused starvation.)
- The default limit is 5 seconds as above, including the same deprecated
- ``--enable-time-check=...`` compile-time option.
-
.. clicmd:: log trap LEVEL
These commands are deprecated and are present only for historical
This command displays system run statistics for all the different event
types. If no options is specified all different run types are displayed
together. Additionally you can ask to look at (r)ead, (w)rite, (t)imer,
- (e)vent and e(x)ecute thread event types. If you have compiled with
- disable-cpu-time then this command will not show up.
+ (e)vent and e(x)ecute thread event types.
.. clicmd:: show thread poll
Use libpam for PAM support in vtysh.
-.. option:: --enable-time-check XXX
-
- This option is deprecated as it was replaced by the
- :clicmd:`service cputime-stats` CLI command, which may be adjusted at
- runtime rather than being a compile-time setting. See there for further
- detail.
-
-.. option:: --disable-cpu-time
-
- This option is deprecated as it was replaced by the
- :clicmd:`service cputime-warning NNN` CLI command, which may be adjusted at
- runtime rather than being a compile-time setting. See there for further
- detail.
-
.. option:: --enable-pcreposix
Turn on the usage of PCRE Posix libs for regex functionality.
}
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
+ else if (cputime_threshold != CONSUMED_TIME_CHECK)
vty_out(vty, "service cputime-warning %lu\n",
cputime_threshold / 1000);
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
+ else if (walltime_threshold != CONSUMED_TIME_CHECK)
vty_out(vty, "service walltime-warning %lu\n",
walltime_threshold / 1000);
static void thread_free(struct event_loop *master, struct event *thread);
-#ifndef EXCLUDE_CPU_TIME
-#define EXCLUDE_CPU_TIME 0
-#endif
-#ifndef CONSUMED_TIME_CHECK
-#define CONSUMED_TIME_CHECK 0
-#endif
-
-bool cputime_enabled = !EXCLUDE_CPU_TIME;
+bool cputime_enabled = true;
unsigned long cputime_threshold = CONSUMED_TIME_CHECK;
unsigned long walltime_threshold = CONSUMED_TIME_CHECK;
extern "C" {
#endif
+#define CONSUMED_TIME_CHECK 5000000
+
extern bool cputime_enabled;
extern unsigned long cputime_threshold;
/* capturing wallclock time is always enabled since it is fast (reading