Class HighLoadCpuChecker

java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
com.cloudbees.jenkins.support.threaddump.HighLoadCpuChecker
All Implemented Interfaces:
ExtensionPoint, Runnable

@Extension 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 Details

    • RECURRENCE_PERIOD_SEC

      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
    • HIGH_CPU_CONSECUTIVE_TIMES

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

      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
    • HIGH_CPU_THREAD_DUMPS_TO_RETAIN

      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 Details

    • HighLoadCpuChecker

      public HighLoadCpuChecker()
  • Method Details