class Unifiap
Public Instance Methods
Source
# File lib/oxidized/model/unifiap.rb, line 127 def ntpskew(cfg) index = skew = nil cfg.each_line do |line| # Look for the header just before the stats line, and find which number is skew if line.match(/^\s*[a-z]+\s+[a-z]+\s+[a-z]+\s+[a-z]+/i) words = line.split index = words.map(&:downcase).index("skew") end # Now look for the single stats line and grab the skew if !index.nil? && line.match(/^\s*[\d.]+\s+[\d.]+\s+[\d.]+\s+[\d.]+/) numbers = line.split skew = numbers[index] end end skew end
NTPskew: Return the skew in micro seconds from the ntpclient output