def _get_disk_size(self, device):
        out = __salt__['cmd.run_all']("df {0}".format(device))
        if out['retcode']:
            msg = "Disk size info error: {0}".format(out['stderr'])
            log.error(msg)
            raise SIException(msg)

        devpath, blocks, used, available, used_p, mountpoint = [elm for elm in out['stdout'].split(os.linesep)[-1].split(" ") if elm]

        return {
            'device': devpath, 'blocks': blocks, 'used': used,
            'available': available, 'used (%)': used_p, 'mounted': mountpoint,
        }
Run a command then return: (status, output, error).
dataset/ETHPy150Open saltstack/salt/salt/modules/inspectlib/query.py/SysInfo._get_disk_size--crossover with--dataset/ETHPy150Open pastpages/storytracker/test.py/Command.run