Answers: <p>As far as I understand,</p>
  <p><code>system.cpu.usage</code> is host’s cumulative CPU usage in nanoseconds this includes user, system, idle CPU modes. (the sum of the /proc/stat CPU line)</p>
  <p><code>process.cpu.usage</code> is the cpu usage for the JVM process aka CPU time used by the JVM process</p>
  <p>CPU usage aka CPU time is measured by counting the seconds that a CPU spends processing instructions from an application or from OS.</p>
  <p>Both metrics are of type <strong>Gauge</strong> because their values that can go up or down as their showing a resource usage .</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-07-16T11:33:13.307Z
Answers: 2021-07-16T13:07:24.370Z
Answers: 2021-07-16T13:07:24.370Z
Answers: dejanualex
Body: <p>Spring boot reports two statistics when Prometheus in place.</p>
  <pre><code>    # HELP system_cpu_usage The &quot;recent cpu usage&quot; for the whole system
      # TYPE system_cpu_usage gauge
      system_cpu_usage 0.029126213592233007
      
      # HELP process_cpu_usage The &quot;recent cpu usage&quot; for the Java Virtual Machine process
      # TYPE process_cpu_usage gauge
      process_cpu_usage 0.0
  </code></pre>
  <p>What is the difference between <code>system_cpu_usage</code>  and <code>process_cpu_usage</code>  ?</p>
  
Tags: <prometheus><spring-boot>
Title: Spring boot prometheus - difference between system_cpu_usage and process_cpu_usage
UserDisplayName: Nitul
ThreadText: # Spring boot prometheus - difference between system_cpu_usage and process_cpu_usage
  
  (Asked by: username_0 on 2020-09-14)
  
  Spring boot reports two statistics when Prometheus in place.
  
  ```
      # HELP system_cpu_usage The "recent cpu usage" for the whole system
      # TYPE system_cpu_usage gauge
      system_cpu_usage 0.029126213592233007
      
      # HELP process_cpu_usage The "recent cpu usage" for the Java Virtual Machine process
      # TYPE process_cpu_usage gauge
      process_cpu_usage 0.0
  
  ```
  
  What is the difference between `system_cpu_usage` and `process_cpu_usage` ?
  
  **Tags:** prometheus, spring-boot
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-07-16. Score: 1
  
  As far as I understand,
  
  `system.cpu.usage` is host’s cumulative CPU usage in nanoseconds this includes user, system, idle CPU modes. (the sum of the /proc/stat CPU line)
  
  `process.cpu.usage` is the cpu usage for the JVM process aka CPU time used by the JVM process
  
  CPU usage aka CPU time is measured by counting the seconds that a CPU spends processing instructions from an application or from OS.
  
  Both metrics are of type **Gauge** because their values that can go up or down as their showing a resource usage .
  
  
  ---
  
  