diff --git a/plugins/dynamix.apcupsd/include/UPSstatus.php b/plugins/dynamix.apcupsd/include/UPSstatus.php
index b615a2bd3..71d55556a 100644
--- a/plugins/dynamix.apcupsd/include/UPSstatus.php
+++ b/plugins/dynamix.apcupsd/include/UPSstatus.php
@@ -1,5 +1,5 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
diff --git a/plugins/dynamix.docker.manager/include/Exec.php b/plugins/dynamix.docker.manager/include/Exec.php
index b46853e25..70f25cf26 100644
--- a/plugins/dynamix.docker.manager/include/Exec.php
+++ b/plugins/dynamix.docker.manager/include/Exec.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
if ( isset( $_GET['cmd'] )) {
$command = rawurldecode(($_GET['cmd']));
diff --git a/plugins/dynamix.docker.manager/include/UpdateConfig.php b/plugins/dynamix.docker.manager/include/UpdateConfig.php
index 5a6b63fa3..0d36706d1 100644
--- a/plugins/dynamix.docker.manager/include/UpdateConfig.php
+++ b/plugins/dynamix.docker.manager/include/UpdateConfig.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
// Autostart file
diff --git a/plugins/dynamix.plugin.manager/scripts/plugin b/plugins/dynamix.plugin.manager/scripts/plugin
index 1c4fb1149..432145f14 100755
--- a/plugins/dynamix.plugin.manager/scripts/plugin
+++ b/plugins/dynamix.plugin.manager/scripts/plugin
@@ -1,6 +1,6 @@
#!/usr/bin/php -q
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt_helpers.php";
diff --git a/plugins/dynamix.vm.manager/classes/libvirt.php b/plugins/dynamix.vm.manager/classes/libvirt.php
index ad6607eb2..e72366ab4 100644
--- a/plugins/dynamix.vm.manager/classes/libvirt.php
+++ b/plugins/dynamix.vm.manager/classes/libvirt.php
@@ -1,6 +1,6 @@
- $docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+ $docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
// Load emhttp variables if needed.
if (!isset($var)){
diff --git a/plugins/dynamix.vm.manager/templates/LibreELEC.form.php b/plugins/dynamix.vm.manager/templates/LibreELEC.form.php
index 708324b31..f80927a1d 100644
--- a/plugins/dynamix.vm.manager/templates/LibreELEC.form.php
+++ b/plugins/dynamix.vm.manager/templates/LibreELEC.form.php
@@ -1,6 +1,6 @@
- $docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+ $docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt_helpers.php";
diff --git a/plugins/dynamix.vm.manager/templates/XML_Expert.form.php b/plugins/dynamix.vm.manager/templates/XML_Expert.form.php
index 0994a0139..02ad69993 100644
--- a/plugins/dynamix.vm.manager/templates/XML_Expert.form.php
+++ b/plugins/dynamix.vm.manager/templates/XML_Expert.form.php
@@ -1,6 +1,6 @@
- $docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+ $docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Helpers.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt.php";
require_once "$docroot/plugins/dynamix.vm.manager/classes/libvirt_helpers.php";
diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page
index b85a491b4..dc86bb9f0 100644
--- a/plugins/dynamix/ArrayOperation.page
+++ b/plugins/dynamix/ArrayOperation.page
@@ -56,13 +56,13 @@ function tab0() {
$.removeCookie('one',{path:'/'});
$.cookie('tab','tab0',{path:'/'});
}
-function parity_status() {
+function parityStatus() {
$.post('/webGui/include/DeviceList.php',{path:'=$path?>',device:'parity'},function(data) {
if (data) {$.each(data.split(';'),function(k,v) {if ($('#line'+k).length>0) $('#line'+k).html(v);});}
- if ($('#tab'+$('input[name$="tabs"]').length).is(':checked')) timer = setTimeout(parity_status,3000);
+ if ($('#tab'+$('input[name$="tabs"]').length).is(':checked')) timer = setTimeout(parityStatus,3000);
- setTimeout(parity_status,3000);
+ setTimeout(parityStatus,3000);
if (!data && $('#cancelButton').length>0 && $('#cancelButton').val()=='Cancel') {
$('#cancelButton').val('Done').unbind().bind({click:function(){refresh();}});
@@ -71,7 +71,7 @@ function parity_status() {
}
});
}
-function parity_warning(form) {
+function parityWarning(form) {
var text = 'Dual parity valid requires ALL disks in their original slots';
@@ -84,7 +84,7 @@ function parity_warning(form) {
form.submit();
}
}
-function stop_array(form) {
+function stopArray(form) {
$(form).append(' ');
swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdStop"]').remove();});
@@ -92,7 +92,7 @@ function stop_array(form) {
form.submit();
}
-function stop_parity(form,text) {
+function stopParity(form,text) {
$(form).append(' ');
swal({title:'Proceed?',text:'This will stop the running '+text+' operation',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmdNoCheck"]').remove();});
@@ -100,7 +100,7 @@ function stop_parity(form,text) {
form.submit();
}
-function shut_down(form,cmd) {
+function shutdown(form,cmd) {
$(form).append(' ');
swal({title:'Proceed?',text:'This will '+cmd+' the system',type:'warning',showCancelButton:true},function(p){if (p) form.submit(); else $('input[name="cmd"]').remove();});
@@ -170,11 +170,11 @@ function getFileContent(event,form) {
reader.onload = function(){form.file.value=reader.result;toggleStart(false);};
reader.readAsDataURL(input.files[0]);
}
-parity_status();
+parityStatus();
$('.tabs').append(ctrl);
if ($.cookie('tab')=='tab0') $('i.toggle').hide();
-$('#tab'+$('input[name$="tabs"]').length).bind({click:function() {clearTimeout(timer); parity_status(); tab0(); $('i.toggle').hide('slow');}});
+$('#tab'+$('input[name$="tabs"]').length).bind({click:function() {clearTimeout(timer); parityStatus(); tab0(); $('i.toggle').hide('slow');}});
$('div[id=title]:not(":last, .disable_diskio")').each(function(){$(this).append(ctrl);});
@@ -219,7 +219,7 @@ $(function(){
switch ($var['fsState']):
case "Started":?>
=status_indicator()?>Started=(($var['startMode']=='Maintenance')?' - Maintenance Mode':'')?>
- disabled>
+ disabled>
Stop will take the array off-line.=$parity?" $parity":($mover?" $mover":"")?>
if ($var['fsNumUnmountable']>0):?>
Unmountable disk=$var['fsNumUnmountable']==1?'':'s'?> present:
@@ -227,8 +227,8 @@ $(function(){
echo "".my_disk($disk['name'])." • ".my_id($disk['id'])." (".$disk['device'].") ";?>
Format will create a file system in all Unmountable disks, discarding all data currently on those disks.
-
- Yes I want to do this
+
+ Yes I want to do this All data is permanently lost !!! This is not used to recover data
endif;
if (!$parity):
@@ -242,46 +242,50 @@ $(function(){
elseif (strstr($var['mdResyncAction'],"check")):?>
Parity is valid. Check will start Parity-Check .
Write corrections to parity
- endif;
- if ($var['sbSyncExit']!=0):?>
-
+ endif;?>
+
+ if ($var['sbSyncExit']!=0):?>
Last check incomplete on =my_time($var['sbSynced2']).day_count($var['sbSynced2'])?> , finding =$var['sbSyncErrs']?> error=$var['sbSyncErrs']==1?'':'s'?>.
Error code: =my_error($var['sbSyncExit'])?>
- elseif ($var['sbSynced']==0):?>
- Last checked on =my_time(0).day_count(0)?>
- Duration: =my_check(0,0)?>
- elseif ($var['sbSynced2']==0):?>
-
- list($entry,$duration,$speed,$status,$error) = explode('|', read_parity_log($var['sbSynced']));
+ elseif ($var['sbSynced']==0):
+ list($date,$duration,$speed,$status,$error) = last_parity_log();?>
+ if ($status==0):?>
+ Last checked on =my_time($date).day_count($date)?> , finding =$error?> error=$error==1?'':'s'?>.
+ Duration: =my_check($duration,$speed)?>
+ else:?>
+ Last check incomplete on =my_time($date).day_count($date)?> , finding =$error?> error=$error==1?'':'s'?>.
+ Error code: =my_error($status)?>
+ endif;
+ elseif ($var['sbSynced2']==0):
+ list($date,$duration,$speed,$status,$error) = explode('|', read_parity_log($var['sbSynced']));
if ($status==0):?>
Last checked on =my_time($var['sbSynced']).day_count($var['sbSynced'])?> , finding =$error?> error=$error==1?'':'s'?>.
Duration: =my_check($duration,$speed)?>
else:?>
Last check incomplete on =my_time($var['sbSynced']).day_count($var['sbSynced'])?> , finding =$error?> error=$error==1?'':'s'?>.
- Error code: =$status?>
+ Error code: =my_error($status)?>
endif;?>
else:
$duration = $var['sbSynced2']-$var['sbSynced'];
$speed = $duration?my_scale($var['mdResyncSize']*1024/$duration,$unit,1)." $unit/sec":'';?>
-
Last check completed on =my_time($var['sbSynced2']).day_count($var['sbSynced2'])?> , finding =$var['sbSyncErrs']?> error=$var['sbSyncErrs']==1?'':'s'?>.
Duration: =my_check($duration,$speed)?>
endif;
endif;
else:
if ($var['mdResyncAction']=="check"):?>
- Read-Check in progress.
+ Read-Check in progress.
Cancel will stop the Read-Check.
elseif (strstr($var['mdResyncAction'],"check")):?>
- Parity-Check in progress.
+ Parity-Check in progress.
Cancel will stop the Parity-Check.
elseif (strstr($var['mdResyncAction'],"recon")):?>
- Parity-Sync/Data-Rebuild in progress.
+ Parity-Sync/Data-Rebuild in progress.
Cancel will stop Parity-Sync/Data-Rebuild.
WARNING: canceling may leave the array unprotected!
elseif (strstr($var['mdResyncAction'],"clear")):?>
- Clearing in progress.
+ Clearing in progress.
Cancel will stop Clearing.
endif;?>
Total size:
@@ -359,7 +363,7 @@ $(function(){
Start will record all disk information and bring the array on-line.
The array will be immediately available, but unprotected since parity has not been assigned.
else:?>
- =status_indicator()?>Stopped . Configuration valid.
+ =status_indicator()?>Stopped . Configuration valid.
Start will record all disk information, bring the array on-line, and start Parity-Sync.
The array will be immediately available, but unprotected until Parity-Sync completes.
Parity is already valid.
@@ -454,38 +458,40 @@ $(function(){
-
@@ -560,13 +566,14 @@ if (isset($display['sleep'])) @include $display['sleep'];
> Once you have assigned all of your hard drives, refer to the Array Status section below
> and Start the array.
-
+
> #### Encryption input
>
+> Passphrase or file is stored in /root/keyfile.
> This keyfile is read during array Start and is used to encrypt/decrypt content of encrypted devices.
>
-> With array Stopped, the keyfile may be deleted and the user can specify a new encryption key. Note that once a device
+> With array Stopped, the user can specify a new encryption key. Note that once a device
> is formatted with a particular key it may only be opened using that same key. Changing the encryption key requires
> encrypted devices to be reformatted **resulting in permanent loss of all existing data on those devices.**
>
diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page
index 0a2e1c4f2..37ee0f535 100644
--- a/plugins/dynamix/DashStats.page
+++ b/plugins/dynamix/DashStats.page
@@ -39,7 +39,6 @@ function init_row($label) {
}
function parity_status() {
global $var,$disks;
-
$parity_num_slots = 0;
$parity_disabled = [];
$parity_invalid = [];
@@ -54,7 +53,6 @@ function parity_status() {
}
}
}
-
if ($parity_num_slots == count($parity_disabled)) {
echo "Parity disk".($parity_num_slots>1?'s':'')." not present ";
return;
@@ -71,7 +69,16 @@ function parity_status() {
return;
}
if ($var['sbSynced']==0) {
- echo "Parity has not been checked yet. ";
+ list($date,$duration,$speed,$status,$error) = last_parity_log();
+ if (!$date) {
+ echo "Parity has not been checked yet. ";
+ } elseif ($status==0) {
+ echo "Last checked on ".my_time($date).day_count($date)." , finding $error error".($error==1?'.':'s.');
+ echo "Duration: ".my_check($duration,$speed)." ";
+ } else {
+ echo "Last check incomplete on ".my_time($date).day_count($date)." , finding $error error".($error==1?'.':'s.');
+ echo "Error code: ".my_error($status)." ";
+ }
return;
}
if ($var['sbSynced2']==0) {
@@ -82,7 +89,7 @@ function parity_status() {
echo "".($idle ? "Duration: " : "Last result: ").my_check($duration,$speed)." ";
} else {
echo "Last check incomplete on ".my_time($var['sbSynced']).day_count($var['sbSynced'])." , finding $error error".($error==1?'.':'s.');
- echo "Error code: $status ";
+ echo "Error code: ".my_error($status)." ";
}
} else {
$status = 0;
diff --git a/plugins/dynamix/MoverSettings.page b/plugins/dynamix/MoverSettings.page
index c5dfa314b..cf339f90b 100644
--- a/plugins/dynamix/MoverSettings.page
+++ b/plugins/dynamix/MoverSettings.page
@@ -15,16 +15,12 @@ Tag="calendar-check-o"
*/
?>
-$disabled = '';
if (empty($disks['cache']) || $disks['cache']['status']=='DISK_NP') {
echo "No Cache disk present!
";
- $disabled = 'disabled';
} elseif ($var['shareCacheEnabled']!='yes') {
echo "Cache disk not enabled!
";
- $disabled = 'disabled';
} elseif ($var['shareUser']=='-') {
echo "User shares not enabled!
";
- $disabled = 'disabled';
}
$cron = explode(' ',$var['shareMoverSchedule']);
$move = $cron[2]!='*' ? 3 : ($cron[4]!='*' ? 2 : (substr($cron[1],0,1)!='*' ? 1 : 0));
@@ -124,10 +120,12 @@ Mover logging:
:
+
: Mover is running.
-: > Click to invoke the Mover.
+: Click to invoke the Mover.
+
\ No newline at end of file
diff --git a/plugins/dynamix/include/Acknowledge.php b/plugins/dynamix/include/Acknowledge.php
index 52cb21b7c..d9c86cc74 100644
--- a/plugins/dynamix/include/Acknowledge.php
+++ b/plugins/dynamix/include/Acknowledge.php
@@ -1,6 +1,6 @@
-$var = parse_ini_file("/var/local/emhttp/var.ini");
+$var = parse_ini_file("/var/local/emhttp/var.ini");
?>
diff --git a/plugins/dynamix/include/CheckPort.php b/plugins/dynamix/include/CheckPort.php
index 7bc6457ab..1aa058f58 100644
--- a/plugins/dynamix/include/CheckPort.php
+++ b/plugins/dynamix/include/CheckPort.php
@@ -1,6 +1,6 @@
$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+require_once "$docroot/webGui/include/Wrappers.php";
-function getVal(&$ref,$n,$d) {
- global $var;
- $val = $ref[$n] ?? -1;
- return $val!==-1 ? $val : ($var[$n] ?? $d);
-}
function normalize($type,$count) {
$words = explode('_',$type);
foreach ($words as &$word) $word = $word==strtoupper($word) ? $word : preg_replace(['/^(ct|cnt)$/','/^blk$/'],['count','block'],strtolower($word));
@@ -29,9 +25,9 @@ function my_insert(&$source,$string) {
function my_smart(&$source,$name,$page) {
global $var,$disks,$path,$failed,$numbers,$saved;
$disk = &$disks[$name];
- $select = getVal($disk,'smSelect',0);
- $level = getVal($disk,'smLevel',1);
- $events = explode('|',getVal($disk,'smEvents',$numbers));
+ $select = get_value($disk,'smSelect',0);
+ $level = get_value($disk,'smLevel',1);
+ $events = explode('|',get_value($disk,'smEvents',$numbers));
$title = '';
$thumb = 'good';
$smart = "state/smart/$name";
@@ -78,9 +74,8 @@ switch ($_POST['cmd']) {
case 'disk':
$i = 1;
$var = [];
- $disks = @array_filter(parse_ini_file('state/disks.ini',true),'active_disks');
- $devs = @parse_ini_file('state/devs.ini',true);
- $saved = @parse_ini_file('state/monitor.ini',true);
+ $disks = array_filter(parse_ini_file('state/disks.ini',true),'active_disks');
+ $devs = parse_ini_file('state/devs.ini',true);
require_once "$docroot/webGui/include/CustomMerge.php";
require_once "$docroot/webGui/include/Preselect.php";
$slots = $_POST['slots'];
@@ -122,9 +117,10 @@ case 'disk':
my_insert($row5[$n]," ");
break;}
$temp = $disk['temp'];
- $hot = $disk['hotTemp'] ?? $_POST['hot'];
- $max = $disk['maxTemp'] ?? $_POST['max'];
- $heat = $temp>=$max && $max>0 ? 'max' : ($temp>=$hot && $hot>0 ? 'hot' : '');
+ $hot = $disk['hotTemp'] ?? $_POST['hot'];
+ $max = $disk['maxTemp'] ?? $_POST['max'];
+ $top = $_POST['top'] ?? 120;
+ $heat = exceed($temp,$max,$top) ? 'max' : (exceed($temp,$hot,$top) ? 'hot' : '');
if ($heat)
my_insert($row6[$n],"".my_temp($temp,$_POST['unit'])." ");
else
@@ -136,13 +132,14 @@ case 'disk':
$devRow = function($n,$disk) use (&$row4,&$row6,&$row7,$path) {
$hot = $_POST['hot'];
$max = $_POST['max'];
+ $top = $_POST['top'] ?? 120;
$name = $dev['device'];
$port = substr($name,-2)!='n1' ? $name : substr($name,0,-2);
$smart = "state/smart/$name";
$state = exec("hdparm -C ".escapeshellarg("/dev/$port")."|grep -Po 'active|unknown'") ? 'blue-on' : 'blue-blink';
if ($state=='blue-on') my_smart($row7[$n],$name,'New');
$temp = file_exists($smart) ? exec("awk 'BEGIN{t=\"*\"} \$1==190||\$1==194{t=\$10;exit};\$1==\"Temperature:\"{t=\$2;exit} END{print t}' ".escapeshellarg($smart)) : '*';
- $heat = $temp>=$max && $max>0 ? 'max' : ($temp>=$hot && $hot>0 ? 'hot' : '');
+ $heat = exceed($temp,$max,$top) ? 'max' : (exceed($temp,$hot,$top) ? 'hot' : '');
if ($heat)
my_insert($row6[$n],"".my_temp($temp,$_POST['unit'])." ");
else
diff --git a/plugins/dynamix/include/DeleteLogFile.php b/plugins/dynamix/include/DeleteLogFile.php
index d3fced3bb..f4ca94f42 100644
--- a/plugins/dynamix/include/DeleteLogFile.php
+++ b/plugins/dynamix/include/DeleteLogFile.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Wrappers.php";
$dynamix = parse_plugin_cfg('dynamix',true);
diff --git a/plugins/dynamix/include/DeviceList.php b/plugins/dynamix/include/DeviceList.php
index bfe20b319..1b75d7c19 100644
--- a/plugins/dynamix/include/DeviceList.php
+++ b/plugins/dynamix/include/DeviceList.php
@@ -27,7 +27,7 @@ require_once "$docroot/webGui/include/CustomMerge.php";
function in_parity_log($log,$timestamp) {
if (file_exists($log)) {
$handle = fopen($log, 'r');
- while (($line = fgets($handle)) !== false) {
+ while (($line = fgets($handle))!==false) {
if (strpos($line,$timestamp)!==false) break;
}
fclose($handle);
@@ -35,7 +35,7 @@ function in_parity_log($log,$timestamp) {
return !empty($line);
}
function device_info(&$disk,$online) {
- global $path, $var, $show;
+ global $path, $var, $crypto;
$name = $disk['name'];
$fancyname = $disk['type']=='New' ? $name : my_disk($name);
$type = $disk['type']=='Flash' || $disk['type']=='New' ? $disk['type'] : 'Device';
@@ -58,12 +58,12 @@ function device_info(&$disk,$online) {
}
$status = "$ctrl$help ";
$link = (strcmp($disk['status'], 'DISK_NP')!=0 || $disk['name']=="cache") ? "".$fancyname." " : $fancyname;
- if ($show && $online) switch ($disk['luksState']) {
+ if ($crypto && $online) switch ($disk['luksState']) {
case 0: $luks = " "; break;
- case 1: $luks = "Encrypted and unlocked "; break;
- case 2: $luks = "Locked: missing encryption key "; break;
- case 3: $luks = "Locked: wrong encryption key "; break;
- default: $luks = "Locked: unknown error "; break;
+ case 1: $luks = "Device encrypted and unlocked "; break;
+ case 2: $luks = "Device locked: missing encryption key "; break;
+ case 3: $luks = "Device locked: wrong encryption key "; break;
+ default: $luks = "Device locked: unknown error "; break;
} else $luks = '';
return $status.$luks.$link;
}
@@ -90,19 +90,22 @@ function assignment(&$disk) {
$out .= "$empty ";
} else
$out .= "$empty ";
- if ($disk['type']=="Cache")
+ if ($disk['type']=='Cache')
foreach ($devs as $dev) {$out .= "".device_desc($dev)." ";}
else
foreach ($devs as $dev) if ($dev['tag']==0) {$out .= "".device_desc($dev)." ";}
return "$out";
}
+function str_strip($fs) {
+ return str_replace('luks:','',$fs);
+}
function fs_info(&$disk) {
global $display;
if ($disk['fsStatus']=='-') {
- echo $disk['type']=='Cache' ? "".str_replace('luks:','',$disk['fsType'])." Device is part of cache pool " : " ";
+ echo $disk['type']=='Cache' ? "".str_strip($disk['fsType'])." Device is part of cache pool " : " ";
return;
} elseif ($disk['fsStatus']=='Mounted') {
- echo "".str_replace('luks:','',$disk['fsType'])." ";
+ echo "".str_strip($disk['fsType'])." ";
echo "".my_scale($disk['fsSize']*1024,$unit,-1)." $unit ";
if ($display['text']%10==0) {
echo "".my_scale($disk['fsUsed']*1024,$unit)." $unit ";
@@ -118,27 +121,31 @@ function fs_info(&$disk) {
}
echo "".device_browse($disk)." ";
} else
- echo "".str_replace('luks:','',$disk['fsType'])." {$disk['fsStatus']}";
+ echo " ".str_strip($disk['fsType'])." {$disk['fsStatus']}";
}
function my_diskio($data) {
return my_scale($data,$unit,1)." $unit/s";
}
+function parity_only($disk) {
+ return $disk['type']=='Parity';
+}
+function data_only($disk) {
+ return $disk['type']=='Data';
+}
+function cache_only($disk) {
+ return $disk['type']=='Cache';
+}
function array_offline(&$disk) {
global $var, $disks;
- if (strpos($var['mdState'],"ERROR:")===false) {
- $w = 'All existing data on this device will be OVERWRITTEN when array is Started ';
- if ($disk['type']=="Cache") {
- if (!empty($disks['cache']['uuid']) && $disk['status']=="DISK_NEW") $warning = $w;
- }
- else {
- if ($var['mdState']=="NEW_ARRAY") {
- if ($disk['type']=="Parity") $warning = $w;
- }
- else {
- if ($disk['status']=="DISK_INVALID" ||
- $disk['status']=="DISK_DSBL_NEW" ||
- $disk['status']=="DISK_WRONG" ||
- $disk['status']=="DISK_NEW") $warning = $w;
+ if (strpos($var['mdState'],'ERROR:')===false) {
+ $text = 'All existing data on this device will be OVERWRITTEN when array is Started ';
+ if ($disk['type']=='Cache') {
+ if (!empty($disks['cache']['uuid']) && $disk['status']=='DISK_NEW') $warning = $text;
+ } else {
+ if ($var['mdState']=='NEW_ARRAY') {
+ if ($disk['type']=='Parity') $warning = $text;
+ } else {
+ if (in_array($disk['status'],['DISK_INVALID','DISK_DSBL_NEW','DISK_WRONG','DISK_NEW'])) $warning = $text;
}
}
}
@@ -231,7 +238,7 @@ function my_clock($time) {
}
function read_disk($name, $part) {
global $var;
- $port = substr($name,-2)!='n1' ? $name : substr($name,0,-2);
+ $port = port_name($name);
switch ($part) {
case 'color':
return exec("hdparm -C ".escapeshellarg("/dev/$port")."|grep -Po 'active|unknown'") ? 'blue-on' : 'blue-blink';
@@ -302,24 +309,26 @@ function cache_slots() {
$out .= "";
return $out;
}
-$show = false;
+$crypto = false;
switch ($_POST['device']) {
case 'array':
- foreach ($disks as $disk) if ($disk['type']=='Data') $show |= strpos($disk['fsType'],'luks:')!==false;
+ $parity = array_filter($disks,'parity_only');
+ $data = array_filter($disks,'data_only');
+ foreach ($data as $disk) $crypto |= strpos($disk['fsType'],'luks:')!==false;
if ($var['fsState']=='Stopped') {
- foreach ($disks as $disk) {if ($disk['type']=='Parity') array_offline($disk);}
+ foreach ($parity as $disk) array_offline($disk);
echo " ";
- foreach ($disks as $disk) {if ($disk['type']=='Data') array_offline($disk);}
+ foreach ($data as $disk) array_offline($disk);
echo " Slots:".array_slots()." ";
} else {
- foreach ($disks as $disk) {if ($disk['type']=='Parity' && $disk['status']!='DISK_NP_DSBL') array_online($disk);}
- foreach ($disks as $disk) {if ($disk['type']=='Data') array_online($disk);}
+ foreach ($parity as $disk) if ($disk['status']!='DISK_NP_DSBL') array_online($disk);
+ foreach ($data as $disk) array_online($disk);
if ($display['total']) show_totals('Array of '.my_word($var['mdNumDisks']).' devices');
}
break;
case 'flash':
$disk = &$disks['flash'];
- $data = $diskio ? explode(' ',$diskio[$disk['device']]) : [];
+ $data = explode(' ',$diskio[$disk['device']] ?? '');
$disk['fsUsed'] = $disk['fsSize']-$disk['fsFree'];
echo "";
echo "".device_info($disk,true)." ";
@@ -332,19 +341,20 @@ case 'flash':
echo " ";
break;
case 'cache':
- foreach ($disks as $disk) if ($disk['type']=='Cache') $show |= strpos($disk['fsType'],'luks:')!==false;
+ $cache = array_filter($disks,'cache_only');
+ foreach ($cache as $disk) $crypto |= strpos($disk['fsType'],'luks:')!==false;
if ($var['fsState']=='Stopped') {
- foreach ($disks as $disk) {if ($disk['type']=='Cache') array_offline($disk);}
+ foreach ($cache as $disk) array_offline($disk);
echo " Slots:".cache_slots()." ";
} else {
- foreach ($disks as $disk) {if ($disk['type']=='Cache') array_online($disk);}
+ foreach ($cache as $disk) array_online($disk);
if ($display['total'] && $var['cacheSbNumDisks']>1) show_totals('Pool of '.my_word($var['cacheNumDevices']).' devices');
}
break;
case 'open':
foreach ($devs as $disk) {
$dev = $disk['device'];
- $data = $diskio ? explode(' ',$diskio[$dev]) : [];
+ $data = explode(' ',$diskio[$dev] ?? '');
$disk['name'] = $dev;
$disk['type'] = 'New';
$disk['color'] = read_disk($dev,'color');
diff --git a/plugins/dynamix/include/DiskList.php b/plugins/dynamix/include/DiskList.php
index 3096c62f1..217ae7ecd 100644
--- a/plugins/dynamix/include/DiskList.php
+++ b/plugins/dynamix/include/DiskList.php
@@ -46,11 +46,17 @@ function shareInclude($name) {
return !$include || substr($name,0,4)!='disk' || strpos("$include,", "$name,")!==false;
}
+function sharesOnly($disk) {
+ return strpos('Data,Cache',$disk['type'])!==false && $disk['exportable']=='yes';
+}
+// filter disk shares
+$disks = array_filter($disks,'sharesOnly');
+
// Compute all disk shares & check encryption
-$show = false;
+$crypto = false;
foreach ($disks as $name => $disk) {
- if ($compute=='yes' && $disk['exportable']=='yes') exec("webGui/scripts/disk_size ".escapeshellarg($name)." ssz2");
- if (strstr('Data,Cache',$disk['type'])) $show |= strpos($disk['fsType'],'luks:')!==false;
+ if ($compute=='yes') exec("webGui/scripts/disk_size ".escapeshellarg($name)." ssz2");
+ $crypto |= strpos($disk['fsType'],'luks:')!==false;
}
// global shares include/exclude
@@ -66,14 +72,14 @@ else
// Build table
$row = 0;
foreach ($disks as $name => $disk) {
- if (!strstr('Data,Cache',$disk['type']) || $disk['fsColor']=='grey-off' || $disk['exportable']=='no') continue;
+ $color = $disk['fsColor'];
$row++;
- $ball = "/webGui/images/{$disk['fsColor']}.png";
- switch ($disk['fsColor']) {
+ $ball = "/webGui/images/$color.png";
+ switch ($color) {
case 'green-on': $help = 'All files protected'; break;
case 'yellow-on': $help = 'All files unprotected'; break;
}
- if ($show) switch ($disk['luksState']) {
+ if ($crypto) switch ($disk['luksState']) {
case 0: $luks = " "; break;
case 1: $luks = "All files encrypted "; break;
case 2: $luks = "Some or all files unencrypted "; break;
diff --git a/plugins/dynamix/include/HardwareCollect.php b/plugins/dynamix/include/HardwareCollect.php
index 8e7effde8..2bbb31b96 100644
--- a/plugins/dynamix/include/HardwareCollect.php
+++ b/plugins/dynamix/include/HardwareCollect.php
@@ -1,6 +1,6 @@
user abort";
+ return "aborted ";
default:
return "$code ";
}
@@ -176,6 +176,13 @@ function read_parity_log($epoch, $busy=false) {
}
return $line ?: $last ?: '0|0|0|0|0';
}
+function last_parity_log() {
+ $log = '/boot/config/parity-checks.log';
+ if (!file_exists($log)) return [0,0,0,0,0];
+ list($date,$duration,$speed,$status,$error) = explode('|',exec("tail -1 $log"));
+ list($y,$m,$d,$t) = preg_split('/ +/',$date);
+ return [strtotime("$d-$m-$y $t"), $duration, $speed, $status, $error];
+}
function urlencode_path($path) {
return str_replace("%2F", "/", urlencode($path));
}
diff --git a/plugins/dynamix/include/InstallKey.php b/plugins/dynamix/include/InstallKey.php
index cd51a7854..10295f09c 100644
--- a/plugins/dynamix/include/InstallKey.php
+++ b/plugins/dynamix/include/InstallKey.php
@@ -1,5 +1,5 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
function addLog($line) { echo ""; }
diff --git a/plugins/dynamix/include/Markdown.php b/plugins/dynamix/include/Markdown.php
index 3309f571d..56bb38cf6 100644
--- a/plugins/dynamix/include/Markdown.php
+++ b/plugins/dynamix/include/Markdown.php
@@ -3,7 +3,7 @@
# Markdown Extra - A text-to-HTML conversion tool for web writers
#
# LimeTech - Give all blockquotes class="inline_help".
-# Copyright 2005-2016, Lime Technology
+# Copyright 2005-2017, Lime Technology
#
#
# PHP Markdown & Extra
diff --git a/plugins/dynamix/include/Notify.php b/plugins/dynamix/include/Notify.php
index 8cdd3b310..0b92eaa69 100644
--- a/plugins/dynamix/include/Notify.php
+++ b/plugins/dynamix/include/Notify.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
$notify = "$docroot/webGui/scripts/notify";
switch ($_POST['cmd']) {
diff --git a/plugins/dynamix/include/ProcessStatus.php b/plugins/dynamix/include/ProcessStatus.php
index fddc6c13b..0428c6500 100644
--- a/plugins/dynamix/include/ProcessStatus.php
+++ b/plugins/dynamix/include/ProcessStatus.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
function PsExecute($command, $timeout = 20, $sleep = 2) {
exec($command.'>/dev/null & echo $!',$op);
diff --git a/plugins/dynamix/include/ShareData.php b/plugins/dynamix/include/ShareData.php
index 50dcf0004..981dfd4f2 100644
--- a/plugins/dynamix/include/ShareData.php
+++ b/plugins/dynamix/include/ShareData.php
@@ -1,6 +1,6 @@
$share) {
if ($compute=='yes') exec("webGui/scripts/share_size ".escapeshellarg($name)." ssz1");
- $show |= $share['luksStatus']>0;
+ $crypto |= $share['luksStatus']>0;
}
// global shares include/exclude
@@ -74,12 +74,13 @@ else
$row = 0;
foreach ($shares as $name => $share) {
$row++;
- $ball = "/webGui/images/{$share['color']}.png";
- switch ($share['color']) {
+ $color = $share['color'];
+ $ball = "/webGui/images/$color.png";
+ switch ($color) {
case 'green-on': $help = 'All files protected'; break;
case 'yellow-on': $help = 'Some or all files unprotected'; break;
}
- if ($show) switch ($share['luksStatus']) {
+ if ($crypto) switch ($share['luksStatus']) {
case 0: $luks = " "; break;
case 1: $luks = "All files encrypted "; break;
case 2: $luks = "Some or all files unencrypted "; break;
diff --git a/plugins/dynamix/include/SmartInfo.php b/plugins/dynamix/include/SmartInfo.php
index 3a82e0d28..0c41cbb4c 100644
--- a/plugins/dynamix/include/SmartInfo.php
+++ b/plugins/dynamix/include/SmartInfo.php
@@ -11,7 +11,11 @@
*/
?>
+$disks = []; $var = [];
$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+require_once "$docroot/webGui/include/CustomMerge.php";
+require_once "$docroot/webGui/include/Wrappers.php";
+require_once "$docroot/webGui/include/Preselect.php";
function normalize($text, $glue='_') {
$words = explode($glue,$text);
@@ -35,10 +39,6 @@ function spindownDelay($port) {
function append(&$ref, &$info) {
if ($info) $ref .= ($ref ? " " : "").$info;
}
-$disks = []; $var = [];
-require_once "$docroot/webGui/include/CustomMerge.php";
-require_once "$docroot/webGui/include/Wrappers.php";
-require_once "$docroot/webGui/include/Preselect.php";
$name = $_POST['name'] ?? '';
$port = $_POST['port'] ?? '';
if ($name) {
@@ -58,6 +58,7 @@ case "attributes":
$unraid = parse_plugin_cfg('dynamix',true);
$max = $disk['maxTemp'] ?? $unraid['display']['max'];
$hot = $disk['hotTemp'] ?? $unraid['display']['hot'];
+ $top = $_POST['top'] ?? 120;
exec("smartctl -A $type ".escapeshellarg("/dev/$port")."|awk 'NR>4'",$output);
if (strpos($output[0], 'SMART Attributes Data Structure')===0) {
$output = array_slice($output, 3);
@@ -69,7 +70,7 @@ case "attributes":
$highlight = strpos($info[8],'FAILING_NOW')!==false || ($select ? $info[5]>0 && $info[3]<=$info[5]*$level : $info[9]>0);
if (in_array($info[0], $events) && $highlight) $color = " class='warn'";
elseif (in_array($info[0], [190,194])) {
- if ($info[9]>=$max && $max>0) $color = " class='alert'"; elseif ($info[9]>=$hot && $hot>0) $color = " class='warn'";
+ if (exceed($info[9],$max,$top)) $color = " class='alert'"; elseif (exceed($info[9],$hot,$top)) $color = " class='warn'";
}
if ($info[8]=='-') $info[8] = 'Never';
if ($info[0]==9 && is_numeric($info[9])) duration($info[9]);
@@ -88,7 +89,7 @@ case "attributes":
switch ($name) {
case 'Temperature':
$temp = strtok($value,' ');
- if ($temp>=$max && $max>0) $color = " class='alert'"; elseif ($temp>=$hot && $hot>0) $color = " class='warn'";
+ if (exceed($temp,$max)) $color = " class='alert'"; elseif (exceed($temp,$hot)) $color = " class='warn'";
break;
case 'Power on hours':
if (is_numeric($value)) duration($value);
diff --git a/plugins/dynamix/include/Wrappers.php b/plugins/dynamix/include/Wrappers.php
index ebd5d8381..498b44060 100644
--- a/plugins/dynamix/include/Wrappers.php
+++ b/plugins/dynamix/include/Wrappers.php
@@ -21,13 +21,11 @@ function parse_plugin_cfg($plugin, $sections=false) {
$cfg = file_exists($ram) ? parse_ini_file($ram, $sections) : [];
return file_exists($rom) ? array_replace_recursive($cfg, parse_ini_file($rom, $sections)) : $cfg;
}
-
function parse_cron_cfg($plugin, $job, $text = "") {
$cron = "/boot/config/plugins/$plugin/$job.cron";
if ($text) file_put_contents($cron, $text); else @unlink($cron);
exec("/usr/local/sbin/update_cron");
}
-
function agent_fullname($agent, $state) {
switch ($state) {
case 'enabled' : return "/boot/config/plugins/dynamix/notifications/agents/$agent";
@@ -35,13 +33,11 @@ function agent_fullname($agent, $state) {
default : return $agent;
}
}
-
function get_plugin_attr($attr, $file) {
global $docroot;
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin ".escapeshellarg($attr)." ".escapeshellarg($file), $result, $error);
if ($error===0) return $result[0];
}
-
function plugin_update_available($plugin, $os=false) {
$local = get_plugin_attr('version', "/var/log/plugins/$plugin.plg");
$remote = get_plugin_attr('version', "/tmp/plugins/$plugin.plg");
@@ -52,13 +48,11 @@ function plugin_update_available($plugin, $os=false) {
if (version_compare($server, $unraid, '>=')) return $remote;
}
}
-
-function get_value(&$object,$name,$default) {
+function get_value(&$object, $name, $default) {
global $var;
$value = $object[$name] ?? -1;
return $value!==-1 ? $value : ($var[$name] ?? $default);
}
-
function get_ctlr_options(&$type, &$disk) {
if (!$type) return;
$ports = [];
@@ -70,4 +64,7 @@ function get_ctlr_options(&$type, &$disk) {
function port_name($port) {
return substr($port,-2)!='n1' ? $port : substr($port,0,-2);
}
+function exceed($value, $limit, $top=100) {
+ return ($value>$limit && $limit>0 && $value<=$top);
+}
?>
diff --git a/plugins/dynamix/include/local_prepend.php b/plugins/dynamix/include/local_prepend.php
index 978487239..a93f23053 100644
--- a/plugins/dynamix/include/local_prepend.php
+++ b/plugins/dynamix/include/local_prepend.php
@@ -1,5 +1,5 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Wrappers.php";
$memory = '/tmp/memory.tmp';
diff --git a/plugins/dynamix/include/update.ssmtp.php b/plugins/dynamix/include/update.ssmtp.php
index 2a3a0af22..dee6e566d 100644
--- a/plugins/dynamix/include/update.ssmtp.php
+++ b/plugins/dynamix/include/update.ssmtp.php
@@ -1,6 +1,6 @@
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Encryption.php";
$_POST['AuthPass'] = base64_encrypt($_POST['AuthPass']);
diff --git a/plugins/dynamix/scripts/disk_log b/plugins/dynamix/scripts/disk_log
index 9501ff861..93b1e5647 100755
--- a/plugins/dynamix/scripts/disk_log
+++ b/plugins/dynamix/scripts/disk_log
@@ -1,7 +1,7 @@
#!/usr/bin/php -q
Error Warning System Array \n";
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/ColorCoding.php";
$ata = exec("ls -n ".escapeshellarg("/sys/block/{$argv[1]}")."|grep -Po 'ata\d+'");
diff --git a/plugins/dynamix/scripts/emhttpd_update b/plugins/dynamix/scripts/emhttpd_update
index e626c30c1..8d41f9c48 100755
--- a/plugins/dynamix/scripts/emhttpd_update
+++ b/plugins/dynamix/scripts/emhttpd_update
@@ -12,7 +12,7 @@
*/
?>
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/publish.php";
curl_socket("/var/run/emhttpd.socket", "http://localhost/status.htm");
?>
diff --git a/plugins/dynamix/scripts/monitor b/plugins/dynamix/scripts/monitor
index 74538402c..9dd891c19 100755
--- a/plugins/dynamix/scripts/monitor
+++ b/plugins/dynamix/scripts/monitor
@@ -30,6 +30,7 @@ $high1 = $unraid['display']['critical'];
$high2 = $unraid['display']['warning'];
$server = strtoupper($var['NAME']);
$errors = [];
+$top = 120;
function plus($val,$word,$last) {
return $val>0 ? (($val||$last) ? ($val.' '.$word.($val!=1?'s':'').($last ?'':', ')) : '') : '';
@@ -90,11 +91,11 @@ function read_write_parity_log($epoch,$duration,$speed,$status,$error) {
return str_replace("\n","",$line);
}
function check_temp($name,$temp,$text,$info) {
- global $notify,$disks,$saved,$unraid,$server;
+ global $notify,$disks,$saved,$unraid,$server,$top;
$disk = &$disks[$name];
$hot = $disk['hotTemp'] ?? $unraid['display']['hot'];
$max = $disk['maxTemp'] ?? $unraid['display']['max'];
- $warn = $temp>=$max && $max>0 ? 'alert' : ($temp>=$hot && $hot>0 ? 'warning' : '');
+ $warn = exceed($temp,$max,$top) ? 'alert' : (exceed($temp,$hot,$top) ? 'warning' : '');
$item = 'temp';
$last = $saved[$item][$name] ?? 0;
if ($warn) {
@@ -103,7 +104,7 @@ function check_temp($name,$temp,$text,$info) {
$saved[$item][$name] = $max>0 && $temp<=$max ? $max : $temp;
}
} else {
- if ($last) {
+ if ($last && $temp<=$top) {
exec("$notify -e ".escapeshellarg("unRAID $text message")." -s ".escapeshellarg("Notice [$server] - $text returned to normal temperature")." -d ".escapeshellarg("$info"));
unset($saved[$item][$name]);
}
@@ -171,9 +172,9 @@ function check_usage($name,$used,$text,$info) {
global $notify,$disks,$saved,$unraid,$server;
if ($used == -1) return;
$disk = &$disks[$name];
- $warning = $disk['warning'] ?? $unraid['display']['warning'];
+ $warning = $disk['warning'] ?? $unraid['display']['warning'];
$critical = $disk['critical'] ?? $unraid['display']['critical'];
- $warn = $used>=$critical && $critical>0 ? 'alert' : ($used>=$warning && $warning>0 ? 'warning' : '');
+ $warn = exceed($used,$critical) ? 'alert' : (exceed($used,$warning) ? 'warning' : '');
$item = 'used';
$last = $saved[$item][$name] ?? 0;
if ($warn) {
@@ -182,7 +183,7 @@ function check_usage($name,$used,$text,$info) {
$saved[$item][$name] = $critical>0 && $used<=$critical ? $critical : $used;
}
} else {
- if ($last) {
+ if ($last && $used<=100) {
exec("$notify -e ".escapeshellarg("unRAID $text message")." -s ".escapeshellarg("Notice [$server] - $text returned to normal utilization level")." -d ".escapeshellarg("$info"));
unset($saved[$item][$name]);
}
diff --git a/plugins/dynamix/scripts/notify b/plugins/dynamix/scripts/notify
index 01f58c190..4550191e7 100755
--- a/plugins/dynamix/scripts/notify
+++ b/plugins/dynamix/scripts/notify
@@ -13,7 +13,7 @@
*/
?>
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Wrappers.php";
require_once "$docroot/webGui/include/Encryption.php";
diff --git a/plugins/dynamix/scripts/statuscheck b/plugins/dynamix/scripts/statuscheck
index 2eb25c9ce..236bd31f2 100755
--- a/plugins/dynamix/scripts/statuscheck
+++ b/plugins/dynamix/scripts/statuscheck
@@ -1,7 +1,7 @@
#!/usr/bin/php -q
-$var = parse_ini_file("/var/local/emhttp/var.ini");
-$disks = parse_ini_file("/var/local/emhttp/disks.ini",true);
+$var = parse_ini_file("/var/local/emhttp/var.ini");
+$disks = parse_ini_file("/var/local/emhttp/disks.ini",true);
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/Wrappers.php";
require_once "$docroot/webGui/include/CustomMerge.php";
diff --git a/plugins/dynamix/scripts/tail_log b/plugins/dynamix/scripts/tail_log
index 1661843ea..593f9e649 100755
--- a/plugins/dynamix/scripts/tail_log
+++ b/plugins/dynamix/scripts/tail_log
@@ -1,7 +1,7 @@
#!/usr/bin/php -q
Error Warning System Array Login \n";
-$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
+$docroot = $docroot ?: $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
require_once "$docroot/webGui/include/ColorCoding.php";
$handle = popen('/usr/bin/tail -n 40 -f '.escapeshellarg("/var/log/{$argv[1]}").' 2>&1', 'r');
diff --git a/plugins/dynamix/styles/default-azure.css b/plugins/dynamix/styles/default-azure.css
index 453a8f8ec..6eda62898 100644
--- a/plugins/dynamix/styles/default-azure.css
+++ b/plugins/dynamix/styles/default-azure.css
@@ -138,7 +138,7 @@ table.disk_status tr td:last-child{width:4%;padding-right:10px}
table.disk_status tbody tr{border-bottom:#F3F0F4 1px solid;line-height:30px}
table.disk_status.stats tr>td+td{text-align:left;padding-left:0;padding-right:12px}
table.array_status{line-height:30px}
-table.array_status td{padding:12px 0}
+table.array_status td{padding:4px 0}
table.array_status td:first-child{text-transform:uppercase}
table.array_status tr>td{text-align:left;white-space:nowrap;padding-left:12px;width:30%}
table.array_status tr>td+td{padding-left:2px;width:20%}
diff --git a/plugins/dynamix/styles/default-gray.css b/plugins/dynamix/styles/default-gray.css
index 2bcfb7102..8df517c83 100644
--- a/plugins/dynamix/styles/default-gray.css
+++ b/plugins/dynamix/styles/default-gray.css
@@ -138,7 +138,7 @@ table.disk_status tr td:last-child{width:4%;padding-right:10px}
table.disk_status tbody tr{border-bottom:#0C0F0B 1px solid;line-height:30px}
table.disk_status.stats tr>td+td{text-align:left;padding-left:0;padding-right:12px}
table.array_status{line-height:30px}
-table.array_status td{padding:12px 0}
+table.array_status td{padding:4px 0}
table.array_status td:first-child{text-transform:uppercase}
table.array_status tr>td{text-align:left;white-space:nowrap;padding-left:12px;width:30%}
table.array_status tr>td+td{padding-left:2px;width:20%}