cancel
Showing results for 
Search instead for 
Did you mean: 

Average cpu in threshold

ChrisMiller
05 Base Camper

Average cpu in threshold

I would like to create a threshold that triggers off the average for all cpus versus off of an individual cpu.  Is this possible in a threshold and if so how?

Tags (2)
4 REPLIES 4
SCOTT_BALDWIN
Community Manager

Re: Average cpu in threshold

Hello @ChrisMiller,

For a Windows system running Prognosis Platform, use the NtCpuSystem (NTCPUSYS) record instead of the NtCpu (NTCPU) record.

 

The NtCpuSystem (NTCPUSYS) record shows combined usage of all the CPUs. The Where Clause should be set to trigger for a percentage greater than XX of the BusyPercent (BUSY) field.

Example Where Clause: BUSY > 70

 

Thank you,

Scott Baldwin

 

ChrisMiller
05 Base Camper

Re: Average cpu in threshold

Scott,

 

Sorry didn't mention that I'm looking for the average on our nonstop systems.  

Leon_Arens_FNNI
09 Summiteer

Re: Average cpu in threshold

I have not been able to get a threshold to average CPUs.  I was able to do this with an ANALYST.

If you have the AA product, here is an ANALYST rule that averages our 4 CPUs and logs an event to the problem log.

 

SECTION CONFIG
    CONVERT_TO_UPPER OFF
    NUMERIC       CPU_00_BUSY[0]
    NUMERIC       CPU_01_BUSY[0]
    NUMERIC       CPU_02_BUSY[0]
    NUMERIC       CPU_03_BUSY[0]

END_SECTION

SECTION RULE_DEF

RULE           Cpu-average-busy                  PRIMARY
    STRING     RuleName
    STRING     msgText
    RECORD     cpu
    WHERE      cpu.pebladea = "U"
    EVERY   60 seconds
    REFRESH 60 seconds
    ACTION
        SET RuleName := "Cpu-average-busy"
    END_ACTION
    IF @cpu.cpuno = 0
       SET CPU_00_BUSY := @cpu.busy
!       set msgText := subst( "CPU 0 @CPU_00_BUSY@% busy") 
!       LOG problem 00200 IMMEDIATELY
    END_IF
    IF @cpu.cpuno = 1
       SET CPU_01_BUSY := @cpu.busy
!       set msgText := subst( "CPU 1 @CPU_01_BUSY@% busy") 
!       LOG problem 00200 IMMEDIATELY
    END_IF
    IF @cpu.cpuno = 2
       SET CPU_02_BUSY := @cpu.busy
!       set msgText := subst( "CPU 2 @CPU_02_BUSY@% busy") 
!       LOG problem 00200 IMMEDIATELY
    END_IF
    IF @cpu.cpuno = 3
       SET CPU_03_BUSY := @cpu.busy
!       set msgText := subst( "CPU 3 @CPU_03_BUSY@% busy") 
!       LOG problem 00200 IMMEDIATELY
       start rule summ_cpus wait
    END_IF
END_RULE

RULE summ_cpus     SECONDARY
    NUMERIC   CPU_average[0]
    STRING    msgText
    RECORD    PNODES
    WHERE     ALL
    REFRESH   10 SECONDS
    ACTION
        SET CPU_average := (CPU_00_BUSY + CPU_01_BUSY + CPU_02_BUSY + CPU_03_BUSY)/4
    END_ACTION
    if CPU_average > 50
        set msgText := subst( "average cpubusy of @CPU_average@%is greater than limit of 50%  ") 
        LOG problem 00200 IMMEDIATELY
    END_IF        
END_RULE
END_SECTION

SECTION     MSG_TEXT
    MSG 00200  "@MsgText@"
END_SECTION

 

 

ChrisMiller
05 Base Camper

Re: Average cpu in threshold

Thanks Leon,  I'll give this a go.

Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar
Top Liked Members