lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.15 vs lib/reporter/default/stats_disk.rb in onering-report-plugins-0.0.16
- old
+ new
@@ -46,11 +46,11 @@
# LVM
#
vg = {}
# volume groups
- IO.popen("vgdisplay -c").lines.each do |line|
+ IO.popen("vgdisplay -c 2> /dev/null").lines.each do |line|
line = line.strip.chomp.split(':')
vg[line[0]] = {
:name => line[0],
:uuid => line[16],
@@ -65,11 +65,11 @@
:disks => []
}
end
# logical volumes
- IO.popen("lvdisplay -c").lines.each do |line|
+ IO.popen("lvdisplay -c 2> /dev/null").lines.each do |line|
line = line.strip.chomp.split(':')
unless vg[line[1]].nil?
vg[line[1]][:volumes] << {
:name => line[0],
@@ -80,10 +80,10 @@
end
end
# physical volumes
- IO.popen("pvdisplay -c").lines.each do |line|
+ IO.popen("pvdisplay -c 2> /dev/null").lines.each do |line|
line = line.strip.chomp.split(':')
unless vg[line[1]].nil?
vg[line[1]][:disks] << {
:name => line[0],
\ No newline at end of file