File: tmp

package info (click to toggle)
bindgraph 0.2a-6
  • links: PTS
  • area: main
  • in suites: sid
  • size: 292 kB
  • sloc: perl: 975; sh: 189; makefile: 8
file content (33 lines) | stat: -rw-r--r-- 992 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--- bindgraph.cgi.orig	2006-05-11 01:57:22.000000000 +0200
+++ bindgraph.cgi	2006-06-24 17:57:24.000000000 +0200
@@ -67,7 +67,7 @@
 		"DEF:$_=$rrd:$_:AVERAGE",
 		"DEF:m$_=$rrd:$_:MAX",
 		"CDEF:r$_=$_,60,*",
-		# "CDEF:rm$_=m$_,60,*",
+		"CDEF:rm$_=m$_,60,*",
 		"CDEF:d$_=$_,UN,0,$_,IF,$step,*",
 		"CDEF:s$_=PREV,UN,d$_,PREV,IF,d$_,+"
 	) } @query_t;
@@ -93,6 +93,11 @@
 		}
 	}
 
+	my $date = localtime(time);
+        $date =~ s|:|\\:|g unless $RRDs::VERSION < 1.199908;
+	my $last = localtime(last_update($rrd));
+        $last =~ s|:|\\:|g unless $RRDs::VERSION < 1.199908;
+
 	my ($text, $xs, $ys) = RRDs::graph(
 		$file,
 		'--imgformat', 'PNG',
@@ -106,8 +111,7 @@
 		@rrdef,
 		@rrprint,
 		'COMMENT:\s',
-		'COMMENT:last update: ' . localtime(last_update($rrd))
-			. '    graph created on ' . localtime(time) . '\r',
+		'COMMENT:last update\: ' . $last . '    graph created on ' .$date . '\r',
 	);
 	my $err = RRDs::error;
 	die_fatal("RRDs::graph($file, ...): $err") if $err;