diff --git a/monitor/disk_display.py b/monitor/disk_display.py index 5194163..ace0596 100755 --- a/monitor/disk_display.py +++ b/monitor/disk_display.py @@ -26,9 +26,12 @@ if __name__ == "__main__": if partition.has_key("mountpoint"): totalbytes = blocks2bytes(partition["total blocks"], partition["blocksize"]) totalhuman = bytes2human(totalbytes) + freebytes = blocks2bytes(partition["free blocks"], partition["blocksize"]) + freehuman = bytes2human(freebytes) + percent = 100.00 * freebytes / totalbytes print "Mountpoint:\t" + str(partition["mountpoint"]) + \ "\nFilesystem:\t" + str(partition["filesystem"]) + \ - "\nSize:\t\t%.2f %s\n" %(totalhuman[0], totalhuman[1]) + "\nUsage:\t\t%.2f%s/%.2f%s(%i)\n" %(freehuman[0], freehuman[1], totalhuman[0], totalhuman[1], percent) else: print "\n"