Module Vmstat::Stub
In: lib/vmstat/stub.rb

This is a stub module that should be replaced by system specific implementations of the different functions. This can either be native or with other modules like {ProcFS}.

Methods

Public Class methods

Fetches the boot time of the system. @return [Time] the boot time as regular time object. @example

  Vmstat.boot_time # => 2012-10-09 18:42:37 +0200

Fetches the cpu statistics (usage counter for user, nice, system and idle) @return [Array<Vmstat::Cpu>] the array of cpu counter @example

  Vmstat.cpu # => [#<struct Vmstat::Cpu ...>, #<struct Vmstat::Cpu ...>]

Fetches the usage data and other useful disk information for the given path. @param [String] path the path (mount point or device path) to the disk @return [Vmstat::Disk] the disk information @example

  Vmstat.disk("/") # => #<struct Vmstat::Disk type=:hfs, ...>

Fetches the load average for the current system. @return [Vmstat::LoadAverage] the load average data @example

  Vmstat.load_average # => #<struct Vmstat::LoadAverage one_minute=...>

Fetches the memory usage information. @return [Vmstat::Memory] the memory data like free, used und total. @example

  Vmstat.memory # => #<struct Vmstat::Memory ...>

Fetches the information for all available network devices. @return [Array<Vmstat::NetworkInterface>] the network device information @example

  Vmstat.network_interfaces # => [#<struct Vmstat::NetworkInterface ...>, ...]

Fetches pagesize of the current system. @return [Fixnum] the pagesize of the current system in bytes. @example

  Vmstat.pagesize # => 4096

Fetches time and memory usage for the current process. @note Currently only on Mac OS X @return [Array<Vmstat::Task>] the network device information @example

  Vmstat.task # => #<struct Vmstat::Task ...>

[Validate]