Added disk partition usage
@@ -117,5 +117,7 @@ class SystemStats(object):
"sent": net.bytes_sent - self.network_init["sent"],
"recv": net.bytes_recv - self.network_init["recv"]
}
- stats["disk"] = psutil.disk_usage('/').percent
+ for partition in psutil.disk_partitions():
+ stats["disk.%s" % partition.mountpoint] = psutil.disk_usage(
+ partition.mountpoint).percent
return stats
