-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hi all,
I have just upgraded to a Ubuntu 14.04 a server machine where we had a little script using your usagewatch gem, to return a json string just for monitoring. Before upgrading, the script showed a 20% of used hard disk. After upgrading, it always shows 0%.
After upgrading, as root, I run:
- gem install usagewatch
- gem install json
The script is as simple as this:
#/usr/bin/ruby
require 'usagewatch'
require 'json'
usw = Usagewatch
disk_io = usw.uw_diskioreads.to_i + usw.uw_diskiowrites.to_i
network = usw.uw_bandrx.to_i + usw.uw_bandtx.to_i
usage = {
name: 'sredb',
cpu: usw.uw_cpuused.to_s + ' %',
memory: usw.uw_memused.to_s + ' %',
disk_io: disk_io.to_s + ' op/s',
disk_space: usw.uw_diskused_perc.to_s + ' %',
network: network.to_s + ' Mbit/s'
}
puts usage.to_jsonDo you know any issue related to this? Could you help me please? Can it be caused by some gem not installed yet?
Looking forward to hearing from you,
Saludos,
Jordi
Metadata
Metadata
Assignees
Labels
No labels