diff options
| author | ndarshan <dnarayan@redhat.com> | 2014-03-17 12:21:42 +0530 |
|---|---|---|
| committer | Bala.FA <barumuga@redhat.com> | 2014-04-29 10:14:32 +0530 |
| commit | 686b574d3c1e55a778088b58a1a2fc75ce72d280 (patch) | |
| tree | 89e6335b46c42dcea1c66e80cd7500059856ffd5 /plugins/check_disk_and_inode.py | |
| parent | fcf78fd752dd24a8bb8b0bf8f62e7ba7ec0aac55 (diff) | |
plugins:Fix to handle sadf not accepting time range, test case addition
This patch handles the issue of sadf not accepting time range
when used with -x (xml output) option(seen in version 9.0.4).
Added unit-test for memory, cpu, swap, network plugins and
refactored them.
Change-Id: Ie7c2ecfbb38060f236a6faed606bce0aedd27d7a
Signed-off-by: ndarshan <dnarayan@redhat.com>
Reviewed-on: https://cuckoo.blr.redhat.com:8443/14
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Bala FA <barumuga@redhat.com>
Diffstat (limited to 'plugins/check_disk_and_inode.py')
| -rwxr-xr-x | plugins/check_disk_and_inode.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/check_disk_and_inode.py b/plugins/check_disk_and_inode.py index 052df3a..02c5cd2 100755 --- a/plugins/check_disk_and_inode.py +++ b/plugins/check_disk_and_inode.py @@ -155,8 +155,16 @@ if __name__ == '__main__': total = (float(used) + float(avail)) / 1000 itot = (float(iused) + float(iavail)) / 1000 disk.append("%s=%.1f;%.1f;%.1f;0;%.1f %s=%.1f;%.1f;%.1f;0;%.1f" % ( - mpath, float(used)/1000, warn*total/100, crit*total/100, total, - ipath, float(iused)/1000, warn*itot/100, crit*itot/100, itot)) + mpath, + float(used) / 1000, + warn * total / 100, + crit * total / 100, + total, + ipath, + float(iused) / 1000, + warn * itot / 100, + crit * itot / 100, + itot)) else: disk.append("%s=%.2f;%s;%s;0;100 %s=%.2f;%s;%s;0;100" % ( mpath, diskUsage, warn, crit, ipath, inodeUsage, warn, crit)) |
