X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/94d361b83b4d5cf2b5807684d1bb50f82fbb6b7b..f7546eabebf1b335815bf9c5de2dd7689ac143e1:/cookbooks/tile/templates/default/debug.erb?ds=sidebyside diff --git a/cookbooks/tile/templates/default/debug.erb b/cookbooks/tile/templates/default/debug.erb index d9fc329b3..03af6549f 100755 --- a/cookbooks/tile/templates/default/debug.erb +++ b/cookbooks/tile/templates/default/debug.erb @@ -4,8 +4,10 @@ import cgi import cgitb import os +import re import sys import resource +import time # HTML Debug of errors cgitb.enable() @@ -47,6 +49,12 @@ def output_error(message): if not os.environ.has_key('HTTP_USER_AGENT'): os.environ['HTTP_USER_AGENT'] = 'NONE' +# Get the cache server name +if os.environ.has_key('HTTP_VIA'): + cache_server = re.search('[a-z0-9-]+\.openstreetmap\.org', os.environ['HTTP_VIA']).group(0) +else: + cache_server = None + # Get the load average loadavg = float(open("/proc/loadavg").readline().split(" ")[0]) @@ -58,9 +66,24 @@ print "" print "
" print "Cache Server: %s
" % cache_server +print ""
+print "Render Server: <%= node['fqdn'] %>
"
+print "Load Average: %s
"
-print "Render Server:<%= node['fqdn'] %>
"
-print "Load Average:%s
" for param in os.environ.keys():