def _autodetect_collector_command_path(name)
    pathdirs = ENV["PATH"].split(":")
    name = 'pancollect-' + name
    pathdirs.each{|basepath|
      path = File.join(basepath, name)
      logger.debug "checking path #{path}"
      return path if File.exists?(path)
    }
    return nil
  end
def _autodetect_collector_command_path(name)
    pathdirs = ENV["PATH"].split(":")
    name = 'pancollect-' + name
    pathdirs.each{|basepath|
      path = File.join(basepath, name)
      logger.debug "checking path #{path}"
      return path if File.exists?(path)
    }
    return nil
  end
Searches for 'pancollect-' executables in $PATH
 Returns nil if no command found