Class HighLoadCpuChecker

  • All Implemented Interfaces:
    ExtensionPoint, Runnable

    public class HighLoadCpuChecker
    extends PeriodicWork
    PeriodicWork to check when there is a high load in the instance. Only checking high CPU usage for the moment, but it can be used to generate thread dumps in high heap memory consumption.
    • Field Detail


        public static final int RECURRENCE_PERIOD_SEC
        Recurrence period to check high cpu load consumption. Thread dumps after there are CONSECUTIVE_HIGH_CPU in the RECURRENCE_PERIOD_SEC

        public static final int HIGH_CPU_CONSECUTIVE_TIMES
        Consecutive high CPUs to take a thread dump

        public static final Double CPU_USAGE_THRESHOLD
        This is the CPU usage threshold. Determinate de percentage of the total CPU used across all the cores available

        public static final int HIGH_CPU_THREAD_DUMPS_TO_RETAIN
        Limit the number of thread dumps to retain on high cpu
      • logs

        protected final FileListCap logs
        Thread dumps generated on high CPU load are stored in $JENKINS_HOME/high-load/cpu
    • Constructor Detail

      • HighLoadCpuChecker

        public HighLoadCpuChecker()