Ad Widget

Collapse

CPU % use

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akbar415
    Senior Member
    • May 2015
    • 119

    #1

    CPU % use

    I'm looking for a trigger thta give me the utilization of a CPU in percent and I found this:



    system.cpu.util[<cpu> <,type><,mode>]

    Processor load in percents

    cpu - CPU number (default is all CPUs)
    type - one of idle, nice, user (default), system
    mode - one of avg1 (default),avg5 (average within 5 minutes), avg15

    Example: system.cpu.util[0,user ,avg5]

    But how can this give me the CPU use once the Load Average -avg1,avg5, avg15 - is used to show the running processes in the job queue on average (that is different of CPU Load)?



    http://stackoverflow.com/questions/2...e-vs-cpu-usage



  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    The mode parameter of system.cpu.util[*] is not related to the load average found on UNIX like environments. Well, except of describing a period.

    CPU utilization, as load average too, can't be obtained by taking a single snapshot as there is no such performance counter.
    To do it right one has to take two snapshots under consideration of the time between them. That's what the mode parameter controls: The time between snapshots.

    Statistical items like system.cpu.util[*] are processed by a dedicated stats collector process.
    Another advantage of having this done by the stats collector is that values for statistical items can be returned immediately.

    Btw, that's the reason why this item can't be tested by:
    Code:
    # zabbix_agentd -t system.cpu.util
    system.cpu.util                               [m|ZBX_NOTSUPPORTED]
    while still being queryable passively:
    Code:
    # time zabbix_get -s example.com -k system.cpu.util
    6.771275
    
    real    0m0.004s
    user    0m0.001s
    sys     0m0.002s

    Comment

    • akbar415
      Senior Member
      • May 2015
      • 119

      #3
      Thanks

      Originally posted by BDiE8VNy
      The mode parameter of system.cpu.util[*] is not related to the load average found on UNIX like environments. Well, except of describing a period.

      CPU utilization, as load average too, can't be obtained by taking a single snapshot as there is no such performance counter.
      To do it right one has to take two snapshots under consideration of the time between them. That's what the mode parameter controls: The time between snapshots.

      Statistical items like system.cpu.util[*] are processed by a dedicated stats collector process.
      Another advantage of having this done by the stats collector is that values for statistical items can be returned immediately.

      Btw, that's the reason why this item can't be tested by:
      Code:
      # zabbix_agentd -t system.cpu.util
      system.cpu.util                               [m|ZBX_NOTSUPPORTED]
      while still being queryable passively:
      Code:
      # time zabbix_get -s example.com -k system.cpu.util
      6.771275
      
      real    0m0.004s
      user    0m0.001s
      sys     0m0.002s
      Thanks for your explanation.

      Comment

      Working...