socialnerds/hive
socialnerds
/
hive
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
hive/monitor/disk_display.py

22 lines
767 B
Python
Executable File

#!/usr/bin/python2 -B
""" simple display to show results of disk.py """
import disk
if __name__ == "__main__":
diskmoninstance = disk.diskmon()
for partition in diskmoninstance.partitions:
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"
else:
print "\n"
#end of file