def _get_disk_info(self):
"""
??????????
:return: list, ?????????????
"""
status, output = getstatusoutput("df -h")
disk_info_list = []
if not status:
lines = output.split('\n')
for line in lines[1:]:
line_sp = line.split()
line_sp = line_sp[:5] + [line_sp[-1]]
if '/dev/' in line_sp[0]:
disk_info_list.append(self.DiskInfo(*line_sp))
return disk_info_list
评论列表
文章目录