Skip to content

Commit 5fc730e

Browse files
author
Till Brehm
committed
Fixed: FS#3183 - Fix & Improve RAID Monitoring for tw_cli (3Ware)
1 parent d796e4b commit 5fc730e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

interface/lib/classes/tools_monitor.inc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,9 @@ function showRaidState() {
377377
}
378378
else {
379379
$data = unserialize($record['data']);
380-
$html .= nl2br($data['output']);
380+
// improve view @Author <info@typoworx.de>
381+
//-- $html .= nl2br($data['output']);
382+
$html .= '<xmp>' . $data['output'] . '</xmp>';
381383
}
382384
$html .= '</div></div>';
383385

server/lib/classes/monitor_tools.inc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,10 +1149,13 @@ public function monitorRaid() {
11491149
/*
11501150
* 3ware Controller
11511151
*/
1152+
11521153
system('which tw_cli', $retval);
11531154
if($retval === 0) {
1154-
1155-
$data['output'] = shell_exec('tw_cli info c0');
1155+
1156+
// TYPOWORX FIX | Determine Controler-ID
1157+
$availableControlers = shell_exec('tw_cli info | grep -Eo "c[0-9]+');
1158+
$data['output'] = shell_exec('tw_cli info ' . $availableControlers);
11561159

11571160
$state = 'ok';
11581161
if(is_array($data['output'])) {

0 commit comments

Comments
 (0)