4 require "rexml/document"
7 @passenger_status ||= REXML::Document.new(`/usr/sbin/passenger-status --show=xml`)
12 graph_args --lower-limit 0
13 graph_category passenger
14 graph_title Passenger queues
21 groups = passenger_status.get_elements("//supergroup").map do |supergroup|
22 supergroup.text("name")
25 groups.sort.each do |name|
26 puts "#{name}.label #{name}"
27 puts "#{name}.draw STACK"
32 global = passenger_status.text("/item/get_wait_list").to_i
34 puts "global.value #{global}"
36 passenger_status.get_elements("//supergroup").each do |supergroup|
37 name = supergroup.text("name")
38 queue = supergroup.text("get_wait_list").to_i
40 puts "#{name}.value #{queue}"
44 if ARGV[0] == "config"