1 |
tdb |
1.1 |
<html> |
2 |
|
|
|
3 |
|
|
<head> |
4 |
|
|
<meta http-equiv="Refresh" content="300"> |
5 |
|
|
<title>i-scream system monitoring</title> |
6 |
|
|
</head> |
7 |
|
|
|
8 |
|
|
<body> |
9 |
|
|
|
10 |
|
|
<font face="Arial"> |
11 |
|
|
|
12 |
|
|
<h2>i-scream system monitoring</h2> |
13 |
|
|
|
14 |
|
|
<?php |
15 |
|
|
|
16 |
|
|
# directory where the graphs are placed by rrd |
17 |
|
|
$directory = "/home/tdb/public_html/rrd"; |
18 |
|
|
|
19 |
|
|
# include nice function to get a directory listing |
20 |
|
|
include("iutils.inc.php"); |
21 |
|
|
|
22 |
|
|
# if $graph is defined, we're doing a detailed view of one queue |
23 |
|
|
if($graph && $machine) { |
24 |
|
|
print <<<EOF |
25 |
|
|
<p><a href="index.php">Back to summary</a></p> |
26 |
|
|
<p>Last 3 hours :<br><img border="0" src="$machine/$graph-3h.png"></p> |
27 |
|
|
<p>Last day :<br><img border="0" src="$machine/$graph-1d.png"></p> |
28 |
|
|
<p>Last week :<br><img border="0" src="$machine/$graph-1w.png"></p> |
29 |
|
|
<p>Last month :<br><img border="0" src="$machine/$graph-1m.png"></p> |
30 |
|
|
|
31 |
|
|
EOF; |
32 |
|
|
} |
33 |
|
|
# if $machine is defined, we'll just show one machine |
34 |
|
|
elseif($machine) { |
35 |
|
|
print <<<EOF |
36 |
|
|
|
37 |
|
|
<p> |
38 |
|
|
Each graph shows the last 3 hours of data for an individual resource.<br> |
39 |
|
|
To view longer term data for a particular resource, click on the graph. |
40 |
|
|
</p> |
41 |
|
|
<h3>$machine</h3> |
42 |
|
|
|
43 |
|
|
EOF; |
44 |
|
|
$file_array = getdirArray("$directory/$machine",'asort'); |
45 |
|
|
foreach($file_array as $file_name) { |
46 |
|
|
# look for the given machine only |
47 |
|
|
if(preg_match("/^(\S+)\-3h.png$/", $file_name, $matches)) { |
48 |
|
|
print <<<EOF |
49 |
|
|
<p> |
50 |
|
|
<a href="index.php?machine=$machine&graph=$matches[1]"> |
51 |
|
|
<img border="0" src="$machine/$file_name"> |
52 |
|
|
</a> |
53 |
|
|
</p> |
54 |
|
|
|
55 |
|
|
EOF; |
56 |
|
|
} |
57 |
|
|
} |
58 |
|
|
} |
59 |
|
|
else { |
60 |
|
|
print <<<EOF |
61 |
|
|
|
62 |
|
|
<p> |
63 |
|
|
Here are a list of the machines for which we have data. Please select one. |
64 |
|
|
</p> |
65 |
|
|
|
66 |
|
|
<ul> |
67 |
|
|
|
68 |
|
|
EOF; |
69 |
|
|
|
70 |
|
|
$file_array = getdirArray($directory,'asort'); |
71 |
|
|
foreach($file_array as $file_name) { |
72 |
|
|
if(is_dir($file_name)) { |
73 |
|
|
print <<<EOF |
74 |
|
|
|
75 |
|
|
|
76 |
|
|
<li> |
77 |
|
|
<a href="index.php?machine=$file_name"> |
78 |
|
|
$file_name |
79 |
|
|
</a> |
80 |
|
|
</li> |
81 |
|
|
|
82 |
|
|
EOF; |
83 |
|
|
} |
84 |
|
|
} |
85 |
|
|
print "\n </ul>\n"; |
86 |
|
|
} |
87 |
|
|
?> |
88 |
|
|
|
89 |
|
|
<p> |
90 |
|
|
FRONTEND: <a href="http://kernow.ukc.ac.uk/~iscream/"> http://kernow.ukc.ac.uk/~iscream/</a><br> |
91 |
tdb |
1.2 |
URL: <a href="http://www.i-scream.org/">http://www.i-scream.org/</a> |
92 |
tdb |
1.1 |
</p> |
93 |
|
|
<a href="http://rrdtool.eu.org/"> |
94 |
|
|
<img border="0" src="rrdtool.gif"> |
95 |
|
|
</a> |
96 |
|
|
|
97 |
|
|
</font> |
98 |
|
|
|
99 |
|
|
</body> |
100 |
|
|
|
101 |
|
|
</html> |