#!/usr/bin/php -q ErrorWarningSystemArray

\n"; $docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp'; require_once "$docroot/webGui/include/ColorCoding.php"; $ata = exec("ls -n /sys/block/{$argv[1]}|grep -Po 'ata\d+'"); $dev = $ata ? "${argv[1]}|${ata}[.:]" : $argv[1]; exec("grep -P '$dev' /var/log/syslog", $lines); foreach ($lines as $line) { if (strpos($line,'disk_log')!==false) continue; $span = "span"; foreach ($match as $type) foreach ($type['text'] as $text) if (preg_match("/$text/i",$line)) {$span = "span class='{$type['class']}'"; break 2;} echo "<$span>".htmlentities($line)."\n"; } ?>