Permalink
Browse files

allow dashes in diskstats device names to support lvm devices like dm-0

  • Loading branch information...
1 parent f5f4422 commit 943f4881dd10d589c51677fe22c114c8aee67a76 Christopher Merrick committed Feb 22, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/riemann-diskstats
View
@@ -16,7 +16,7 @@ class Riemann::Tools::Diskstats
def state
f = File.read('/proc/diskstats')
state = f.split("\n").reject { |d| d =~ /(ram|loop)/ }.inject({}) do |s, line|
- if line =~ /^(?:\s+\d+){2}\s+([\w\d]+) (.*)$/
+ if line =~ /^(?:\s+\d+){2}\s+([\w\d\-]+) (.*)$/
dev = $1
['reads reqs',

0 comments on commit 943f488

Please sign in to comment.