{
    "name"  : "SKB异常情况检测",
    "problems" : {
        "pool" : {
            "desc"      : "【问题】经检查环境中skbuff异常，可能出现泄漏。",
            "advice"    : "【建议】产品存在异常，建议联系400工程师进一步排查。"
        },
		"mngpkt" : {
            "desc"      : "【问题】经检测环境中skbuff异常，疑似引擎硬件问题（历史经验：CPU引脚异常或是可能是Fabric芯片异常）。",
            "advice"    : "【建议】联系400工程师进一步确认产品问题"
        }
    }
}
---------------------------code-------------------------------
result = 'pass'
cli('debug support')
skb_sta = cli('show skbuff')
cli('exit')
reg = /Packets pool alloc remain:\s+(\d+)/
reg_1 = /ikl_send_mngpkt_inband_mb2mb\s+:\s+Allocated\s+(\d+)/
r = skb_sta.match(reg)
r1 = skb_sta.match(reg_1)
if r != null:
    if r[1] < 5000 :
        change_title('检测出系统SKB异常')
        add_problem('pool')
        result = 'fail'
    end
end
if r1 != null:
	if r1[1] >10000 :
		change_title('检测出SKB异常，疑似硬件问题')
		add_problem('mngpkt')
		result = 'fail'
	end
end

if result == 'fail':
	return 'warn'
else:
	return 'skip'
end

return 'success'