Module: Vmstat::Stub
- Included in:
- Vmstat
- Defined in:
- lib/vmstat/stub.rb
Overview
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.
Class Method Summary collapse
-
.boot_time ⇒ Time
Fetches the boot time of the system.
-
.cpu ⇒ Array<Vmstat::Cpu>
Fetches the cpu statistics (usage counter for user, nice, system and idle).
-
.disk(path) ⇒ Vmstat::Disk
Fetches the usage data and other useful disk information for the given path.
-
.load_average ⇒ Vmstat::LoadAverage
Fetches the load average for the current system.
-
.memory ⇒ Vmstat::Memory
Fetches the memory usage information.
-
.network_interfaces ⇒ Array<Vmstat::NetworkInterface>
Fetches the information for all available network devices.
-
.pagesize ⇒ Fixnum
Fetches pagesize of the current system.
-
.task ⇒ Array<Vmstat::Task>
Fetches time and memory usage for the current process.
Class Method Details
.boot_time ⇒ Time
Fetches the boot time of the system.
10 11 12 |
# File 'lib/vmstat/stub.rb', line 10 def self.boot_time nil end |
.cpu ⇒ Array<Vmstat::Cpu>
Fetches the cpu statistics (usage counter for user, nice, system and idle)
18 19 20 |
# File 'lib/vmstat/stub.rb', line 18 def self.cpu [] end |
.disk(path) ⇒ Vmstat::Disk
Fetches the usage data and other useful disk information for the given path.
27 28 29 |
# File 'lib/vmstat/stub.rb', line 27 def self.disk(path) nil end |
.load_average ⇒ Vmstat::LoadAverage
Fetches the load average for the current system.
35 36 37 |
# File 'lib/vmstat/stub.rb', line 35 def self.load_average nil end |
.memory ⇒ Vmstat::Memory
Fetches the memory usage information.
43 44 45 |
# File 'lib/vmstat/stub.rb', line 43 def self.memory nil end |
.network_interfaces ⇒ Array<Vmstat::NetworkInterface>
Fetches the information for all available network devices.
51 52 53 |
# File 'lib/vmstat/stub.rb', line 51 def self.network_interfaces [] end |
.pagesize ⇒ Fixnum
Fetches pagesize of the current system.
59 60 61 |
# File 'lib/vmstat/stub.rb', line 59 def self.pagesize 4096 end |
.task ⇒ Array<Vmstat::Task>
Currently only on Mac OS X
Fetches time and memory usage for the current process.
68 69 70 |
# File 'lib/vmstat/stub.rb', line 68 def self.task nil end |