Skip to content

Commit

Permalink
Merge pull request #17016 from kbrock/evm_status_thresholds
Browse files Browse the repository at this point in the history
Display thresholds in evm_status for workers
  • Loading branch information
carbonin authored Feb 26, 2018
2 parents 2e96a1b + 3bb1e91 commit 4fcd3da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tasks/evm_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def self.output_servers_status(servers)
def self.output_workers_status(servers)
data = []
servers.each do |s|
mb_usage = w.proportional_set_size || w.memory_usage
mb_threshold = w.worker_settings[:memory_threshold]
s.miq_workers.order(:type).each do |w|
data <<
[w.type,
Expand All @@ -104,7 +106,7 @@ def self.output_workers_status(servers)
w.queue_name || w.uri,
w.started_on && w.started_on.iso8601,
w.last_heartbeat && w.last_heartbeat.iso8601,
(mem = (w.unique_set_size || w.memory_usage)).nil? ? "" : mem / 1.megabyte]
mb_usage ? "#{mb_usage / 1.megabyte}/#{mb_threshold / 1.megabyte}" : ""]
end
end

Expand Down

0 comments on commit 4fcd3da

Please sign in to comment.