Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2013-02-28 15:25:49 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2013-02-28 15:25:49 (GMT)
commite58485b531813bc80b62b7462d2875fd40681e29 (patch)
tree557b2ca22c6edec8071f34a734d64202430bc568
parent1261e25c4b20498e9b51254b224d047228958c36 (diff)
Make diagnostics page more useful in SL environment
-rw-r--r--lib/gitorious/diagnostics.rb6
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