| 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/">http://www.i-scream.org/</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> |