Method: Vmstator::Parser#parse
- Defined in:
-
lib/vmstator.rb,
lib/vmstator/linux/parser.rb
parse() parses the the vmstat command with optional vmstat command-line flags which is passed in as a string
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vmstator.rb', line 22 def parse(flags=false) if RUBY_PLATFORM =~ /darwin/i return parse_macos elsif RUBY_PLATFORM =~ /linux/i return parse_linux(flags) elsif RUBY_PLATFORM =~ /win32|win64|\.NET|windows|cygwin|mingw32/i raise Vmstator::VmstatError.new("This platform is not supported. Yet!?") else raise Vmstator::VmstatError.new("Unable to parse vmstat on this platform!") end end |