{
    "name"  : "检测当前CPU状态",
    "problems" : {
        "cpuAbnormal" : {
            "desc"      : "【问题】检测到task  ${0}占用CPU高，可能有异常",
            "advice"    : "【建议】建议重启进程"
        }
    }
}

---------------------------code-------------------------------
response = cli('show processes cpu nonzero')
if response.search('Invalid input | Unknown command.') != -1 :
    return 'skip'    
end
cpuProcessArr = formatCpuInfo(response)
i = 0
length = cpuProcessArr.length
isCpuAbnormal = false
abnormalProcess = ''
while i < length :
    data = cpuProcessArr[i]
    fiveSec = data.fiveSec
    oneMin = data.oneMin
    fiveMin = data.fiveMin
    fifteenMin = data.fifteenMin
    process = data.process
    if fiveSec > 25 && oneMin > 25 && fiveMin > 25 && fifteenMin > 25 && process.search('efmp') == -1 :
        isCpuAbnormal = true
        if abnormalProcess == '' :
            abnormalProcess = abnormalProcess + process
        else :
            abnormalProcess = abnormalProcess + '、' + process
        end
    end
    i = i + 1
end

if isCpuAbnormal == true :
    add_problem('cpuAbnormal', [abnormalProcess])
    return 'warn'
end
return 'success'