# File lib/facter/util/processor.rb, line 17
  def self.aix_processor_list
    return_value = []
    aix_proc_id_list = []

    if output = lsdev then
      output.split("\n").each do |line|
        if match = line.match(/proc\d+/)
          aix_proc_id_list << match[0]
        end
      end
    end

    # Generalized alphanumeric sort to put "proc12" behind "proc4"
    padding = 8
    aix_proc_id_list = aix_proc_id_list.sort do |a,b|
      a,b = [a,b].map do |s|
        s.gsub(/\d+/) { |m| "0"*(padding - m.size) + m }
      end
      a<=>b
    end

    aix_proc_id_list.each do |proc_id|
      if output = lsattr("lsattr -El #{proc_id} -a type")
        if match = output.match(/type\s+([^\s]+)\s+Processor/i)
          return_value << match[1]
        end
      end
    end

    return_value
  end