* Mon May 12 2025 Brian Read <brianr@koozali.org> 11.0.0-1.sme

- Adding SM2 panel [SME: 13004]
- Upgrade to phpsysinfo 3.4.4
- Add code to delete inline styles and add css to make it look better.
- version saved / built uses the static version, which means no drops downs and choices.
This commit is contained in:
2025-05-14 16:14:01 +01:00
parent 80b1da5fa5
commit c8ce77259d
952 changed files with 51341 additions and 28699 deletions

View File

@@ -1,17 +1,4 @@
<?php
/**
* SMART Plugin
*
* PHP version 5
*
* @category PHP
* @package PSI_Plugin_SMART
* @author Antoine Bertin <diaoulael@users.sourceforge.net>
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @version SVN: $Id: class.smart.inc.php 707 2012-11-28 10:20:49Z namiltd $
* @link http://phpsysinfo.sourceforge.net
*/
/**
* SMART plugin, which displays all SMART informations available
*
@@ -19,7 +6,7 @@
* @package PSI_Plugin_SMART
* @author Antoine Bertin <diaoulael@users.sourceforge.net>
* @copyright 2009 phpSysInfo
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version
* @version Release: 3.0
* @link http://phpsysinfo.sourceforge.net
*/
@@ -37,6 +24,12 @@ class SMART extends PSI_Plugin
*/
private $_result = array();
/**
* variable, which holds the events of disks
* @var array
*/
private $_event = array();
/**
* variable, which holds PSI_PLUGIN_SMART_IDS well formated datas
* @var array
@@ -52,78 +45,164 @@ class SMART extends PSI_Plugin
{
parent::__construct(__CLASS__, $enc);
switch (strtolower(PSI_PLUGIN_SMART_ACCESS)) {
case 'command':
if (defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
$disks = eval(PSI_PLUGIN_SMART_DEVICES);
case 'wmi':
case 'command':
case 'data':
if (defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
$disks = eval(PSI_PLUGIN_SMART_DEVICES);
} else {
$disks = array(PSI_PLUGIN_SMART_DEVICES);
}
if (defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
$fullIds = eval(PSI_PLUGIN_SMART_IDS);
} else {
$disks = array(PSI_PLUGIN_SMART_DEVICES);
$fullIds = array(PSI_PLUGIN_SMART_IDS);
}
foreach ($disks as $disk) {
if (trim($disk) != "") {
$diskdev = "";
if (preg_match("/\s*\(([^\(\(]*)\)\s*(.*)/", $disk, $devdisk)) {
$diskname = trim($devdisk[2]);
if (trim($devdisk[1]) != "") {
$diskdev = "--device ".preg_replace('/\./', ',', trim($devdisk[1]));
foreach ($fullIds as $fullId) {
$arrFullId = preg_split('/-/', $fullId);
$this->_ids[intval($arrFullId[0])]["value_type"] = strtolower($arrFullId[1]);
if (!empty($arrFullId[2])) {
$this->_ids[intval($arrFullId[2])]["replace"] = intval($arrFullId[0]);
$this->_ids[intval($arrFullId[2])]["value_type"] = strtolower($arrFullId[1]);
}
}
}
}
break;
default:
$this->global_error->addConfigError("__construct()", "[smart] ACCESS");
}
switch (strtolower(PSI_PLUGIN_SMART_ACCESS)) {
case 'wmi':
if (((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME')) || (defined('PSI_EMU_HOSTNAME') && !defined('PSI_EMU_PORT'))) {
if ((PSI_OS == 'WINNT') && !defined('PSI_EMU_HOSTNAME') && !WINNT::isAdmin()) {
$this->global_error->addError("SMART WMI mode error", "Mode allowed for WinNT systems, with administrator privileges (run as administrator)");
} else {
$asd_wmi = null;
try {
$wmi = WINNT::initWMI('root\wmi');
$asd_wmi = WINNT::getWMI($wmi, 'MSStorageDriver_ATAPISmartData', array('VendorSpecific'));
} catch (Exception $e) {
}
foreach ($asd_wmi as $_nr=>$asd) {
$_name = "/dev/sd".chr(97+$_nr);
if (array_search($_name, $disks) !== false) {
$this->_filecontent[$_name] = "\nVendor Specific SMART Attributes with Thresholds\n";
$this->_filecontent[$_name] .= "ID# _ATTRIBUTE_NAME_ FLAG VALUE WORST RAW_VALUE\n";
$asdvs = $asd['VendorSpecific'];
if (gettype($asdvs) === "string") { // WMIC on Linux
if (preg_match("/^\(([\d\,]+)\)$/", $asdvs, $buffer)) {
$asdvs = preg_split("/\,/", $buffer[1], -1, PREG_SPLIT_NO_EMPTY);
} else {
$asdvs = array();
}
} else {
$diskname = trim($disk);
}
$buffer = "";
if (trim($diskname != "") && (CommonFunctions::executeProgram('smartctl', '--all'.' '.$diskdev.' '.$diskname, $buffer, PSI_DEBUG))) {
$this->_filecontent[trim($disk)] = $buffer;
if (count($asdvs) >= 12) for ($c = 2; $c < count($asdvs); $c += 12) {
//Attribute values 0x00, 0xff are invalid
$id = intval($asdvs[$c]);
if (($id != 0) && ($id != 255)) {
switch ($id) {
case 3:
//raw16(avg16)
$this->_filecontent[$_name] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
case 5:
case 196:
//raw16(raw16)
$this->_filecontent[$_name] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
case 9:
case 240:
//raw24(raw8)
$this->_filecontent[$_name] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6]+65536*$asdvs[$c+7])."\n";
break;
case 190:
case 194:
//tempminmax
$this->_filecontent[$_name] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
default:
//raw48
$this->_filecontent[$_name] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6]+65536*$asdvs[$c+7]+16777216*$asdvs[$c+8])."\n";
}
}
}
$this->_filecontent[$_name] .= "SMART Error Log Version";
}
}
}
if (defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
$fullIds = eval(PSI_PLUGIN_SMART_IDS);
} else {
$fullIds = array(PSI_PLUGIN_SMART_IDS);
}
foreach ($fullIds as $fullId) {
$arrFullId = preg_split('/-/', $fullId);
$this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
if (!empty($arrFullId[2]))
$this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
}
}
break;
case 'data':
if (defined('PSI_PLUGIN_SMART_DEVICES') && is_string(PSI_PLUGIN_SMART_DEVICES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_DEVICES)) {
$disks = eval(PSI_PLUGIN_SMART_DEVICES);
} else {
$disks = array(PSI_PLUGIN_SMART_DEVICES);
}
$dn=0;
foreach ($disks as $disk) {
$buffer="";
if (CommonFunctions::rfts(APP_ROOT."/data/smart{$dn}.txt", $buffer) && !empty($buffer)) {
$this->_filecontent[$disk] = $buffer;
}
break;
case 'command':
if (!defined('PSI_EMU_HOSTNAME') || defined('PSI_EMU_PORT')) foreach ($disks as $disk) {
if (trim($disk) != "") {
$diskdev = "";
if (preg_match("/\s*\(([^\(\(]*)\)\s*(.*)/", $disk, $devdisk)) {
$diskname = trim($devdisk[2]);
if (trim($devdisk[1]) != "") {
$diskdev = "--device ".preg_replace('/\./', ',', trim($devdisk[1]));
}
$dn++;
}
}
if (defined('PSI_PLUGIN_SMART_IDS') && is_string(PSI_PLUGIN_SMART_IDS)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_SMART_IDS)) {
$fullIds = eval(PSI_PLUGIN_SMART_IDS);
} else {
$fullIds = array(PSI_PLUGIN_SMART_IDS);
$diskname = trim($disk);
}
foreach ($fullIds as $fullId) {
$arrFullId = preg_split('/-/', $fullId);
$this->_ids[intval($arrFullId[0])] = strtolower($arrFullId[1]);
if (!empty($arrFullId[2]))
$this->_ids[intval($arrFullId[2])] = "#replace-".intval($arrFullId[0]);
$buffer = "";
if (trim($diskname != "") && (CommonFunctions::executeProgram('smartctl', '--all'.' '.$diskdev.' '.$diskname, $buffer, PSI_DEBUG))) {
$this->_filecontent[trim($disk)] = $buffer;
}
}
break;
default:
$this->global_error->addError("switch(PSI_PLUGIN_SMART_ACCESS)", "Bad SMART configuration in phpsysinfo.ini");
break;
}
break;
case 'data':
$dn=0;
if (!defined('PSI_EMU_HOSTNAME')) foreach ($disks as $disk) {
$buffer="";
if (CommonFunctions::rftsdata("smart{$dn}.tmp", $buffer) && !empty($buffer)) {
if (preg_match("/^.+\n.{(.+)}/", $buffer, $out)) { //wmic format
$line = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', '', $out[1]));
$this->_filecontent[$disk] = "\nVendor Specific SMART Attributes with Thresholds\n";
$this->_filecontent[$disk] .= "ID# _ATTRIBUTE_NAME_ FLAG VALUE WORST RAW_VALUE\n";
$asdvs = preg_split('/\s*,\s*/', trim($line), -1, PREG_SPLIT_NO_EMPTY);
for ($c = 2; $c < count($asdvs); $c += 12) {
//Attribute values 0x00, 0xff are invalid
$id = $asdvs[$c];
if (($id != 0) && ($id != 255)) {
switch ($id) {
case 3:
//raw16(avg16)
$this->_filecontent[$disk] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
case 5:
case 196:
//raw16(raw16)
$this->_filecontent[$disk] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
case 9:
case 240:
//raw24(raw8)
$this->_filecontent[$disk] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6]+65536*$asdvs[$c+7])."\n";
break;
case 190:
case 194:
//tempminmax
$this->_filecontent[$disk] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6])."\n";
break;
default:
//raw48
$this->_filecontent[$disk] .= $id." ID".$id." 0x".substr("0".dechex(intval($asdvs[$c+2])), -2).substr("0".dechex(intval($asdvs[$c+1])), -2)." ".substr("00".$asdvs[$c+3], -3)." ".substr("00".$asdvs[$c+4], -3)." ".($asdvs[$c+5]+256*$asdvs[$c+6]+65536*$asdvs[$c+7]+16777216*$asdvs[$c+8])."\n";
}
}
}
$this->_filecontent[$disk] .= "SMART Error Log Version";
} else {
$this->_filecontent[$disk] = $buffer;
}
}
$dn++;
}
break;
}
}
@@ -139,6 +218,11 @@ class SMART extends PSI_Plugin
return;
}
foreach ($this->_filecontent as $disk=>$result) {
if (preg_match('/\n((Smartctl open device:.+ failed:[^\r\n]+)|(Device does not support SMART)|(SMART support is:\s*Unavailable -[^\r\n]+))/', $result, $error)) {
$this->global_error->addError("SMART plugin ".$disk." error", trim($error[1]));
continue;
}
// set the start and end offset in the result string at the beginning and end respectively
// just in case we don't find the two strings, so that it still works as expected.
$startIndex = 0;
@@ -156,112 +240,292 @@ class SMART extends PSI_Plugin
if ($startIndex && $endIndex && ($endIndex>$startIndex))
$vendorInfos = preg_split("/\n/", substr($result, $startIndex, $endIndex - $startIndex));
$i = 0; // Line number
if (!empty($vendorInfos)) {
if (preg_match('/\nSMART overall-health self-assessment test result\: ([^!\n]+)/', $result, $tmpbuf)) {
$event=trim($tmpbuf[1]);
if (!empty($event) && ($event!=='PASSED')) {
$this->_event[$disk] = $event;
}
}
$cid = 0;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nATA Error Count\: (\d+)/', $result, $tmpbuf)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "ATA_Error_Count";
$this->_result[$disk][$i]['raw_value'] = $tmpbuf[1];
$i++;
} elseif (preg_match('/\nNo Errors Logged/', $result, $tmpbuf)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "ATA_Error_Count";
$this->_result[$disk][$i]['raw_value'] = 0;
$i++;
}
}
$labels = preg_split('/\s+/', $vendorInfos[1]);
foreach ($labels as $k=>$v) {
$labels[$k] = str_replace('#', '', strtolower($v));
}
$i = 0; // Line number
foreach ($vendorInfos as $line) {
foreach ($vendorInfos as $line) if (preg_match('/^\s*((\d+)|(id))\s/', $line)) {
$line = preg_replace('/^\s+/', '', $line);
$values = preg_split('/\s+/', $line);
if (count($values) > count($labels)) {
$values = array_slice($values, 0, count($labels), true);
}
$j = 0;
$found = false;
$found = 0;
foreach ($values as $value) {
if ((in_array($value, array_keys($this->_ids)) && $labels[$j] == 'id')) {
$arrFullVa = preg_split('/-/', $this->_ids[$value]);
if (($arrFullVa[0]=="#replace") && !empty($arrFullVa[1]))
$value=$arrFullVa[1];
}
if (((in_array($value, array_keys($this->_ids)) && $labels[$j] == 'id') || ($found && (in_array($labels[$j], array_values($this->_ids)))) || ($found && $labels[$j] == 'attribute_name'))) {
if (in_array($value, array_keys($this->_ids)) && ($labels[$j] == 'id') && ($value > 0) && ($value < 255)) {
$this->_result[$disk][$i][$labels[$j]] = $value;
$found = $value;
} elseif (($found > 0) && (($labels[$j] == 'attribute_name') || ($labels[$j] == $this->_ids[$found]["value_type"]))) {
$this->_result[$disk][$i][$labels[$j]] = $value;
$found = true;
}
$j++;
}
$i++;
}
} else {
//SCSI devices
if (!empty($this->_ids[1]) && ($this->_ids[1]=="raw_value")) {
preg_match('/read\: (.*)\n/', $result, $lines);
if (!empty($lines) && !empty($lines[0])) {
$values=preg_split('/\s+/', $lines[0]);
if (!empty($values) && ($values[7]!=null)) {
$vals=preg_split('/[,\.]/', $values[7]);
$this->_result[$disk][0]['id'] = 1;
$this->_result[$disk][0]['attribute_name'] = "Raw_Read_Error_Rate";
$this->_result[$disk][0]['raw_value'] = $vals[0];
//SCSI and MVMe devices
$cid = 187;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nread\: (.*)\n/', $result, $tmpbufr) && preg_match('/\nwrite\: (.*)\n/', $result, $tmpbufw)) {
$valuesr=preg_split('/ +/', $tmpbufr[0]);
$valuesw=preg_split('/ +/', $tmpbufw[0]);
if (!preg_match('/\nverify\: (.*)\n/', $result, $tmpbufv)) { //if no verify value yet
$valuesv[7] = 0;
} else {
$valuesv=preg_split('/ +/', $tmpbufv[0]);
}
}
}
if (!empty($this->_ids[5]) && ($this->_ids[5]=="raw_value")) {
preg_match('/Elements in grown defect list\: (.*)\n/', $result, $lines);
if (!empty($lines) && !empty($lines[0])) {
$values=preg_split('/\s+/', $lines[0]);
if (!empty($valuesr) && !empty($valuesw) && !empty($valuesv) && ($valuesr[7]!=null) && ($valuesw[7]!=null) && ($valuesw[7]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Reported_Uncorrectable_Errors";
$this->_result[$disk][$i]['raw_value'] = intval($valuesr[7])+intval($valuesw[7])+intval($valuesv[7]);
$i++;
}
} elseif (preg_match('/\nMedia and Data Integrity Errors\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[5]!=null)) {
$vals=preg_split('/[,\.]/', $values[5]);
$this->_result[$disk][1]['id'] = 5;
$this->_result[$disk][1]['attribute_name'] = "Reallocated_Sector_Ct";
$this->_result[$disk][1]['raw_value'] = $vals[0];
$vals=preg_replace('/,/', '', trim($values[5]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Reported_Uncorrectable_Errors";
$this->_result[$disk][$i]['raw_value'] = $vals;
$i++;
}
}
}
if (!empty($this->_ids[9]) && ($this->_ids[9]=="raw_value")) {
preg_match('/ number of hours powered up = (.*)\n/', $result, $lines);
if (!empty($lines) && !empty($lines[0])) {
$values=preg_split('/\s+/', $lines[0]);
$cid = 5;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nElements in grown defect list\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[5]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Reallocated_Sector_Ct";
$this->_result[$disk][$i]['raw_value'] = trim($values[5]);
$i++;
}
}
}
$cid = 9;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\n +number of hours powered up = (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[7]!=null)) {
$vals=preg_split('/[,\.]/', $values[7]);
$this->_result[$disk][2]['id'] = 9;
$this->_result[$disk][2]['attribute_name'] = "Power_On_Hours";
$this->_result[$disk][2]['raw_value'] = $vals[0];
$vals=preg_split('/[,\.]/', trim($values[7]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Power_On_Hours";
$this->_result[$disk][$i]['raw_value'] = $vals[0];
$i++;
}
}
}
if (!empty($this->_ids[194]) && ($this->_ids[194]=="raw_value")) {
preg_match('/Current Drive Temperature\: (.*)\n/', $result, $lines);
if (!empty($lines) && !empty($lines[0])) {
$values=preg_split('/\s+/', $lines[0]);
} elseif (preg_match('/\nPower On Hours\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$vals=preg_split('/[,\.]/', $values[3]);
$this->_result[$disk][3]['id'] = 194;
$this->_result[$disk][3]['attribute_name'] = "Temperature_Celsius";
$this->_result[$disk][3]['raw_value'] = $vals[0];
$vals=preg_replace('/,/', '', trim($values[3]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Power_On_Hours";
$this->_result[$disk][$i]['raw_value'] = $vals;
$i++;
}
}
}
$cid = 194;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nCurrent Drive Temperature\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Temperature_Celsius";
$this->_result[$disk][$i]['raw_value'] = trim($values[3]);
$i++;
}
} elseif (preg_match('/\nTemperature\: (.*) Celsius/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[1]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Temperature_Celsius";
$this->_result[$disk][$i]['raw_value'] = trim($values[1]);
$i++;
}
}
}
$cid = 12;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nPower Cycles\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[2]!=null)) {
$vals=preg_replace('/,/', '', trim($values[2]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Power_Cycle_Count";
$this->_result[$disk][$i]['raw_value'] = $vals;
$i++;
}
}
}
$cid = 192;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nUnsafe Shutdowns\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[2]!=null)) {
$vals=preg_replace('/,/', '', trim($values[2]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Unsafe_Shutdown_Count";
$this->_result[$disk][$i]['raw_value'] = $vals;
$i++;
}
}
}
$cid = 255;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nNon-medium error count\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Non-medium_Error_Count";
$this->_result[$disk][$i]['raw_value'] = trim($values[3]);
$i++;
}
}
}
$cid = 32;
if (!empty($this->_ids[$cid]) && (($this->_ids[$cid]["value_type"]=="raw_value") || ($this->_ids[$cid]["value_type"]=="value"))) {
if (preg_match('/\nData Units Read\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$vals=preg_replace('/,/', '', trim($values[3]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Data_Units_Read";
if ($this->_ids[$cid]["value_type"]=="raw_value") $this->_result[$disk][$i]['raw_value'] = $vals;
if (($this->_ids[$cid]["value_type"]=="value") && preg_match('/\[(.+)\]/', $tmpbuf[1], $tmpbuf2)) {
$this->_result[$disk][$i]['value'] = trim($tmpbuf2[1]);
}
$i++;
}
}
}
$cid = 48;
if (!empty($this->_ids[$cid]) && (($this->_ids[$cid]["value_type"]=="raw_value") || ($this->_ids[$cid]["value_type"]=="value"))) {
if (preg_match('/\nData Units Written\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$vals=preg_replace('/,/', '', trim($values[3]));
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Data_Units_Written";
if ($this->_ids[$cid]["value_type"]=="raw_value") $this->_result[$disk][$i]['raw_value'] = $vals;
if (($this->_ids[$cid]["value_type"]=="value") && preg_match('/\[(.+)\]/', $tmpbuf[1], $tmpbuf2)) {
$this->_result[$disk][$i]['value'] = trim($tmpbuf2[1]);
}
$i++;
}
}
}
$cid = 4;
if (!empty($this->_ids[$cid]) && ($this->_ids[$cid]["value_type"]=="raw_value")) {
if (preg_match('/\nAccumulated start-stop cycles\: (.*)\n/', $result, $tmpbuf)) {
$values=preg_split('/ +/', $tmpbuf[0]);
if (!empty($values) && ($values[3]!=null)) {
$this->_result[$disk][$i]['id'] = $cid;
$this->_result[$disk][$i]['attribute_name'] = "Start_Stop_Count";
$this->_result[$disk][$i]['raw_value'] = trim($values[3]);
$i++;
}
}
}
if (preg_match('/\nSMART Health Status\: ([^\[\n]+)/', $result, $tmpbuf)) {
$event=trim($tmpbuf[1]);
if (!empty($event) && ($event!=='OK')) {
$this->_event[$disk] = $event;
}
}
}
}
//Usage test
$newIds = array();
foreach ($this->_ids as $id=>$column_name) {
$found = 0;
//replacement where necessary
foreach ($this->_ids as $id=>$column) if (isset($column["replace"])) {
foreach ($this->_result as $diskName=>$diskInfos) {
if ($found!=2) foreach ($diskInfos as $lineInfos) {
if ($found!=2) {
$found = 0;
foreach ($lineInfos as $label=>$value) {
if (($found==0) && ($label=="id") && ($value==$id))
$found = 1;
if (($found==1) && ($label==$column_name))
$found = 2;
}
$not_found = true;
foreach ($diskInfos as $lineInfos)
if (($lineInfos["id"] == $column["replace"]) && isset($lineInfos[$column["value_type"]])) {
$not_found = false;
break;
}
foreach ($diskInfos as $did=>$lineInfos)
if (($lineInfos["id"] == $id) && isset($lineInfos[$column["value_type"]])) {
if ($not_found)
$this->_result[$diskName][$did]["id"] = $column["replace"];
else
unset($this->_result[$diskName][$did]);
break;
}
}
if ($found==2) $newIds[$id] = $this->_ids[$id];
}
$this->_ids = $newIds;
//reformat to power on hours
foreach ($this->_result as $diskName=>$diskInfos) {
foreach ($diskInfos as $did=>$lineInfos)
if ((($lineInfos['id'] == 9) && isset($lineInfos['attribute_name'])) &&
(($lineInfos['attribute_name'] === "Power_On_Hours_and_Msec") || ($lineInfos['attribute_name'] === "Power_On_Seconds"))) {
if (isset($lineInfos['raw_value'])) {
$raw_value = preg_split("/h/", $lineInfos['raw_value'], -1, PREG_SPLIT_NO_EMPTY);
$this->_result[$diskName][$did]['raw_value'] = $raw_value[0];
}
$this->_result[$diskName][$did]['attribute_name'] = "Power_On_Hours";
break;
}
}
//set attribute name/names
foreach ($this->_ids as $id=>$column) if (!isset($column["replace"])) {
foreach ($this->_result as $diskName=>$diskInfos) {
foreach ($diskInfos as $lineInfos)
if (($lineInfos["id"] == $id) && isset($lineInfos["attribute_name"])) {
$canname = preg_replace("/\s|;/", "_", trim($lineInfos["attribute_name"]));
if (!isset($this->_ids[$id]["attribute_name"]))
$this->_ids[$id]["attribute_name"] = $canname;
elseif (!in_array($canname, preg_split('/;/', $this->_ids[$id]["attribute_name"])))
$this->_ids[$id]["attribute_name"] .= ";".$canname;
break;
}
}
}
}
/**
* generates the XML content for the plugin
*
* @return SimpleXMLObject entire XML content for the plugin
* @return SimpleXMLElement entire XML content for the plugin
*/
public function xml()
{
@@ -271,10 +535,11 @@ class SMART extends PSI_Plugin
$columnsChild = $this->xml->addChild('columns');
// Fill the xml with preferences
foreach ($this->_ids as $id=>$column_name) {
foreach ($this->_ids as $id=>$column) if (isset($column["attribute_name"])) {
$columnChild = $columnsChild->addChild('column');
$columnChild->addAttribute('id', $id);
$columnChild->addAttribute('name', $column_name);
$columnChild->addAttribute('name', $column["value_type"]);
$columnChild->addAttribute('attribute_name', $column["attribute_name"]);
}
$disksChild = $this->xml->addChild('disks');
@@ -282,15 +547,10 @@ class SMART extends PSI_Plugin
foreach ($this->_result as $diskName=>$diskInfos) {
$diskChild = $disksChild->addChild('disk');
$diskChild->addAttribute('name', $diskName);
if (isset($this->_event[$diskName])) $diskChild->addAttribute('event', $this->_event[$diskName]);
foreach ($diskInfos as $lineInfos) {
$lineChild = $diskChild->addChild('attribute');
if (($lineInfos['id'] == 9) && ($lineInfos['attribute_name'] == "Power_On_Hours_and_Msec")) {
$lineInfos['attribute_name'] = "Power_On_Hours";
$raw_value = preg_split("/h/", $lineInfos['raw_value'], -1, PREG_SPLIT_NO_EMPTY);
$lineInfos['raw_value'] = $raw_value[0];
}
foreach ($lineInfos as $label=>$value) {
$lineChild->addAttribute($label, $value);
}

View File

@@ -4,3 +4,7 @@
#Plugin_SMARTTable tbody tr td {
text-align: right;
}
#Plugin_SMARTTable thead tr th {
cursor: pointer;
}

View File

@@ -33,20 +33,35 @@ var smart_show = false, smart_table;
* fill the plugin block with table structure
*/
function smart_buildTable(xml) {
var html = "";
var html = "", hostname = "";
var smartid;
var attribute_name;
html += "<table id=\"Plugin_SMARTTable\" style=\"border-spacing:0;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th class=\"right\">" + genlang(3, false, "SMART") + "</th>\n";
hostname = $("Plugins Plugin_SMART", xml).attr('Hostname');
if (hostname !== undefined) {
$('span[class=Hostname_SMART]').html(hostname);
}
html += "<div style=\"overflow-x:auto;\">\n";
html += " <table id=\"Plugin_SMARTTable\" style=\"border-collapse:collapse;\">\n";
html += " <thead>\n";
html += " <tr>\n";
html += " <th class=\"right\">" + genlang(2, "SMART") + "</th>\n";
$("Plugins Plugin_SMART columns column", xml).each(function smart_table_header() {
html += " <th class=\"right\">" + genlang(100 + parseInt($(this).attr("id"), 10), false, "SMART") + "</th>\n";
attribute_name = $(this).attr("attribute_name");
if (typeof attribute_name === 'string')
attribute_name = attribute_name.replace(/_/g, " ").replace(/;/g, "<br>");
else
attribute_name = "Attribute " + $(this).attr("id");
html += " <th class=\"right\">" + attribute_name + "</th>\n";
});
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += "</table>\n";
html += " </tr>\n";
html += " </thead>\n";
html += " <tbody>\n";
html += " </tbody>\n";
html += " </table>\n";
html += "</div>\n";
$("#Plugin_SMART").append(html);
@@ -67,33 +82,36 @@ function smart_buildTable(xml) {
* @param {jQuery} xml plugin-XML
*/
function smart_populate(xml) {
var name = "", columns = [];
var name = "", event = "", columns = [];
smart_table.fnClearTable();
// Get datas that the user want to be displayed
$("Plugins Plugin_SMART columns column", xml).each(function smart_find_columns() {
columns[parseInt($(this).attr("id"), 10)] = $(this).attr("name");
smart_show = true;
});
// Now we add selected datas in the table
$("Plugins Plugin_SMART disks disk", xml).each(function smart_fill_table() {
var values = [], display = [], i;
name = $(this).attr("name");
name = $(this).attr("name").replace(/\)/g, ")<wbr>");
$(this).find("attribute").each(function smart_fill_data() {
if (columns[parseInt($(this).attr("id"), 10)] && columns[parseInt($(this).attr("id"), 10)] !== "") {
values[parseInt($(this).attr("id"), 10)] = $(this).attr(columns[parseInt($(this).attr("id"), 10)]);
}
});
display.push("<span style=\"display:none;\">" + name + "</span>" + name);
event = $(this).attr("event");
if (event !== undefined)
display.push("<span style=\"display:none;\">" + name + "</span><table style=\"width:0;float:right;*float:right;border-spacing:0;\"><tbody><tr><td style=\"padding:0;\">" + name +" </td><td style=\"padding:0;\"><img style=\"vertical-align:middle;width:16px;\" src=\"./gfx/attention.gif\" alt=\"!\" title=\""+event+"\"/></td></tr></tbody></table>");
else
display.push("<span style=\"display:none;\">" + name + "</span>" + name);
// On "columns" so we get the right order
// fixed for Firefox (fix wrong order)
// for (i in columns) {
$("Plugins Plugin_SMART columns column", xml).each(function smart_find_columns() {
i = parseInt($(this).attr("id"), 10);
if (typeof(values[i])==='undefined') {
// values[i] = "";
display.push("<span style=\"display:none;\"></span>");
}
else if (i === 194) {
@@ -102,38 +120,16 @@ function smart_populate(xml) {
else {
display.push("<span style=\"display:none;\">" + values[i] + "</span>" + values[i]);
}
// }
});
smart_table.fnAddData(display);
});
smart_show = true;
}
/**
* load the xml via ajax
*/
function smart_initTable() {
$.ajax({
url: "xml.php?plugin=SMART",
dataType: "xml",
error: function smart_error() {
$.jGrowl("Error loading XML document for Plugin SMART");
},
success: function smart_initBlock(xml) {
smart_buildTable(xml);
smart_populate(xml);
if (smart_show) {
plugin_translate("SMART");
$("#Plugin_SMART").show();
}
}
});
}
/**
* load the xml via ajax
*/
function smart_request() {
$("#Reload_SMARTTable").attr("title", "reload");
$.ajax({
url: "xml.php?plugin=SMART",
dataType: "xml",
@@ -142,6 +138,9 @@ function smart_request() {
},
success: function smart_buildBlock(xml) {
populateErrors(xml);
if ((smart_table === undefined) || (typeof(smart_table) !== "object")) {
smart_buildTable(xml);
}
smart_populate(xml);
if (smart_show) {
plugin_translate("SMART");
@@ -152,15 +151,13 @@ function smart_request() {
}
$(document).ready(function smart_buildpage() {
var html = "";
$("#footer").before(buildBlock("SMART", 1, true));
$("#Plugin_SMART").css("width", "915px");
$("#Plugin_SMART").addClass("fullsize");
smart_initTable();
smart_request();
$("#Reload_SMARTTable").click(function smart_reload(id) {
smart_request();
$("#Reload_SMARTTable").attr("title",datetime());
$(this).attr("title", datetime());
});
});

View File

@@ -1,76 +1,58 @@
function renderPlugin_smart(data) {
if ((data['Plugins']['Plugin_SMART'] !== undefined) && (data['Plugins']['Plugin_SMART']["columns"] !== undefined) && (items(data['Plugins']['Plugin_SMART']["columns"]["column"]).length > 0)
&& (data['Plugins']['Plugin_SMART']["disks"] !== undefined) && (items(data['Plugins']['Plugin_SMART']["disks"]["disk"]).length > 0)) {
var smartitems = items(data['Plugins']['Plugin_SMART']["columns"]["column"]);
var smartnames = {
1:"Raw Read Error Rate",
2:"Throughput Performance",
3:"Spin Up Time",
4:"Start Stop Count",
5:"Reallocated Sector Ct",
7:"Seek Error Rate",
8:"Seek Time Performance",
9:"Power On Hours",
10:"Spin Retry Count",
11:"Calibration Retry Count",
12:"Power Cycle Count",
190:"Airflow Temperature",
191:"G-sense Error Rate",
192:"Power-Off Retract Count",
193:"Load Cycle Count",
194:"Temperature",
195:"Hardware ECC Recovered",
196:"Reallocated Event Count",
197:"Current Pending Sector",
198:"Offline Uncorr.",
199:"UDMA CRC Error Count",
200:"Multi Zone Error Rate",
201:"Soft Read Error Rate",
202:"Data Address Mark Errors",
223:"Load Retry Count",
225:"Load Cycle Count"};
if ((data.Plugins.Plugin_SMART !== undefined) && (data.Plugins.Plugin_SMART.columns !== undefined) && (items(data.Plugins.Plugin_SMART.columns.column).length > 0) && (data.Plugins.Plugin_SMART.disks !== undefined) && (items(data.Plugins.Plugin_SMART.disks.disk).length > 0)) {
var smartitems = items(data.Plugins.Plugin_SMART.columns.column);
var html = '';
var i,j;
var smartid;
var attribute_name;
html+="<thead>";
html+="<tr>";
html+="<th id=\"smart_name\" class=\"rightCell\">Name</th>";
html+="<th id=\"smart_name\" class=\"rightCell\">"+genlang(2, 'smart')+"</th>"; // Name
for (i = 0; i < smartitems.length ; i++) {
smartid = smartitems[i]["@attributes"]["id"];
if (smartnames[smartid] !== undefined) {
html+="<th class=\"sorttable_numeric rightCell\">"+ smartnames[smartid] + "</th>";
} else {
html+="<th class=\"sorttable_numeric rightCell\">"+ smartid + "</th>";
}
attribute_name = smartitems[i]["@attributes"].attribute_name;
if (typeof attribute_name === 'string')
attribute_name = attribute_name.replace(/_/g, " ").replace(/;/g, "<br>");
else
attribute_name = "Attribute " + smartitems[i]["@attributes"].id;
html+="<th class=\"sorttable_numeric rightCell\">"+ attribute_name + "</th>";
}
html+="</tr>";
html+="</thead>";
var diskitems = items(data['Plugins']['Plugin_SMART']["disks"]["disk"]);
var diskitems = items(data.Plugins.Plugin_SMART.disks.disk);
html += '<tbody>';
for (i = 0; i < diskitems.length; i++) {
html += '<tr>';
html += '<th class="rightCell">'+ diskitems[i]["@attributes"]["name"] + '</th>';
attribitems = items(diskitems[i]["attribute"]);
if (diskitems[i]["@attributes"].event !== undefined)
html += '<th class="rightCell"><table class="borderless table-hover table-nopadding" style="float:right;"><tbody><tr><td>'+ diskitems[i]["@attributes"].name + ' </td><td><img style="vertical-align:middle;width:20px;" src="./gfx/attention.gif" alt="!" title="' + diskitems[i]["@attributes"].event + '"/></td></tr></tbody></table></th>';
else
html += '<th class="rightCell">'+ diskitems[i]["@attributes"].name + '</th>';
var attribitems = items(diskitems[i].attribute);
var valarray = [];
for (j = 0;j < attribitems.length; j++) {
valarray[attribitems[j]["@attributes"]["id"]] = attribitems[j]["@attributes"]["raw_value"];
valarray[attribitems[j]["@attributes"].id] = attribitems[j]["@attributes"];
}
for (j = 0; j < smartitems.length; j++) {
var smartid = smartitems[j]["@attributes"]["id"];
var itemvalue = valarray[smartid];
if ((itemvalue !== undefined) && (itemvalue !== '' )) {
if (smartid === "194") {
html += '<td class="rightCell">' + formatTemp(itemvalue, data["Options"]["@attributes"]["tempFormat"]) + '</td>';
smartid = smartitems[j]["@attributes"].id;
if ((smartid !== undefined) && (valarray[smartid] !== undefined)) {
var itemvalue = valarray[smartid][smartitems[j]["@attributes"].name];
if ((itemvalue !== undefined) && (itemvalue !== '' )) {
if (smartid === "194") {
html += '<td class="rightCell">' + formatTemp(itemvalue, data.Options["@attributes"].tempFormat) + '</td>';
} else {
html += '<td class="rightCell">' + itemvalue + '</td>';
}
} else {
html += '<td class="rightCell">' + itemvalue + '</td>';
html += '<td></td>';
}
} else {
html += '<td></td>';
}
}
html += '</tr>';
html += '</tr>';
}
html += '</tbody>';
$('#smart').empty().append(html);

View File

@@ -10,88 +10,7 @@
<expression id="plugin_smart_001" name="smart_title">
<exp>S.M.A.R.T Informace</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Aktualizováno</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Název</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Reallocated Sector Ct</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Power On Hours</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Airflow Temperature</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Temperature</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -10,88 +10,7 @@
<expression id="plugin_smart_001" name="smart_title">
<exp>S.M.A.R.T Informations</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Last refresh</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Name</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Reallocated Sector Ct</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Power On Hours</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Airflow Temperature</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Temperature</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -10,88 +10,7 @@
<expression id="plugin_smart_001" name="smart_title">
<exp>Informations S.M.A.R.T</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Dernière actualisation:</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Nom</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Reallocated Sector Ct</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Power On Hours</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Airflow Temperature</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Temperature</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -3,95 +3,14 @@
<!--
phpSysInfo language file Language: Greek Created by: mojiro
-->
<tns:translationPlugin language="english" charset="utf-8"
<tns:translationPlugin language="greek" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_smart_001" name="smart_title">
<exp>Πληροφορίες S.M.A.R.T</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Ενημέρωση</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Συσκευή</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Ανακτημένοι Τομείς</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Ώρες λειτουργίας</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Θερμοκρασία Αέρος</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Θερμοκρασία</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -10,88 +10,7 @@
<expression id="plugin_smart_001" name="smart_title">
<exp>Informacje S.M.A.R.T</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Ostatnie odświeżenie</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Nazwa</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Reallocated Sector Ct</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Power On Hours</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Airflow Temperature</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Temperature</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -10,88 +10,7 @@
<expression id="plugin_smart_001" name="smart_title">
<exp>Informații S.M.A.R.T</exp>
</expression>
<expression id="plugin_smart_002" name="smart_date">
<exp>Ultimul refresh</exp>
</expression>
<expression id="plugin_smart_003" name="smart_name">
<expression id="plugin_smart_002" name="smart_name">
<exp>Nume</exp>
</expression>
<expression id="plugin_smart_101" name="smart_raw_read_error_rate">
<exp>Raw Read Error Rate</exp>
</expression>
<expression id="plugin_smart_102" name="smart_throughput_performance">
<exp>Throughput Performance</exp>
</expression>
<expression id="plugin_smart_103" name="smart_spin_up_time">
<exp>Spin Up Time</exp>
</expression>
<expression id="plugin_smart_104" name="smart_start_stop_count">
<exp>Start Stop Count</exp>
</expression>
<expression id="plugin_smart_105" name="smart_reallocated_sector_ct">
<exp>Reallocated Sector Ct</exp>
</expression>
<expression id="plugin_smart_107" name="smart_seek_error_rate">
<exp>Seek Error Rate</exp>
</expression>
<expression id="plugin_smart_108" name="smart_seek_time_performance">
<exp>Seek Time Performance</exp>
</expression>
<expression id="plugin_smart_109" name="smart_power_on_hours">
<exp>Power On Hours</exp>
</expression>
<expression id="plugin_smart_110" name="smart_spin_retry_count">
<exp>Spin Retry Count</exp>
</expression>
<expression id="plugin_smart_111" name="smart_calibration_retry_count">
<exp>Calibration Retry Count</exp>
</expression>
<expression id="plugin_smart_112" name="smart_power_cycle_count">
<exp>Power Cycle Count</exp>
</expression>
<expression id="plugin_smart_290" name="smart_airflow_temperature_cel">
<exp>Airflow Temperature</exp>
</expression>
<expression id="plugin_smart_291" name="smart_g_sense_error_rate">
<exp>G-sense Error Rate</exp>
</expression>
<expression id="plugin_smart_292" name="smart_power_off_retry_count">
<exp>Power-Off Retract Count</exp>
</expression>
<expression id="plugin_smart_293" name="smart_load_cycle_count">
<exp>Load Cycle Count</exp>
</expression>
<expression id="plugin_smart_294" name="smart_temperature">
<exp>Temperature</exp>
</expression>
<expression id="plugin_smart_295" name="smart_hardware_ecc_recovered">
<exp>Hardware ECC Recovered</exp>
</expression>
<expression id="plugin_smart_296" name="smart_reallocated_event_count">
<exp>Reallocated Event Count</exp>
</expression>
<expression id="plugin_smart_297" name="smart_current_pending_sector">
<exp>Current Pending Sector</exp>
</expression>
<expression id="plugin_smart_298" name="smart_offline_uncorrectable">
<exp>Offline Uncorr.</exp>
</expression>
<expression id="plugin_smart_299" name="smart_udma_crc_error_count">
<exp>UDMA CRC Error Count</exp>
</expression>
<expression id="plugin_smart_300" name="smart_multi_zone_error_rate">
<exp>Multi Zone Error Rate</exp>
</expression>
<expression id="plugin_smart_301" name="smart_soft_read_error_rate">
<exp>Soft Read Error Rate</exp>
</expression>
<expression id="plugin_smart_302" name="smart_data_address_mark_errs">
<exp>Data Address Mark Errors</exp>
</expression>
<expression id="plugin_smart_323" name="smart_load_retry_count">
<exp>Load Retry Count</exp>
</expression>
<expression id="plugin_smart_325" name="smart_load_cycle_count_alt">
<exp>Load Cycle Count</exp>
</expression>
</tns:translationPlugin>

View File

@@ -1,42 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Id: en.xml 661 2012-08-27 11:26:39Z namiltd $ -->
<!--
phpSysInfo language file Language: Russian Created by: Denis Sevostyanov (den007)
-->
<tns:translationPlugin language="russian" charset="utf-8"
xmlns:tns="http://phpsysinfo.sourceforge.net/translation-plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://phpsysinfo.sourceforge.net/translation-plugin ../../../language/translation-plugin.xsd">
<expression id="plugin_quotas_001" name="ps_title">
<exp>Состояние Квоты</exp>
</expression>
<expression id="plugin_quotas_002" name="quotas_date">
<exp>Последнее обновление</exp>
</expression>
<expression id="plugin_quotas_003" name="quotas_user">
<exp>Пользователь</exp>
</expression>
<expression id="plugin_quotas_004" name="quotas_bused">
<exp>Байт Используется</exp>
</expression>
<expression id="plugin_quotas_005" name="quotas_bsoft">
<exp>Байт Программ</exp>
</expression>
<expression id="plugin_quotas_006" name="quotas_bhard">
<exp>Байтов Жесткий диск</exp>
</expression>
<expression id="plugin_quotas_007" name="quotas_bpuse">
<exp>Байт Используется Проценты</exp>
</expression>
<expression id="plugin_quotas_008" name="quotas_fused">
<exp>Файлы Используемые</exp>
</expression>
<expression id="plugin_quotas_009" name="quotas_fsoft">
<exp>Файлы Программ</exp>
</expression>
<expression id="plugin_quotas_010" name="quotas_fhard">
<exp>Файлы Жесткий диск</exp>
</expression>
<expression id="plugin_quotas_011" name="quotas_fpuse">
<exp>Файлов Используется Проценты</exp>
</expression>
</tns:translationPlugin>

View File

@@ -1,9 +1,13 @@
<div class="col-lg-12" id="block_smart" style="display:none">
<div class="panel panel-primary">
<div class="panel-heading">S.M.A.R.T Informations</div>
<div class="panel-body">
<table id="smart" class="table table-hover table-condensed">
</table>
<div class="col-lg-12" id="block_smart" style="display:none;">
<div class="card" id="panel_smart" style="display:none;">
<div class="card-header"><span class="lang_plugin_smart_001">S.M.A.R.T Informations</span>
<span class="hostname_smart"></span>
<div id="reload_smart" class="reload" title="reload"></div>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="smart" class="table table-hover table-sm"></table>
</div>
</div>
</div>
</div>