Skip to content

Commit

Permalink
Add memory usage to worker status
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Jun 16, 2017
1 parent 471de63 commit 5be3b45
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tasks/evm_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,12 @@ def self.output_workers_status(servers)
w.miq_server_id,
w.queue_name || w.uri,
w.started_on && w.started_on.iso8601,
w.last_heartbeat && w.last_heartbeat.iso8601]
w.last_heartbeat && w.last_heartbeat.iso8601,
(mem = (w.proportional_set_size || w.memory_usage)).nil? ? "" : mem / 1.megabyte]
end
end

header = ["Worker Type", "Status", "ID", "PID", "SPID", "Server id", "Queue Name / URL", "Started On", "Last Heartbeat"]
header = ["Worker Type", "Status", "ID", "PID", "SPID", "Server id", "Queue Name / URL", "Started On", "Last Heartbeat", "MB Usage"]
puts data.unshift(header).tableize unless data.empty?
end

Expand Down

0 comments on commit 5be3b45

Please sign in to comment.