diff options
| author | Tim <timothyasir@gluster.com> | 2011-06-03 17:45:15 +0530 |
|---|---|---|
| committer | Tim <timothyasir@gluster.com> | 2011-06-03 17:45:15 +0530 |
| commit | 2313bd0322d76f6f1002b91f7a2d99d08dd86263 (patch) | |
| tree | 2bb2aa9e091ff71722984984484b828a587638e7 | |
| parent | d6676348cb57ed55277f9fa9a62b623f50883207 (diff) | |
Updated get_server_details.py to return disk size in GiB.
| -rwxr-xr-x | src/com.gluster.storage.management.server.scripts/src/get_server_details.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com.gluster.storage.management.server.scripts/src/get_server_details.py b/src/com.gluster.storage.management.server.scripts/src/get_server_details.py index 312dd057..c36ff5c7 100755 --- a/src/com.gluster.storage.management.server.scripts/src/get_server_details.py +++ b/src/com.gluster.storage.management.server.scripts/src/get_server_details.py @@ -53,9 +53,9 @@ def getDiskSizeInfo(partition): if len(tokens) < 4: continue if tokens[0] == partition: - total = int(tokens[1]) / 1024.0 - used = int(tokens[2]) / 1024.0 - free = int(tokens[3]) / 1024.0 + total = int(tokens[1]) / (1024.0 * 1024.0) + used = int(tokens[2]) / (1024.0 * 1024.0) + free = int(tokens[3]) / (1024.0 * 1024.0) break if total: @@ -92,7 +92,7 @@ def getDiskSizeInfo(partition): if len(tokens) < 4: continue if tokens[0] == str(number): - total = int(tokens[3].split('kB')[0]) / 1024.0 + total = int(tokens[3].split('kB')[0]) / (1024.0 * 1024.0) break return total, used, free |
