Sha256: 80b428319bc668c492068226f2fa0fc9d4bfcd866f55638a6e36f1e624560c34

Contents?: true

Size: 730 Bytes

Versions: 17

Compression:

Stored size: 730 Bytes

Contents

#coding=utf-8

require "aio/core"

class Aio::Module::Cmd::Maipu::ShowMemory < Aio::Module::Cmd::Maipu
  include Aio::Module

  def initialize
    super({
      :cmd_full			=> "show memory",
      :cmd_short		=> "sh mem", 
      :author				=> "Elin",
      :description	=> "This is Maipu Command# show memory",
      :ranking			=> Ranking_1,
      :platform			=> "all",
      :benchmark		=> {
        :used_percent		=> ["<", 70.0],		
      }
    })
  end

  def parse
    cont = self.context.dup
    useful[:memory] = {}
    cont.readline_match_block(/STATISTICS/) {|b|b}
    cont.readline_match_block(/(?<used_percent>\d+[\.]\d+)%/) do |block|
      block.warning_serious(useful[:memory], :used_percent, self)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
aio_elin-1.1.8 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.7 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.4 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.3 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.2 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.1 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.1.0 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.9 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.8 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.7 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.6 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.5 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.4 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.3 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.2 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.1 lib/modules/cmd/maipu/show_memory.rb
aio_elin-1.0.0 lib/modules/cmd/maipu/show_memory.rb