diff options
author | Timothy Asir Jeyasingh <tjeyasin@redhat.com> | 2014-06-24 14:36:50 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2014-06-26 01:55:11 -0700 |
commit | dcb15dc1e6bda61611f7fd32c1e064fb85951d42 (patch) | |
tree | f81737b65578856c91f53251f35d4750e388a2db /plugins/check_vol_utilization.py | |
parent | 6af042189cb95932b7f4aafc37a9227f47626433 (diff) |
Fix pep8 errorsv0.1.1
Change-Id: I0d41725a02636228bc613b40c1b4d2d57a35e3e3
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com>
Reviewed-on: http://review.gluster.org/8159
Tested-by: Timothy Asir <tim.gluster@gmail.com>
Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com>
Diffstat (limited to 'plugins/check_vol_utilization.py')
-rwxr-xr-x | plugins/check_vol_utilization.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_vol_utilization.py b/plugins/check_vol_utilization.py index 8500df0..2593ca7 100755 --- a/plugins/check_vol_utilization.py +++ b/plugins/check_vol_utilization.py @@ -33,16 +33,16 @@ def showVolumeUtilization(vname, warnLevel, critLevel): "Volume Utilization Data\n") sys.exit(utils.PluginStatusCode.UNKNOWN) #################################################################### -#statvfs.frsize * statvfs.f_blocks# Size of filesystem in bytes # -#statvfs.frsize * statvfs.f_bfree # Actual number of free bytes # -#statvfs.frsize * statvfs.f_bavail# Number of free bytes that # -#ordinary users are allowed to use (excl. reserved space # +# statvfs.frsize * statvfs.f_blocks# Size of filesystem in bytes # +# statvfs.frsize * statvfs.f_bfree # Actual number of free bytes # +# statvfs.frsize * statvfs.f_bavail# Number of free bytes that # +# ordinary users are allowed to use (excl. reserved space # #################################################################### - #total size in KB + # total size in KB total_size = (buf['f_bsize'] * buf['f_blocks']) / 1024.0 - #Available free size in KB + # Available free size in KB free_size = (buf['f_bsize'] * buf['f_bavail']) / 1024.0 - #used size in KB + # used size in KB used_size = total_size - ((buf['f_bsize'] * buf['f_bfree']) / 1024.0) vol_utilization = (used_size / total_size) * 100 perfLines = [] @@ -110,6 +110,6 @@ def parse_input(): if __name__ == '__main__': args = parse_input() - #check the volume status before getting the volume utilization + # check the volume status before getting the volume utilization check_volume_status(args.volume) showVolumeUtilization(args.volume, args.warning, args.critical) |