parser for "Control Channel Message Decode Rate" lines from log files; creates array of $decode[date/time][system][rate]
($filename)
| 42 | $decode = array(); |
| 43 | //parser for "Control Channel Message Decode Rate" lines from log files; creates array of $decode[date/time][system][rate] |
| 44 | function parsefile($filename) { |
| 45 | global $decode; |
| 46 | preg_match_all("/\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}).*\[(.*)\].*Control Channel Message Decode Rate: (.*)\/sec/", file_get_contents($filename), $logfile); |
| 47 | foreach ($logfile[1] as $theentry => $datetime) |
| 48 | $decode[$datetime][$logfile[2][$theentry]] = $logfile[3][$theentry]; |
| 49 | //if (isset($decode[1][$theentry-1]) && ($datetime == $decode[1][$theentry-1])) |
| 50 | unset($theentry, $datetime); |
| 51 | } |
| 52 | |
| 53 | |
| 54 | //get the file names from URL |