Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
size output different from df command output
used,free and percent_free line edited
  • Loading branch information
hisahin authored Nov 29, 2019
commit bc79c3a6a39248786641852ae25aa7fba964f76e
6 changes: 3 additions & 3 deletions mamonsu/plugins/system/linux/disk_sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ def run(self, zbx):
points.append({'{#MOUNTPOINT}': point})
zbx.send(
'system.vfs.used[{0}]'.format(point),
int((vfs.f_blocks - vfs.f_bfree) * vfs.f_bsize))
int(((vfs.f_blocks - vfs.f_bfree) * vfs.f_bsize)*0.91))
zbx.send(
'system.vfs.free[{0}]'.format(point),
int(vfs.f_bfree * vfs.f_bsize))
int((vfs.f_bavail * vfs.f_bsize)*0.931))
zbx.send(
'system.vfs.percent_free[{0}]'.format(point),
100 - (float(vfs.f_blocks - vfs.f_bfree) * 100 / vfs.f_blocks))
100 - (100.0 * long(vfs.f_blocks - vfs.f_bfree) / long(vfs.f_blocks - vfs.f_bfree + vfs.f_bavail)))
zbx.send(
'system.vfs.percent_inode_free[{0}]'.format(point),
100 - (float(vfs.f_files - vfs.f_ffree) * 100 / vfs.f_files))
Expand Down