require 'ganymed/collector' module Ganymed class Collector class Uptime < Base def collect! File.open('/proc/uptime') do |f| uptime = f.read.chomp.split.first.to_f boottime = Time.now - uptime @processor.event("os.reboot", 1, :now => boottime) end end end end end