Skip to content

Commit

Permalink
Merge pull request #15375 from jrafanie/add_memory_information_to_evm…
Browse files Browse the repository at this point in the history
…_status

Add memory usage to worker status in rake evm:status and status_full
  • Loading branch information
gtanzillo committed Jun 16, 2017
2 parents 8729c6e + 5be3b45 commit e8e6c8d
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 e8e6c8d

Please sign in to comment.