Sha256: ef3c5e536bc8f52cb370b0a2605d5dd76823486d9e6aecd061dd1cbfe6e611bf
Contents?: true
Size: 733 Bytes
Versions: 18
Compression:
Stored size: 733 Bytes
Contents
#coding=utf-8 class Aio::Module::Cmd::Cisco::ShowCPU < Aio::Module::Cmd::Cisco include Aio::Module def initialize super({ :cmd_full => "show cpu", :cmd_short => "sh cpu", :author => "Elin", :description => "This is Cisco ASA Command# show cpu", :ranking => Ranking_1, :platform => "asa", :benchmark => { :seconds_5 => ["<", 50], :minute_1 => ["<", 50], :minutes_5 => ["<", 50], } }) end def parse cont = self.context.dup cpu = {} useful[:cpu] = cpu cont.readline_match_block(/1 minute: (?<minute_1>\d+)%; 5 minutes: (?<minutes_5>\d+)%/) do |block| block.warning_serious(cpu, :minute_1, self) block.warning_serious(cpu, :minutes_5, self) end end end
Version data entries
18 entries across 18 versions & 1 rubygems