From 5fc730efc3d3b50b8faab636e2bbb2708dddb9a2 Mon Sep 17 00:00:00 2001 From: Till Brehm <tbrehm@ispconfig.org> Date: Sun, 16 Feb 2014 09:45:18 -0500 Subject: [PATCH] Fixed: FS#3183 - Fix & Improve RAID Monitoring for tw_cli (3Ware) --- server/lib/classes/monitor_tools.inc.php | 7 +++++-- interface/lib/classes/tools_monitor.inc.php | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php index abf8923..52888e8 100644 --- a/interface/lib/classes/tools_monitor.inc.php +++ b/interface/lib/classes/tools_monitor.inc.php @@ -377,7 +377,9 @@ } else { $data = unserialize($record['data']); - $html .= nl2br($data['output']); + // improve view @Author <info@typoworx.de> + //-- $html .= nl2br($data['output']); + $html .= '<xmp>' . $data['output'] . '</xmp>'; } $html .= '</div></div>'; diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 45a5678..e8df5ec 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -1149,10 +1149,13 @@ /* * 3ware Controller */ + system('which tw_cli', $retval); if($retval === 0) { - - $data['output'] = shell_exec('tw_cli info c0'); + + // TYPOWORX FIX | Determine Controler-ID + $availableControlers = shell_exec('tw_cli info | grep -Eo "c[0-9]+'); + $data['output'] = shell_exec('tw_cli info ' . $availableControlers); $state = 'ok'; if(is_array($data['output'])) { -- Gitblit v1.9.1