Revision: | 1.1 |
Committed: | Sat Mar 9 19:53:24 2002 UTC (22 years, 9 months ago) by tdb |
Branch: | MAIN |
CVS Tags: | HEAD |
Error occurred while calculating annotation data. | |
Log Message: | Graphing of most of the i-scream data. This is intended as an alternative to the current MySQL/DBReporter style of daily graph generation. This is split into two sections: watch.pl connects to the i-scream client interface, parses all the data and stores it in rrdtool database files. This is still very incomplete and somewhat messy code :) graph.pl generates graphs from the rrdtool database files created by the previous script. It drops these images into a directory structure for viewing over the web. The php pages provide an easy way to view these graphs during development, but it is expected in the long term to integrate this into the i-scream reports pages. Finally XMLParser.pm is a wrapper to the XML parsing to create i-scream style XMLPacket hashes :) |
# | Content |
---|---|
1 | <?php |
2 | |
3 | # return an array of subdirectories from a directory. |
4 | function getdirArray($dir='./',$sort='asort') { |
5 | global $dir_file_count; |
6 | if ( is_dir($dir) ) { |
7 | $fd = @opendir($dir); |
8 | while ( ($part = @readdir($fd)) == TRUE ) { |
9 | clearstatcache(); |
10 | if ($part != "." && $part != "..") { |
11 | $dir_array[] = $part; |
12 | } |
13 | } |
14 | if($fd == TRUE) { |
15 | closedir($fd); |
16 | } |
17 | if (is_array($dir_array)) { |
18 | $sort($dir_array); |
19 | $dir_file_count = count($dir_array); |
20 | Return $dir_array; |
21 | } else { |
22 | Return FALSE; |
23 | } |
24 | } else { |
25 | Return FALSE; |
26 | } |
27 | } |
28 | |
29 | ?> |