Class: DogNotGod::Commands::LoadStats
- Inherits:
-
ClientCommand
- Object
- ClientCommand
- DogNotGod::Commands::LoadStats
- Defined in:
- lib/client_commands.rb
Overview
Load average statistics
Instance Method Summary collapse
Methods inherited from ClientCommand
#get_hostname_from_shell, #run!
Instance Method Details
#_execute ⇒ Object
58 59 60 |
# File 'lib/client_commands.rb', line 58 def _execute @resource["/load_stats"].post({:load_5_min => @load_averages[0], :load_10_min => @load_averages[1], :load_15_min => @load_averages[2], :hostname => @hostname}) end |
#_prepare ⇒ Object
53 54 55 56 |
# File 'lib/client_commands.rb', line 53 def _prepare @hostname = get_hostname_from_shell @load_averages = get_load_averages_from_shell end |