socialnerds/hive
socialnerds
/
hive
Archived
1
0
Fork 0

nicer output for diskmon

This commit is contained in:
David 2012-05-20 15:38:55 +02:00
parent 6b262dfbfa
commit f084e1303e
1 changed files with 7 additions and 2 deletions

View File

@ -48,9 +48,14 @@ class diskmon(object):
if __name__ == "__main__":
diskmoninstance = diskmon()
for partition in diskmoninstance.partitions:
print "device:\t\t" + str(partition["device"]) + "\nuuid:\t\t" + str(partition["uuid"])
print "device:\t\t" + str(partition["device"]) + \
"\nuuid:\t\t" + str(partition["uuid"])
if partition.has_key("mountpoint"):
print "mountpoint:\t" + str(partition["mountpoint"]) + "\nfilesystem:\t" + str(partition["filesystem"]) + "\nblocksize:\t" + str(partition["blocksize"]) + "\ntotal blocks:\t" + str(partition["total blocks"]) + "\nfree blocks:\t" + str(partition["free blocks"]) + "\n"
print "mountpoint:\t" + str(partition["mountpoint"]) + \
"\nfilesystem:\t" + str(partition["filesystem"]) + \
"\nblocksize:\t" + str(partition["blocksize"]) + \
"\ntotal blocks:\t" + str(partition["total blocks"]) + \
"\nfree blocks:\t" + str(partition["free blocks"]) + "\n"
else:
print "\n"