From db8c5b1ab9ca142eaf27f7cf425759ca78dbdc65 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 10 Sep 2013 11:10:50 +0100 Subject: [PATCH] Tile: add file mtime to debug cgi --- cookbooks/tile/templates/default/debug.erb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cookbooks/tile/templates/default/debug.erb b/cookbooks/tile/templates/default/debug.erb index 5b81db0ef..dbbf91d38 100755 --- a/cookbooks/tile/templates/default/debug.erb +++ b/cookbooks/tile/templates/default/debug.erb @@ -6,6 +6,7 @@ import cgitb import os import sys import resource +import time # HTML Debug of errors cgitb.enable() @@ -61,6 +62,19 @@ print "

Server Stats

" print "

" print "Render Server: <%= node['fqdn'] %>
" print "Load Average: %s

" % loadavg +print "

File Status

" +print "

" +<% +node[:tile][:data].each do |name,data| + url = data[:url] + file = "/srv/tile.openstreetmap.org/data/#{File.basename(url)}" + file_basename = File.basename(url) +-%> +print "%s last modified: %s" % (<%= file_basename %>, time.ctime(os.path.getmtime(<%= file %>))) +<% +end +-%> +print "

" print "

Browser Request Headers

" print "

" for param in os.environ.keys(): -- 2.39.5