Class: MotdForge::SystemStats
- Inherits:
-
Object
- Object
- MotdForge::SystemStats
- Defined in:
- lib/motd_forge/system_stats.rb
Overview
Reads uptime, disk, and memory usage from the host. Uses /proc on Linux,
with a best-effort shell fallback (e.g. uptime) elsewhere.
Defined Under Namespace
Classes: Snapshot
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.capture ⇒ Object
9 10 11 |
# File 'lib/motd_forge/system_stats.rb', line 9 def self.capture new.capture end |
Instance Method Details
#capture ⇒ Object
13 14 15 |
# File 'lib/motd_forge/system_stats.rb', line 13 def capture Snapshot.new(uptime, disk_usage_percent, *memory) end |