Long Command Runner
This lib aims to follow a terminal command that is long to execute. It will monitor the CPU usage and the progression of the program (given by its output).
Install and usage
gem install long-command-runner
To use the library:
require 'long_command_runner'
runner = LCR::Runner.new 'for i in `seq 100`; do echo $i%; sleep 1; done'
runner.launch
# command now runs
while runner.running?
puts "Program is at: #{runner.progress} %"
end
puts 'program ended !'
documentation
Here some links: