add timing information

This commit is contained in:
Vincent Riquer 2015-02-01 04:30:51 +01:00
parent 3fc1a4c679
commit 38c9949dd7

20
index
View File

@ -60,8 +60,7 @@ then
-d @$(rrdtool last ingress.rrd) -d @$(rrdtool last ingress.rrd)
) )
Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d '1 hour') Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d '1 hour')
Cache-Control: max-age=0, must-revalidate refresh: 10
refresh: 600
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
@ -72,6 +71,12 @@ then
<link rel="stylesheet" type="text/css" href="/ingrrd.css" /> <link rel="stylesheet" type="text/css" href="/ingrrd.css" />
</head> </head>
<body> <body>
<div style="font-size:10px; color:#606060; text-align:right; position:absolute; top:12px; right:0px;">
EOHTML
times
date '+%Y-%m-%d %H:%M:%S'
cat <<-EOHTML
</div>
<div style="width:$(( graph_width + 97 ))px" class="container"> <div style="width:$(( graph_width + 97 ))px" class="container">
EOHTML EOHTML
@ -137,6 +142,7 @@ then
for level in {1..16} for level in {1..16}
do do
prevtimestamp=$maxtimestamp
never=0 never=0
maxtimestamp=0 maxtimestamp=0
tableline=() tableline=()
@ -297,11 +303,14 @@ then
echo "${tableline[@]}" echo "${tableline[@]}"
if (( level > curlevel )) if (( level > curlevel ))
then then
(( maxtimestamp < prevtimestamp )) \
&& maxtimestamp=$prevtimestamp
cat <<-EOHTML cat <<-EOHTML
<td class="date">$(date +%Y-%m-%d -d @$maxtimestamp)</td> <td class="date">$(date +%Y-%m-%d -d @$maxtimestamp)</td>
EOHTML EOHTML
fi fi
echo '</tr>' echo '</tr>'
prevtimestamp=$maxtimestamp
done done
cat <<-EOHTML cat <<-EOHTML
</table> </table>
@ -461,6 +470,12 @@ then
</table> </table>
</div> </div>
</div> </div>
<div style="font-size:10px; color:#606060; text-align:right; position:absolute; top:24px; right:0px;">
EOHTML
times
date '+%Y-%m-%d %H:%M:%S'
cat <<-EOHTML
</div>
</body></html> </body></html>
EOHTML EOHTML
else else
@ -472,7 +487,6 @@ else
-d @$(rrdtool last ingress.rrd) -d @$(rrdtool last ingress.rrd)
) )
Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d '1 hour') Expires: $(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d '1 hour')
Cache-Control: max-age=0, must-revalidate
EOHEAD EOHEAD