Advertisement
Guest User

Untitled

a guest
Jun 13th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. for list in `ls | grep rrd`
  4.  
  5. rrd_out = `rrdtool fetch ./switch01_traffic.rrd AVERAGE`
  6.  
  7. # remove ':' after timestamp
  8. rrd_fixed = rrd_out.gsub(':','')
  9.  
  10. # print corrected output
  11. rrd_fixed.each do |line|
  12. puts list,line.gsub(' ', ',')
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement