lib/zabbix-ruby-client/plugins/memory.rb in zabbix-ruby-client-0.0.15 vs lib/zabbix-ruby-client/plugins/memory.rb in zabbix-ruby-client-0.0.16

- old
+ new

@@ -1,16 +1,18 @@ -class ZabbixRubyClient +require "zabbix-ruby-client/logger" + +module ZabbixRubyClient module Plugins module Memory extend self def collect(*args) host = args[0] meminfo = `cat /proc/meminfo` if $?.to_i == 0 info = splitinfo(meminfo) else - logger.warn "Please install sysstat." + Log.warn "Please install sysstat." return [] end mem_total = info["MemTotal"] * 1024 mem_free = (info['MemFree'] + info['Buffers'] + info['Cached']) * 1024