diff options
Diffstat (limited to 'lib/gitorious/diagnostics.rb')
-rw-r--r-- | lib/gitorious/diagnostics.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitorious/diagnostics.rb b/lib/gitorious/diagnostics.rb index 6f76c4a..b3fa5ba 100644 --- a/lib/gitorious/diagnostics.rb +++ b/lib/gitorious/diagnostics.rb @@ -114,7 +114,7 @@ module Gitorious end def web_interface_reachable? - `curl --silent localhost:80 | grep Gitorious | wc -l`.to_i > 0 + `curl --silent #{GitoriousConfig['gitorious_host']}:80 | grep Gitorious | wc -l`.to_i > 0 end def git_user_ok? @@ -237,7 +237,9 @@ module Gitorious free_numbers = `free -mt | tail -n 1`.chomp.split(" ") total = free_numbers[1].to_i free = free_numbers[3].to_i - percent_free = (free*100)/total + buffer_numbers = `free -mt | grep cache:`.chomp.split(" ") + buffer_free = buffer_numbers[3].to_i + percent_free = ((free + buffer_free)*100)/total return (percent_free > (100-MAX_HEALTHY_RAM_USAGE)) end |