def request_stats(options)
      # Determine candidate agents
      agent_names = if options[:agent_name]
        [options[:agent_name]]
      else
        AgentConfig.cfg_agents
      end
      fail("No agents configured") if agent_names.empty?

      # Request stats from agents
      count = 0
      agent_names.each do |agent_name|
        begin
          count += 1 if request_agent_stats(agent_name, options)
        rescue Exception => e
          $stderr.puts "Command to #{agent_name} agent failed (#{e})" unless e.is_a?(SystemExit)
        end
      end
      $stderr.puts("No agents running") if count == 0
    end
def request_stats(options)
      # Determine candidate agents
      agent_names = if options[:agent_name]
        [options[:agent_name]]
      else
        AgentConfig.cfg_agents
      end
      fail("No agents configured") if agent_names.empty?

      # Request stats from agents
      count = 0
      agent_names.each do |agent_name|
        begin
          count += 1 if request_agent_stats(agent_name, options)
        rescue Exception => e
          $stderr.puts "Command to #{agent_name} agent failed (#{e})" unless e.is_a?(SystemExit)
        end
      end
      $stderr.puts("No agents running") if count == 0
    end
Request and display statistics for agents

 === Parameters
 options(Hash):: Command line options

 === Return
 true:: Always return true