lib/cloud_crowd/node.rb
# Launch a monitoring thread that periodically checks the node's load
# average and the amount of free memory remaining. If we transition out of
# the overloaded state, let central know.
Launch a monitoring thread that periodically checks the node's load
average and the amount of free memory remaining. If we transition out of
the overloaded state, let central know.
Launch a monitoring thread that periodically checks the node ' s load average and the amount of free memory remaining . If we transition out of the overloaded state let central know .
def monitor_system
      @monitor_thread = Thread.new do
        loop do
          was_overloaded = @overloaded
          @overloaded = overloaded?
          check_in if was_overloaded && !@overloaded
          sleep MONITOR_INTERVAL
        end
      end
    end
def monitor_system @monitor_thread = Thread . new do loop do was_overloaded = @overloaded @overloaded = overloaded? check_in if was_overloaded && ! @overloaded sleep MONITOR_INTERVAL end end end
Launch a monitoring thread that periodically checks the node's load
average and the amount of free memory remaining.
Launch a monitoring thread that periodically checks the node ' s load average and the amount of free memory remaining .