Sha256: c4fef8543f9485406f61c32ea64b9bbc6dd75fb267a9a8fa14539a41e68f84a8

Contents?: true

Size: 226 Bytes

Versions: 1

Compression:

Stored size: 226 Bytes

Contents

class CPUUsage
	
	include Watchman
	
	def self.data
		out = MPstat.data.select do |line|
			line[:command][/^Average:/]
		end
		out.length > 0 ? out.first.merge({:summary => [:usr, :idle, :sys]}) : {:nodata => true}
	end
	
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
city-watch-0.3.0 lib/city_watch/watchmen/cpu_usage.rb