summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/_emerge/actions.py')
-rw-r--r--pym/_emerge/actions.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index ac9a60fc0..589680a51 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -25,6 +25,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
'portage.dbapi._similar_name_search:similar_name_search',
'portage.debug',
'portage.news:count_unread_news,display_news_notifications',
+ 'portage.util._get_vm_info:get_vm_info',
'_emerge.chk_updated_cfg_files:chk_updated_cfg_files',
'_emerge.help:help@emerge_help',
'_emerge.post_emerge:display_news_notification,post_emerge',
@@ -1488,6 +1489,18 @@ def action_info(settings, trees, myopts, myfiles):
append(header_width * "=")
append("System uname: %s" % (platform.platform(aliased=1),))
+ vm_info = get_vm_info()
+ if "ram.total" in vm_info:
+ line = "%-9s %10d total" % ("KiB Mem:", vm_info["ram.total"] / 1024)
+ if "ram.free" in vm_info:
+ line += ",%10d free" % (vm_info["ram.free"] / 1024,)
+ append(line)
+ if "swap.total" in vm_info:
+ line = "%-9s %10d total" % ("KiB Swap:", vm_info["swap.total"] / 1024)
+ if "swap.free" in vm_info:
+ line += ",%10d free" % (vm_info["swap.free"] / 1024,)
+ append(line)
+
lastSync = portage.grabfile(os.path.join(
settings["PORTDIR"], "metadata", "timestamp.chk"))
if lastSync: