5 // Parse time correctness of blkparse output
6 // Thomas Kenne <thomas@2ndfloor.dk>
8 if (!isset($argv[1])) {
9 die("need file as argument\n");
14 if (!is_file($file)) {
15 die("invalid file\n");
18 if (!is_readable($file)) {
19 die("file not readable\n");
23 $fp = fopen($file, 'r');
24 while ($line = fgets($fp, 200)) {
30 $data = preg_split("/[\s]+/", $line);
33 settype($num, 'float');
35 if ($lastnum && $num < $lastnum) {