del kstats[0:2]
for kstat in kstats:
kstat = kstat.strip()
- name, unused, value = kstat.split()
+ name, _, value = kstat.split()
Kstat[namespace + name] = D(value)
Kstat = {}
return Kstat
-def div1():
- sys.stdout.write("\n")
- for i in range(18):
- sys.stdout.write("%s" % "----")
- sys.stdout.write("\n")
-
-
-def div2():
- sys.stdout.write("\n")
-
-
def fBytes(b=0):
"""Return human-readable representation of a byte value in
powers of 2 (eg "KiB" for "kibibytes", etc) to two decimal
def zfs_header():
- daydate = time.strftime("%a %b %d %H:%M:%S %Y")
+ """Print title string with date
+ """
+ daydate = time.strftime('%a %b %d %H:%M:%S %Y')
- div1()
- sys.stdout.write("ZFS Subsystem Report\t\t\t\t%s" % daydate)
- div2()
+ sys.stdout.write('\n'+'-'*72+'\n')
+ sys.stdout.write('ZFS Subsystem Report\t\t\t\t%s' % daydate)
+ sys.stdout.write('\n')
def usage():
zfs_header()
for page in pages:
page(Kstat)
- div2()
+ sys.stdout.write("\n")
if __name__ == '__main__':