Printing some metrics from a Windows machine
Some general pointers:

Refrain from using tmp as variable names. raw_output will do the job better.

Working with arrays as object replacement (x[0] is the caption, x[1] is the type...) is cumbersome, unreadable, and difficult to maintain. I suggest moving to Hash:

tmp.map(&amp;:split).select { |_, drivetype, _, _| drivetype.to_i == 3 }.map do |caption, drivetype, freespace, size|
  {
    caption: caption,
    drivetype: drivetype,
    freespace: (freespace.to_f/bytes_to_gbytes).round(2),
    size: (size.to_f/bytes_to_gbytes).round(2),
    usedspace: ((size.to_f - freespace.to_f)/bytes_to_gbytes).round(2)
  }
end


This code returns an array of hashes, one for each disk with drivetype '3'. The variables (caption, drivetype, etc...) are created when ruby translates the array to the list of variables declared, so actually the tmp.map(&amp;:split).map { |caption, drivetype, freespace, size| ... } is like saying:

tmp.map do |disk|
  disk = disk.split
  caption = data[0]
  drivetype = data[1]
  freespace = data[2]
  size = data[3]
  ...
end