# File lib/mcollective/application/inventory.rb, line 29
  def get_collectives
    util = rpcclient("rpcutil")
    util.progress = false

    collectives = {}
    nodes = 0
    total = 0

    util.collective_info do |r, cinfo|
      begin
        if cinfo[:data] && cinfo[:data][:collectives]
          cinfo[:data][:collectives].each do |collective|
            collectives[collective] ||= []
            collectives[collective]  << cinfo[:sender]
          end

          nodes += 1
          total += 1
        end
      end
    end

    {:collectives => collectives, :nodes => nodes, :total_nodes => total}
  end