Ad Widget

Collapse

Ceiling value in item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 5151
    Junior Member
    • Dec 2010
    • 2

    #1

    Ceiling value in item

    Hello!
    I calculate CPU utilization in percent using this expression:

    100*last("system.cpu.load[,avg1]")/last("system.cpu.num[max]")

    But sometimes when process queue is very long this value can grow more than 100%. Please tell me how to modify my expression to ceil (limit to 100) its value.
    For example if it's 95% then return it as is. And if it's 105% then return just 100%
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Hi,

    The main problem is that you are not computing CPU utilization.
    CPU Load has a different meaning and can be much larger than 100% (even divided by the number of CPUs).

    What you are looking for can be computed with system.cpu.util[,idle]:
    Code:
    100*(1-last("system.cpu.util[,idle]")
    Regards,
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • 5151
      Junior Member
      • Dec 2010
      • 2

      #3
      Originally posted by alixen
      Hi,

      The main problem is that you are not computing CPU utilization.
      CPU Load has a different meaning and can be much larger than 100% (even divided by the number of CPUs).

      What you are looking for can be computed with system.cpu.util[,idle]:
      Code:
      100*(1-last("system.cpu.util[,idle]")
      Regards,
      Alixen
      Thank you for answer. But we used to check this value and many of our limits are adjusted to this value. The only thing i need to do is to limit specified item value if it is more than 100.

      Comment

      • zabbix_zen
        Senior Member
        • Jul 2009
        • 426

        #4
        Not an available function.

        I guess your main problem is some superior of yours getting baffled receiving an over 100% CPU utilization message (corresponding to CPU load).

        Like Alixen said,
        to avoid misinterpretations, you should use his suggested expression.

        Comment

        Working...