ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/reports/queuegraphing/index.php
Revision: 1.1
Committed: Sun Oct 21 16:52:41 2001 UTC (23 years, 1 month ago) by tdb
Branch: MAIN
Log Message:
An experimental go at using rrdtool to graph i-scream data. Graphing the
Queue's seem like a good idea, as this wasn't done anywhere else. The
README file gives details on how this works.

File Contents

# User Rev Content
1 tdb 1.1 <html>
2    
3     <head>
4     <meta http-equiv="Refresh" content="300">
5     <title>i-scream queue monitoring</title>
6     </head>
7    
8     <body>
9    
10     <font face="Arial">
11    
12     <h2>i-scream queue monitoring</h2>
13    
14     <?php
15    
16     # directory where the graphs are placed by rrd
17     $directory = "/web/cs/docs/people/staff/tdb/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) {
24     print <<<EOF
25     <p><a href="index.php">Back to summary</a></p>
26     <p>Last 3 hours :<br><img border="0" src="$graph-3h.png" width="495" height="172"></p>
27     <p>Last day :<br><img border="0" src="$graph-1d.png" width="495" height="172"></p>
28     <p>Last week :<br><img border="0" src="$graph-1w.png" width="495" height="172"></p>
29     <p>Last month :<br><img border="0" src="$graph-1m.png" width="495" height="172"></p>
30    
31     EOF;
32     }
33     # if not, we'll do a summary of all of them
34     else {
35     print <<<EOF
36    
37     <p>
38     Each graph shows the last 3 hours of data for an individual queue.<br>
39     To view longer term data for a particular queue, click on the graph.
40     </p>
41    
42     EOF;
43     $file_array = getdirArray($directory,'asort');
44     foreach($file_array as $file_name) {
45     # look for the 3hour one only
46     if(preg_match("/^([0-9]+)\-3h.png$/", $file_name, $matches)) {
47     print <<<EOF
48    
49     <p>
50     <a href="index.php?graph=$matches[1]">
51     <img border="0" src="$file_name" width="495" height="172"></p>
52     </a>
53     </p>
54    
55     EOF;
56     }
57     }
58     }
59     ?>
60    
61     <p>
62     FRONTEND: <a href="http://myrtle.ukc.ac.uk/~iscream/"> http://myrtle.ukc.ac.uk/~iscream/</a><br>
63     URL: <a href="http://www.i-scream.org.uk/">http://www.i-scream.org.uk/</a>
64     </p>
65     <a href="http://rrdtool.eu.org/">
66     <img border="0" src="rrdtool.gif">
67     </a>
68    
69     </font>
70    
71     </body>
72    
73     </html>