|
@@ -3149,10 +3149,10 @@ void ResourceWatcherFSM::GetSystemCPUStatus()
|
|
|
cpuWarnThreshold = 10; //默认满10次告一次警
|
|
|
}
|
|
|
|
|
|
- if (cpuRatio > 50)
|
|
|
+ if (cpuRatio > (double)m_cpuHighPercent)
|
|
|
{
|
|
|
cpuWarnTime = cpuWarnTime % cpuWarnThreshold;
|
|
|
- if (true) //每达到一次阈值告警一次
|
|
|
+ if (cpuWarnThreshold == 0) //每达到一次阈值告警一次
|
|
|
{
|
|
|
CSimpleStringA warn = CSimpleStringA::Format("{\"type\":\"cpu\", \"total_used\":\" %.2f", cpuRatio);
|
|
|
warn = warn + "%\"" + procWarn + "}";
|