Class: StressReporter::Actions::Xmanager

Inherits:
Object
  • Object
show all
Defined in:
lib/stress_reporter/actions/xmanager.rb

Overview

Reports on passenger usage by calling passenger-status (pid and current request)

TODO: We should not assume that xm_last_url_for_pid are in /tmp

TODO: Spawning passenger-status is slow, probably we should include the passenger gem and use its methods.

Constant Summary collapse

CMD =
"passenger-status"
PID_REGEX =
/PID:\s*(\d+)/

Class Method Summary collapse

Class Method Details

.reportArray<String>

Report lines

Returns:

  • (Array<String>)


20
21
22
23
24
25
26
# File 'lib/stress_reporter/actions/xmanager.rb', line 20

def self.report
  out = []
  Xmanager.current_requests.each_pair do |pid, url|
    out << "PID:\t#{ pid }\tREQUEST:\t#{ url }"
  end
  out
end