- status = `/usr/sbin/passenger-status`
- unless $CHILD_STATUS.success?
- warn "failed executing passenger-status"
- exit 1
+ active = 0
+ inactive = 0
+
+ passenger_status.get_elements("//process").each do |process|
+ if process.text("sessions").to_i.positive?
+ active += 1
+ else
+ inactive += 1
+ end