Sha256: e51a56429f33a8270331f97d0532e43aea7a931b599b880a2a6551342b20f8fc
Contents?: true
Size: 244 Bytes
Versions: 2
Compression:
Stored size: 244 Bytes
Contents
collect do return if not File.readable?('/proc/stat') File.open('/proc/stat').each do |line| next if not line =~ /^btime / boottime = Time.at(line.chomp.split[1].to_i) processor.event("os.reboot", 1, :now => boottime) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ganymed-0.2.1 | lib/ganymed/collectors/uptime.rb |
ganymed-0.2.0 | lib/ganymed/collectors/uptime.rb |