Project

vmstator

0.0
No commit activity in last 3 years
No release in over 3 years
Vmstator is a Ruby API for vmstat to monitor virtual memory statistics. It provides an OO interface to be able to parse the contents of the output of vmstat and access that infromation intuitively.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
~> 10.0
~> 3.0
 Project Readme

Vmstator

Vmstator is a Ruby API for vmstat. It provides an OO interface to be able to parse the contents of the output of vmstat and access that infromation intuitively.

Supported Platforms

Debian

Currently working on / testing on Debian GNU/Linux 8 using vmstat from procps-ng 3.3.9.

macOS Sierra

Recently added support for the osx/macOS command vm_stat.

Screen Shot

Debian ( using Vagrant )

screenshot

macOS Sierra

screenshot

Installation

$ gem install vmstator

Usage

Still working on this bit, but, for the mean time...

Typical Use

require 'vmstator'

parser = Vmstator::Parser.new

# Parse command-line arguments to vmstat.
parser.parse("-a")

# Access the command-line arguments directly as methods.
parser.active

# Other Vmstator methods for vmstat:
parser.active
parser.average  
parser.disk_statistics  
parser.disk_summary  
parser.event_counter_statistics  
parser.forks  
parser.parse  
parser.slab_info  
parser.version

# If returns a Vmstator object, for example, for active memory "-a" ...
active_memory = parser.active

# Example, the available methods to access data about Vmstator::ActiveMemory objects.
active_memory.blocks_recv  
active_memory.buffer  
active_memory.cntxt_swtchs  
active_memory.idle_time   
active_memory.kernel      
active_memory.runnable  
active_memory.swapped_in  
active_memory.uninter  
active_memory.used   
active_memory.blocks_sent  
active_memory.cache   
active_memory.free          
active_memory.interrupts  
active_memory.non_kernel  
active_memory.stolen    
active_memory.swapped_to  
active_memory.update   
active_memory.waiting

# Types of Vmstator objects:
ActiveMemory   
Cache  
DiskStatistics  
EventCounterStatistics  
Memory  
SlabInfo  
AverageMemory  
Disk   
DiskSummary     
Parser  
Stats     
VmstatError

License

The gem is available as open source under the terms of the MIT License.