Skip to content

Commit ed98e8c

Browse files
author
c-eller
committed
Update diskspace.py
1 parent a785eee commit ed98e8c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

miniprobe/sensors/diskspace.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,27 @@ def read_disk(self):
8787
if not line.startswith("Filesystem"):
8888
disks.append(line.rstrip().split())
8989
for line in disks:
90-
channel1 = {"name": "Total Bytes " + str(line[0]),
90+
channel1 = {"name": "Total Bytes " + str(line[5]),
9191
"mode": "integer",
9292
"kind": "BytesDisk",
9393
"value": int(line[1]) * 1024}
94-
channel2 = {"name": "Used Bytes " + str(line[0]),
94+
channel2 = {"name": "Used Bytes " + str(line[5]),
9595
"mode": "integer",
9696
"kind": "BytesDisk",
9797
"value": int(line[2]) * 1024}
98-
channel3 = {"name": "Free Bytes " + str(line[0]),
98+
channel3 = {"name": "Free Bytes " + str(line[5]),
9999
"mode": "integer",
100100
"kind": "BytesDisk",
101101
"value": int(line[3]) * 1024}
102102
total = float(line[2]) + float(line[3])
103103
used = float(line[2]) / total
104104
free = float(line[3]) / total
105105

106-
channel4 = {"name": "Free Space " + str(line[0]),
106+
channel4 = {"name": "Free Space " + str(line[5]),
107107
"mode": "float",
108108
"kind": "Percent",
109109
"value": free * 100}
110-
channel5 = {"name": "Used Space " + str(line[0]),
110+
channel5 = {"name": "Used Space " + str(line[5]),
111111
"mode": "float",
112112
"kind": "Percent",
113113
"value": used * 100}

0 commit comments

Comments
 (0)