diff options
| author | Ralph Bean <rbean@redhat.com> | 2013-07-30 01:40:54 +0000 |
|---|---|---|
| committer | Ralph Bean <rbean@redhat.com> | 2013-07-30 01:41:14 +0000 |
| commit | 3e43c3f30a685893f0499c3732249d8fbbbcdb59 (patch) | |
| tree | 0a38fef55dcbd88a3afab4c03e8e76dcee17ca2f /scripts | |
| parent | ae85cbcaed87c557a86ce8063f4286cdee4e0099 (diff) | |
| download | ansible-3e43c3f30a685893f0499c3732249d8fbbbcdb59.tar.gz ansible-3e43c3f30a685893f0499c3732249d8fbbbcdb59.tar.xz ansible-3e43c3f30a685893f0499c3732249d8fbbbcdb59.zip | |
Hopefully correct my cpu math.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/ans-vhost-freemem | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/ans-vhost-freemem b/scripts/ans-vhost-freemem index c5c4dd71f..7fd014717 100755 --- a/scripts/ans-vhost-freemem +++ b/scripts/ans-vhost-freemem @@ -70,8 +70,7 @@ for hn in sorted(res['contacted']): if 'failed' in res['contacted'][hn] and res['contacted'][hn]['failed']: continue mem_per_host[hn] = int(res['contacted'][hn]['phymemory']) - cpu_per_host[hn] = int(res['contacted'][hn]['cpus']) * \ - int(res['contacted'][hn]['cpucores']) + cpu_per_host[hn] = int(res['contacted'][hn]['cpus']) ans = ansible.runner.Runner( @@ -106,7 +105,7 @@ for hn in sorted(res['contacted']): for hn in sorted(mem_per_host): freemem = mem_per_host[hn] - mem_used_in_vm[hn] freecpu = cpu_per_host[hn] - cpu_used_in_vm[hn] - print '%s:\t%s mem\t%s/%s cores' % ( + print '%s:\t%s mem\t%s/%s cpus' % ( hn, freemem, freecpu, cpu_per_host[hn]) |
