Ad Widget

Collapse

Does Anyone Have A Template That will Monitor Total utilization of Multiple Cores

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ballscout
    Junior Member
    • Nov 2011
    • 9

    #1

    Does Anyone Have A Template That will Monitor Total utilization of Multiple Cores

    I am looking for a way to monitor CPU utilization on machines with more than two cores and alert when total CPU usuage is over 80%.

    I have some quad core machines and also some with more cores than that.

    Thanks
  • Stephen Wood
    Member
    • Feb 2012
    • 43

    #2
    I must ask, is it necessary to know what each individual core is up to? Wouldn't monitoring CPU load be a more reliable metric for determining if you've got problems?

    Comment

    • MaxM
      Member
      • Sep 2011
      • 42

      #3
      This doesn't really seem logical from an overall perspective. Do you have that many single threaded apps that you will be max'ing out a single core while the remaining sit idle? If you absolutely must, on most *nix systems, I would discover the number of cores, then munge something like mpstat:

      [maxm@test ~]$mpstat | head -5 | awk '{print $1, $13, $14, $16}'
      CPU usr sys idl
      0 1 1 98
      1 2 2 97
      2 0 0 100
      3 0 0 100

      Comment

      • ballscout
        Junior Member
        • Nov 2011
        • 9

        #4
        Originally posted by Stephen Wood
        I must ask, is it necessary to know what each individual core is up to? Wouldn't monitoring CPU load be a more reliable metric for determining if you've got problems?
        Stephen,

        Thats is exactly what I want...Total of all the cores. I don't want individual.

        Currently I have seperate items with seperate triggers.. I want one that will show total load not individual..

        like item
        system.cpu.util[0,,]
        trigger
        {hostname:system.cpu.util[0,,].last(0)}>80


        item
        system.cpu.util[1,,]
        trigger
        {hostname:system.cpu.util[1,,].last(0)}>80
        Last edited by ballscout; 18-07-2012, 14:42.

        Comment

        • ballscout
          Junior Member
          • Nov 2011
          • 9

          #5
          Originally posted by MaxM
          This doesn't really seem logical from an overall perspective. Do you have that many single threaded apps that you will be max'ing out a single core while the remaining sit idle? If you absolutely must, on most *nix systems, I would discover the number of cores, then munge something like mpstat:

          [maxm@test ~]$mpstat | head -5 | awk '{print $1, $13, $14, $16}'
          CPU usr sys idl
          0 1 1 98
          1 2 2 97
          2 0 0 100
          3 0 0 100
          I must have been confusing in my request Max.

          I want the item and trigger setup not for individual cores but total.

          So if I have a machine with 8 cores the item and trigger will read all 8 combined and report of the total not each one as a single

          Comment

          • Stephen Wood
            Member
            • Feb 2012
            • 43

            #6
            By default your system "load" is an aggregate of all cores -- as far as I know. So why not just use the three default load metrics? 1 min, 5 min, and 15 min. These are what you normally see in top or w.

            In Zabbix the checks look like:

            system.cpu.load[,avg1]
            system.cpu.load[,avg5]
            system.cpu.load[,avg15]

            These work regardless of the number of cores your linux system has.

            You can also look at things like idle and iowait.

            Does that help you? Maybe I don't understand the question.

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              Sounds to me like he is looking for CPU usage being at 80% or greater. I personally don't use either of those metrics (CPU usage or CPU load) by themselves as a surefire sign of trouble, but have triggers set for them both if they reach a "suspect" level.

              Anyway, you can use SAR for a frame level (Multiple CPU's) reporting on percentage busy. We use this on Solaris, but pretty sure it also works on Linux.

              Code:
              CPU consumption on frame level		
               %usr		UserParameter=kpi.solaris.cpu.usr,sar 1 1 | awk '{ A=$2 } END { print A }'
               %sys		UserParameter=kpi.solaris.cpu.sys,sar 1 1 | awk '{ A=$3 } END { print A }'
               %wio		UserParameter=kpi.solaris.cpu.wio,sar 1 1 | awk '{ A=$4 } END { print A }'
               %idle		UserParameter=kpi.solaris.cpu.idle,sar 1 1 | awk '{ A=$5 } END { print A }'

              Comment

              • mikesphar
                Junior Member
                • Jun 2012
                • 12

                #8
                Originally posted by ballscout
                I am looking for a way to monitor CPU utilization on machines with more than two cores and alert when total CPU usuage is over 80%.

                I have some quad core machines and also some with more cores than that.

                Thanks
                Maybe I'm misunderstanding the question, but isn't that the default value returned by system.cpu.util if you do not specify a CPU? That's what the Zabbix manual appears to say.

                Code:
                cpu - CPU number (default is all CPUs)

                Comment

                Working...