jadams / sysinfo

MIT License
1 stars 1 forks source link

Completed _get_disks(), returns almost all info from 'df -h' and 'mount' #6

Closed tcarrio closed 8 years ago

tcarrio commented 8 years ago
{
"/dev/sda1": {
  "use%": "12%", 
  "used": "12G", 
  "permission": "rw", 
  "mount": "/", 
  "avail": "89G", 
  "type": "ext4", 
  "size": "107G"
  }
}

This is the final format of the dict storing the disks. Right now it detects whether the first value in each line returned in df -h begins with /dev, so that all drives returned like /dev/sda1, /dev/sdb1, or /dev/md0 will be returned.