forked from platypush/platypush
Exclude squashfs/loopback mounts from system.disk_info
.
This commit is contained in:
parent
e33a391d25
commit
d1f0e1976c
1 changed files with 6 additions and 1 deletions
|
@ -223,7 +223,12 @@ class SystemPlugin(SensorPlugin, EntityManager):
|
|||
|
||||
@staticmethod
|
||||
def _disk_info() -> List[Disk]:
|
||||
parts = {part.device: part._asdict() for part in psutil.disk_partitions()}
|
||||
parts = {
|
||||
part.device: part._asdict()
|
||||
for part in psutil.disk_partitions()
|
||||
if part.fstype != 'squashfs' # Exclude loopback mounts
|
||||
}
|
||||
|
||||
basename_parts = {os.path.basename(part): part for part in parts}
|
||||
io_stats = {
|
||||
basename_parts[disk]: stats._asdict()
|
||||
|
|
Loading…
Reference in a new issue