Ad Widget

Collapse

is there a macro that equal the number of cpus

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alex_SYB
    Senior Member
    • Feb 2012
    • 133

    #1

    is there a macro that equal the number of cpus

    Hi

    I want to create a template such that I can trigger if processor load (windows box), goes above the number of cpu's on the system.

    But I don't want to go through each VM and update.
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    That's what templates are for.
    There is no need to go thru all systems.

    Simply create or modify a template with desired items and assign (if not done already) that template to your systems.

    Comment

    • Alex_SYB
      Senior Member
      • Feb 2012
      • 133

      #3
      Originally posted by steveboyson
      That's what templates are for.
      There is no need to go thru all systems.

      Simply create or modify a template with desired items and assign (if not done already) that template to your systems.

      But what do I do in my template for the trigger.

      So I have looked here


      Some of my machines have 4 cpu some 8 some 2 some 1. So unless I create 4 templates I am not sure how to do this

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        Could you just use

        Code:
        system.cpu.load[,avg1]
        system.cpu.load[,avg5]
        system.cpu.load[,avg15]
        which covers overall CPU load per system?

        Comment

        • Alex_SYB
          Senior Member
          • Feb 2012
          • 133

          #5
          Originally posted by steveboyson
          Could you just use

          Code:
          system.cpu.load[,avg1]
          system.cpu.load[,avg5]
          system.cpu.load[,avg15]
          which covers overall CPU load per system?
          Hi

          Yes I use these are my items, but in the trigger I want to create so lets say

          2 servers
          A 4 cpu
          B 2 cpu

          I want A to trigger if "system.cpu.load[,avg1]" > 4
          but for B to trigger if "system.cpu.load[,avg1]" > 2


          I want the trigger value to be equal to or relative to the number of cpu in the box.

          This just got me thinking I could use this item system.cpu.num !

          I was just looking for a macro when i could have used a item instead

          EDIT:
          so I could write
          trigger if "system.cpu.load[,avg1]" > system.cpu.num
          or
          trigger if "system.cpu.load[,avg1]" > (system.cpu.num*2)
          or
          trigger if "system.cpu.load[,avg1]" > (system.cpu.num*1.2)

          A

          Comment

          • steveboyson
            Senior Member
            • Jul 2013
            • 582

            #6
            system.cpu.num does not say anything about your current CPU load.

            Also, as long as I know, system.cpu.load[,XXX] is a compareable value between systems, even with different numbers of CPUs. That means the calculations for system.cpu.num include the number of CPUs per system.

            In addition, I don't think that the gathered CPU load value of system.cpu.num is in direct relation to the number of CPUs so your planned trigger do not make much sense to me.

            Comment

            • Alex_SYB
              Senior Member
              • Feb 2012
              • 133

              #7
              Originally posted by steveboyson
              system.cpu.num does not say anything about your current CPU load.

              Also, as long as I know, system.cpu.load[,XXX] is a compareable value between systems, even with different numbers of CPUs. That means the calculations for system.cpu.num include the number of CPUs per system.

              In addition, I don't think that the gathered CPU load value of system.cpu.num is in direct relation to the number of CPUs so your planned trigger do not make much sense to me.
              There are some applications like MS SQL that peg processes to CPU, I have 2 SQL servers 1 with 2 cpus and 1 with 4 cpus.

              I would like to trigger on load of 3 or more for the 2 cpu and 5 or more for the 4 cpu. Because that tells me (..... sort of ) that there is more than SQL trying to run on those boxes.

              I can also look at CPU usage from perfmon.... but I think i need a few items

              so under a long running SQL query which is okay on 2 cpu machine I will see normally a load of 2 which is good, and on the 4 cpu I will see load 4... I will also see cpu usage up around 90+

              thats all okay. if the anti virus or backup software or some other process start to take up cpu ... the load will increase above those numbers..

              does that make sense ?

              A

              Comment

              • steveboyson
                Senior Member
                • Jul 2013
                • 582

                #8
                Doesn't a load of "2" on a Dual-CPU machine and a load of "4" on a Quad-CPU mean that the system is just loaded up to the max?

                I thought it's that what system.cpu.load is for ...

                Comment

                • Alex_SYB
                  Senior Member
                  • Feb 2012
                  • 133

                  #9
                  Originally posted by steveboyson
                  Doesn't a load of "2" on a Dual-CPU machine and a load of "4" on a Quad-CPU mean that the system is just loaded up to the max?

                  I thought it's that what system.cpu.load is for ...
                  Sort of. on my exchange boxes I regularly see load of 16 up to 40 and above. on a quad core VM.

                  My reading of it is load is the amount of ready processes at sample time not the amount of work the CPU is doing. So from my reading a load of 40 is okay for an exchange box.

                  Comment

                  Working...