summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/aix/memory.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/aix/memory.rb')
-rw-r--r--lib/ohai/plugins/aix/memory.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ohai/plugins/aix/memory.rb b/lib/ohai/plugins/aix/memory.rb
index 1b57d859..ed6fe975 100644
--- a/lib/ohai/plugins/aix/memory.rb
+++ b/lib/ohai/plugins/aix/memory.rb
@@ -29,8 +29,8 @@ Ohai.plugin(:Memory) do
memory[:total] = "#{total_in_mb.to_i * 1024}kB"
memory[:free] = "#{free_in_mb.to_i * 1024}kB"
- swapinfo = shell_out("swap -s").stdout.split # returns swap info in 4K blocks
- memory[:swap]["total"] = "#{(swapinfo[2].to_i) * 4}kB"
- memory[:swap]["free"] = "#{(swapinfo[10].to_i) * 4}kB"
+ swap_info = shell_out("swap -s").stdout.split # returns swap info in 4K blocks
+ memory[:swap]["total"] = "#{(swap_info[2].to_i) * 4}kB"
+ memory[:swap]["free"] = "#{(swap_info[10].to_i) * 4}kB"
end
end