BrainSpawnInfosphere / pyarchey

Archey is a system information tool written in Python.
https://pypi.python.org/pypi/pyarchey/
GNU General Public License v3.0
8 stars 6 forks source link

Handling multi-partition systems #9

Open pozar87 opened 9 years ago

pozar87 commented 9 years ago

The current (pyarchey 0.6.2) script assumes single / partition and reports invalid result for system with separated /var, /home, etc. (sub-class Disk in pyarchey.py, line 523)

Quick (and ugly - please consider better approach, without multiple iterating over partitions:)) solution might be:

#p = ps.disk_usage('/')
total = sum([ps.disk_usage(part.mountpoint).total for part in ps.disk_partitions()])
used = sum([ps.disk_usage(part.mountpoint).used for part in ps.disk_partitions()])

Best Regards