Commit ec915f2c authored by Ivo De Decker's avatar Ivo De Decker

Disable dmd when system load too high.

Signed-off-by: Ivo De Decker's avatarIvo De Decker <ivodd@debian.org>
parent fce36b53
#!/usr/bin/ruby
load = IO::read('/proc/loadavg').split[1].to_f
if load > 20
puts "Content-type: text/html\n\n"
puts "<p><b>Current system load (#{load}) is too high. Please retry later!</b></p>"
exit(0)
end
$LOAD_PATH.unshift File.dirname(__FILE__) + '/inc'
#STDERR.reopen(STDOUT) #makes live debugging easier
#puts "Content-type: text/plain\n\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment