From 0476fa7bc0c48989c48aa0f55115e27bc605ed74 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Thu, 22 Jun 2017 17:42:47 -0400 Subject: [PATCH] Add server MB usage to rake evm:status and status_full. --- lib/tasks/evm_application.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/tasks/evm_application.rb b/lib/tasks/evm_application.rb index bce91035700..395b664f7e3 100644 --- a/lib/tasks/evm_application.rb +++ b/lib/tasks/evm_application.rb @@ -81,11 +81,12 @@ def self.output_servers_status(servers) s.drb_uri, s.started_on && s.started_on.iso8601, s.last_heartbeat && s.last_heartbeat.iso8601, + (mem = (s.proportional_set_size || s.memory_usage)).nil? ? "" : mem / 1.megabyte, s.is_master, s.active_role_names.join(':'), ] end - header = ["Zone", "Server", "Status", "ID", "PID", "SPID", "URL", "Started On", "Last Heartbeat", "Master?", "Active Roles"] + header = ["Zone", "Server", "Status", "ID", "PID", "SPID", "URL", "Started On", "Last Heartbeat", "MB Usage", "Master?", "Active Roles"] puts data.unshift(header).tableize end