bin/instrument_server in instrumental_tools-0.5.5 vs bin/instrument_server in instrumental_tools-0.5.6

- old
+ new

@@ -132,12 +132,16 @@ output end def self.df output = {} - `df -k`.split("\n").grep(%r{^/dev/}).each do |line| + `df -ka`.split("\n").grep(%r{^(/dev/|tmpfs)}).each do |line| device, total, used, available, capacity, mount = line.split(/\s+/) - names = [File.basename(device)] + if device == "tmpfs" + names = ["tmpfs_#{mount.gsub(/[^[:alnum:]]/, "_")}".gsub(/_+/, "_")] + else + names = [File.basename(device)] + end names << 'root' if mount == '/' names.each do |name| output["disk.#{name}.total_mb"] = total.to_f / 1024 output["disk.#{name}.used_mb"] = used.to_f / 1024 output["disk.#{name}.available_mb"] = available.to_f / 1024