yeungalan пре 6 година
родитељ
комит
80f2602daa

+ 7 - 0
System Settings/menus/cluster.csv

@@ -0,0 +1,7 @@
+server,ArOZ Clusters
+clsls,Cluster List,SystemAOB/functions/cluster/index.php
+clmap,Cluster Mapping,SystemAOB/functions/cluster/clusterMapper.php
+clscan,Cluster Scan,SystemAOB/functions/cluster/scanui.php
+keyman,Key Manager,SystemAOB/functions/cluster/keyManager.php
+clconfig,Scanning Config,SystemAOB/functions/cluster/clusterSettingUI.php
+clSMART,SMART,SystemAOB/functions/drive/index-cls.php

+ 1 - 0
System Settings/menus/drive.csv

@@ -0,0 +1 @@
+smart,SMART,SystemAOB/functions/drive/index.php

+ 7 - 0
SystemAOB/functions/drive/fetchCluster.php

@@ -0,0 +1,7 @@
+<?php
+if($_GET["opr"] == "scan"){
+	echo file_get_contents("http://".$_GET["ip"]."/AOB/SystemAOB/functions/drive/opr.php?opr=scan");
+}else{
+	echo file_get_contents("http://".$_GET["ip"]."/AOB/SystemAOB/functions/drive/opr.php?opr=info&drive=".$_GET["drive"]);
+}
+?>

+ 173 - 0
SystemAOB/functions/drive/index-cls.php

@@ -0,0 +1,173 @@
+
+<!DOCTYPE html>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6"/>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type='text/javascript' charset='utf-8'>
+    // Hides mobile browser's address bar when page is done loading.
+      window.addEventListener('load', function(e) {
+        setTimeout(function() { window.scrollTo(0, 1); }, 1);
+      }, false);
+</script>
+<title>ArOZ Onlineβ</title>
+<link rel="stylesheet" href="../../../script/tocas/tocas.css">
+<script src="../../../script/tocas/tocas.js"></script>
+<script src="../../../script/jquery.min.js"></script>
+</head>
+<body style="background-color: rgb(247, 247, 247);">
+<div class="ts container">
+<br>
+<div class="ts segment">
+	<div class="ts header">
+		Cluster Storage Manager
+    <div class="sub header">
+		 Harddisk SMART
+	</div>
+	</div>
+</div>
+<div class="ts divider"></div>
+<div class="ts segment">
+	<div class="ts items">
+		<div class="item">
+			<i id="MessageIcon" class="large inverted info rounded checkmark icon"></i>
+			<div class="content">
+				<div class="header" id="MessageHeader">Operating normal.</div>
+				<div class="extra" id="MessageContent">
+					System working.
+				</div>
+			</div>
+		</div>
+	</div>
+		
+	<div class="ts fluid statistics">
+		<div class="statistic">
+			<div class="value" id="Cluster">0</div>
+			<div class="label">Cluster online</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="Installed">0</div>
+			<div class="label">Disk installed</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="Healthy">0</div>
+			<div class="label">Disk healthy</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="capacity">0 Byte</div>
+			<div class="label">Total</div>
+		</div>
+	</div>
+
+	<div class="ts divider"></div>
+
+	<table class="ts very basic table">
+		<thead>
+			<tr>
+				<th>IPs</th>
+				<th>Model</th>
+				<th>Mounted</th>
+				<th>Capactiy</th>
+				<th>SMART</th>
+			</tr>
+		</thead>
+		<tbody id="SMARTtableBody">
+		</tbody>
+	</table>
+</div>
+<br>
+</div>
+
+
+
+<Script>
+var capacity = 0;
+var healthy = 0;
+var totalDisk = 0;
+var cluster = 0;
+
+var template = "<tr><td>%ip%</td><td>%model%</td><td>%mount%</td><td>%capacity%</td><td>%smart%</td></tr>";
+$.get( "../cluster/clusterList.config", function( raw ) {
+	cluster = raw.split("\n").length - 1;
+	$.each( raw.split("\n"), function( key, IP ) {
+		if(IP !== ""){
+			$.get( "fetchCluster.php?ip=" + IP + "&opr=scan", function( raw ) {
+				var Maindata = JSON.parse(raw);
+				$.each( Maindata["devices"], function( key, value ) {
+					$.get( "fetchCluster.php?ip=" + IP + "&opr=info&drive=" + value["name"], function( raw ) {
+						var DiskData = JSON.parse(raw);
+						var tmp = template;
+						var smart = "OK";
+						
+						if(typeof DiskData["ata_smart_attributes"] === 'undefined'){
+							smart = "Unknown";
+							healthy = healthy - 1;
+						}else{
+							var flag = false;
+							$.each( DiskData["ata_smart_attributes"]["table"], function( key, value ) {
+								if(value["when_failed"] !== "" && flag == false){
+									smart = "Failed";
+									healthy = healthy - 1;
+									flag = true;
+									$("#MessageIcon").attr("class","large inverted negative rounded remove icon");
+									$("#MessageHeader").text("Warning");
+									$("#MessageContent").text("One or more disk on cluster have SMART warning.");
+								}
+							});
+						}
+			
+						
+						tmp = tmp.replace("%ip%",IP);													
+						tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);					
+						tmp = tmp.replace("%model%",DiskData["model_name"]);
+						tmp = tmp.replace("%capacity%",disksize(DiskData["user_capacity"]["bytes"]));
+						tmp = tmp.replace("%smart%",smart);
+						
+						capacity = capacity + DiskData["user_capacity"]["bytes"];
+						totalDisk = totalDisk + 1;
+						healthy = healthy + 1;
+						$("#Cluster").text(cluster);
+						$("#Installed").text(totalDisk);
+						$("#Healthy").text(healthy);
+						$("#capacity").text(disksize(capacity));
+						
+						$("#SMARTtableBody").append(tmp);
+					});
+				  
+				});
+			});
+		}
+	});
+});
+
+function disksize(size){
+	if(size >= 1000000000000000){
+		return Math.floor(size/1000000000000000*10)/10 + " PB";
+	}else if(size >= 1000000000000){
+		return Math.floor(size/1000000000000*10)/10 + " TB";
+	}else if(size >= 1000000000){
+		return Math.floor(size/1000000000*10)/10 + " GB";
+	}else if(size >= 1000000){
+		return Math.floor(size/1000000*10)/10 + " MB";
+	}else if(size >= 1024){
+		return Math.floor(size/1000*10)/10 + " KB";
+	}else{
+		return size + " Bytes";
+	}
+}
+
+console.warn("%cSTOP!\n%cPlease beware not to copy and paste anything from the internet to this console as this might bring damage to your system.",'color: red;font-size: 76px','color: red');
+
+console.info(`%c         !          ____ _____ ___  ____  
+       !   !       / ___|_   _/ _ \\|  _ \\ 
+      !  !  !      \\___ \\ | || | | | |_) | 
+     !   !   !      ___) || || |_| |  __/ 
+    !    !    !    |____/ |_| \\___/|_|    
+   !     !     !     
+  !             !      
+ !       !       !  
+!!!!!!!!!!!!!!!!!!! `,'color: red;');
+</script>
+</body>
+</html>

+ 162 - 0
SystemAOB/functions/drive/index.php

@@ -0,0 +1,162 @@
+
+<!DOCTYPE html>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6"/>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type='text/javascript' charset='utf-8'>
+    // Hides mobile browser's address bar when page is done loading.
+      window.addEventListener('load', function(e) {
+        setTimeout(function() { window.scrollTo(0, 1); }, 1);
+      }, false);
+</script>
+<title>ArOZ Onlineβ</title>
+<link rel="stylesheet" href="../../../script/tocas/tocas.css">
+<script src="../../../script/tocas/tocas.js"></script>
+<script src="../../../script/jquery.min.js"></script>
+</head>
+<body style="background-color: rgb(247, 247, 247);">
+<div class="ts container">
+<br>
+<div class="ts segment">
+	<div class="ts header">
+    Harddisk S.M.A.R.T
+    <div class="sub header">
+			<div class="ts divider"></div>
+			<button class="ts left icon label" onclick="showSMARTDetails()">
+				<i class="notice icon"></i> View SMART
+			</button>
+	</div>
+	</div>
+</div>
+<div class="ts divider"></div>
+<div class="ts segment">
+	<div class="ts divided items" id="diskFrame">
+
+	</div>
+</div>
+<br><br><br>
+</div>
+
+
+
+<div class="ts modals dimmer">
+    <dialog id="smartModals" class="ts closable modal">
+	    <div class="header">
+			S.M.A.R.T Information
+		</div>
+        <div class="content">
+        <table class="ts very basic table">
+            <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>Attribute</th>
+                    <th>Value</th>
+                    <th>Worst</th>
+                    <th>Threshold</th>
+                    <th>State</th>
+                </tr>
+            </thead>
+            <tbody id="SMARTtableBody">
+            </tbody>
+        </table>
+
+        </div>
+        <div class="actions">
+            <button class="ts deny button">
+                Close
+            </button>
+        </div>
+    </dialog>
+</div>
+
+<Script>
+var template = '<div class="item" device="%mount%" onclick="select(this)"><i class="large disk outline icon"></i><div class="content"><div class="header">%model% / %capacity% / %temp%℃</div><div class="extra">Model Family: %model_family%<br>Mount point: %mount%<br>Firmware version: %firmware_version%<br>Serial: %serial_number%<br>Power on: %hour% Hours<br>Speed: %speed%<br>Rotation speed: %rotation_rate% rpm<br>Protocol: %protocol%</div></div></div>';
+
+$.get( "opr.php?opr=scan", function( raw ) {
+	var Maindata = JSON.parse(raw);
+	$.each( Maindata["devices"], function( key, value ) {
+		$.get( "opr.php?opr=info&drive=" + value["name"], function( raw ) {
+			var DiskData = JSON.parse(raw);
+			var tmp = template;
+			
+			tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);
+			
+			tmp = tmp.replace("%model%",DiskData["model_name"]);
+			tmp = tmp.replace("%capacity%",disksize(DiskData["user_capacity"]["bytes"]));
+			tmp = tmp.replace("%temp%",DiskData["temperature"]["current"]);
+			tmp = tmp.replace("%model_family%",DiskData["model_family"]);
+			tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);
+			tmp = tmp.replace("%firmware_version%",DiskData["firmware_version"]);
+			tmp = tmp.replace("%serial_number%",DiskData["serial_number"]);
+			tmp = tmp.replace("%hour%",DiskData["power_on_time"]["hours"]);
+			tmp = tmp.replace("%speed%",DiskData["sata_version"]["string"] + " " + DiskData["interface_speed"]["current"]["string"]);
+			tmp = tmp.replace("%rotation_rate%",DiskData["rotation_rate"]);
+			tmp = tmp.replace("%protocol%",DiskData["device"]["protocol"]);
+			$("#diskFrame").append(tmp);
+		});
+	  
+	});
+});
+
+function select(div){
+	$("div.item").find( "i" ).css( "background-color", "#f7f7f7" );
+	$("div.item").find( "i" ).css( "color", "#919191" );
+	$("div.item").find( "i" ).attr( "class", "large disk outline icon" );
+	
+	$(div).find( "i" ).css( "background-color", "#49af79" );
+	$(div).find( "i" ).css( "color", "#ffffff" );
+	$(div).find( "i" ).attr( "class", "large checkmark icon" );
+}
+function showSMARTDetails(){
+	var mountpoint = $("div.item:has(i[class='large checkmark icon'])").attr("device");
+	$.get( "opr.php?opr=info&drive=" + mountpoint, function( raw ) {
+		var DiskData = JSON.parse(raw);
+		$("#SMARTtableBody").html("");
+		$.each( DiskData["ata_smart_attributes"]["table"], function( key, value ) {
+			var tmp = tmp + "<tr>";
+				tmp = tmp + "<td>" + value["id"] + "</td>";
+				tmp = tmp + "<td>" + value["name"] + "</td>";
+				tmp = tmp + "<td>" + value["value"] + "</td>";
+				tmp = tmp + "<td>" + value["worst"] + "</td>";
+				tmp = tmp + "<td>" + value["thresh"] + "</td>";
+				if(value["when_failed"] == ""){
+					tmp = tmp + "<td>OK</td>";
+				}else{
+					tmp = tmp + "<td>Failed</td>";
+				}
+				$("#SMARTtableBody").append(tmp);
+		});
+		ts('#smartModals').modal("show");
+	});
+}
+
+function disksize(size){
+	if(size >= 1000000000000){
+		return Math.floor(size/1000000000000) + " TB";
+	}else if(size >= 1000000000){
+		return Math.floor(size/1000000000) + " GB";
+	}else if(size >= 1000000){
+		return Math.floor(size/1000000) + " MB";
+	}else if(size >= 1024){
+		return Math.floor(size/1000) + " KB";
+	}else{
+		return size + " Bytes";
+	}
+}
+
+console.warn("%cSTOP!\n%cPlease beware not to copy and paste anything from the internet to this console as this might bring damage to your system.",'color: red;font-size: 76px','color: red');
+
+console.info(`%c         !          ____ _____ ___  ____  
+       !   !       / ___|_   _/ _ \\|  _ \\ 
+      !  !  !      \\___ \\ | || | | | |_) | 
+     !   !   !      ___) || || |_| |  __/ 
+    !    !    !    |____/ |_| \\___/|_|    
+   !     !     !     
+  !             !      
+ !       !       !  
+!!!!!!!!!!!!!!!!!!! `,'color: red;');
+</script>
+</body>
+</html>

+ 32 - 0
SystemAOB/functions/drive/opr.php

@@ -0,0 +1,32 @@
+<?php
+header("Access-Control-Allow-Origin: *");
+
+if($_GET["opr"] == "scan"){
+	echo shell_exec('./smartctl_i386 --scan -j');
+	//echo file_get_contents("scan.txt");
+}else if($_GET["opr"] == "info"){
+	//smartctl -H /dev/sdb -j
+	//echo shell_exec('sudo ./smartctl_i386 -i '.$_GET["drive"].' -j -A');
+	$DiskData = [];
+    $DiskData["model_name"] = "Unknown";
+    $DiskData["user_capacity"]["bytes"] = 0;
+    $DiskData["temperature"]["current"] = 0;
+    $DiskData["model_family"] = "Unknown";
+    $DiskData["device"]["info_name"] = "Unknown";
+    $DiskData["firmware_version"] = "0.0.0";
+    $DiskData["serial_number"] = "Unknown";
+    $DiskData["power_on_time"]["hours"] = 0;
+    $DiskData["sata_version"]["string"] = "Unknown";
+    $DiskData["interface_speed"]["current"]["string"] = "Unknown";
+    $DiskData["rotation_rate"] = 0;
+    $DiskData["device"]["protocol"] = "Unknown";
+	
+	//$execResult = json_decode(shell_exec('sudo ./smartctl_i386 -i '.$_GET["drive"].' -j -A'),true);
+	$execResult = json_decode(file_get_contents(explode("/",$_GET["drive"])[2].".txt"),true);
+	if($execResult == null){
+		die("");
+	}
+    $DiskData = array_merge($DiskData,$execResult);
+    echo json_encode($DiskData);
+}
+?>

+ 65 - 0
SystemAOB/functions/drive/scan.txt

@@ -0,0 +1,65 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "--scan",
+      "-j"
+    ],
+    "exit_status": 0
+  },
+  "devices": [
+    {
+      "name": "/dev/sda",
+      "info_name": "/dev/sda",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/sdb",
+      "info_name": "/dev/sdb",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/sdc",
+      "info_name": "/dev/sdc",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,0",
+      "info_name": "/dev/csmi0,0",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,1",
+      "info_name": "/dev/csmi0,1",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,2",
+      "info_name": "/dev/csmi0,2",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,4",
+      "info_name": "/dev/csmi0,4",
+      "type": "ata",
+      "protocol": "ATA"
+    }
+  ]
+}

+ 548 - 0
SystemAOB/functions/drive/sda.txt

@@ -0,0 +1,548 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-a",
+      "/dev/sda",
+      "-json"
+    ],
+    "exit_status": 12
+  },
+  "device": {
+    "name": "/dev/sda",
+    "info_name": "/dev/sda",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "SandForce Driven SSDs",
+  "model_name": "KINGSTON SV300S37A60G",
+  "serial_number": "30353230423632373435",
+  "firmware_version": "580ABBF0",
+  "in_smartctl_database": true,
+  "local_time": {
+    "time_t": 1550709320,
+    "asctime": "Thu Feb 21 08:35:20 2019 CST"
+  },
+  "smart_status": {
+    "passed": false
+  },
+  "ata_smart_data": {
+    "offline_data_collection": {
+      "status": {
+        "value": 5,
+        "string": "was aborted by an interrupting command from host"
+      },
+      "completion_seconds": 1
+    },
+    "self_test": {
+      "status": {
+        "value": 16,
+        "string": "was aborted by the host"
+      },
+      "polling_minutes": {
+        "short": 1,
+        "extended": 48,
+        "conveyance": 2
+      }
+    },
+    "capabilities": {
+      "values": [
+        125,
+        3
+      ],
+      "exec_offline_immediate_supported": true,
+      "offline_is_aborted_upon_new_cmd": true,
+      "offline_surface_scan_supported": true,
+      "self_tests_supported": true,
+      "conveyance_self_test_supported": true,
+      "selective_self_test_supported": true,
+      "attribute_autosave_enabled": true,
+      "error_logging_supported": true,
+      "gp_logging_supported": false
+    }
+  },
+  "ata_smart_attributes": {
+    "revision": 10,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 120,
+        "worst": 120,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0/0"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Retired_Block_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours_and_Msec",
+        "value": 99,
+        "worst": 99,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 13272780384503394,
+          "string": "1634h+51m+30.310s"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 939,
+          "string": "939"
+        }
+      },
+      {
+        "id": 171,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 172,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 174,
+        "name": "Unexpect_Power_Loss_Ct",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 48,
+          "string": "----CK ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 177,
+        "name": "Wear_Range_Delta",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 99,
+          "string": "99"
+        }
+      },
+      {
+        "id": 181,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 182,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 187,
+        "name": "Reported_Uncorrect",
+        "value": 99,
+        "worst": 99,
+        "flags": {
+          "value": 18,
+          "string": "-O--C- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 1,
+          "string": "1"
+        }
+      },
+      {
+        "id": 189,
+        "name": "Airflow_Temperature_Cel",
+        "value": 27,
+        "worst": 51,
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 68722819099,
+          "string": "27 (Min/Max 16/51)"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 27,
+        "worst": 51,
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 68722819099,
+          "string": "27 (Min/Max 16/51)"
+        }
+      },
+      {
+        "id": 195,
+        "name": "ECC_Uncorr_Error_Count",
+        "value": 120,
+        "worst": 120,
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0/0"
+        }
+      },
+      {
+        "id": 196,
+        "name": "Reallocated_Event_Count",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 201,
+        "name": "Unc_Soft_Read_Err_Rate",
+        "value": 120,
+        "worst": 120,
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0/0"
+        }
+      },
+      {
+        "id": 204,
+        "name": "Soft_ECC_Correct_Rate",
+        "value": 120,
+        "worst": 120,
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0/0"
+        }
+      },
+      {
+        "id": 230,
+        "name": "Life_Curve_Status",
+        "value": 100,
+        "worst": 100,
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 100,
+          "string": "100"
+        }
+      },
+      {
+        "id": 231,
+        "name": "SSD_Life_Left",
+        "value": 1,
+        "worst": 1,
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 1,
+          "string": "1"
+        }
+      },
+      {
+        "id": 233,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2967,
+          "string": "2967"
+        }
+      },
+      {
+        "id": 234,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 241,
+        "name": "Lifetime_Writes_GiB",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 242,
+        "name": "Lifetime_Reads_GiB",
+        "value": 0,
+        "worst": 0,
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 1634,
+    "minutes": 51
+  },
+  "power_cycle_count": 939,
+  "temperature": {
+    "current": 27
+  }
+}

+ 570 - 0
SystemAOB/functions/drive/sda_home.txt

@@ -0,0 +1,570 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sda",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sda",
+    "info_name": "/dev/sda",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "SandForce Driven SSDs",
+  "model_name": "ADATA SP900",
+  "serial_number": "7F2620004631",
+  "wwn": {
+    "naa": 5,
+    "oui": 7371800,
+    "id": 1002634
+  },
+  "firmware_version": "5.8.2",
+  "user_capacity": {
+    "blocks": 500118192,
+    "bytes": 256060514304
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 512,
+  "rotation_rate": 0,
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ATA8-ACS, ACS-2 T13/2015-D revision 3",
+    "major_value": 508,
+    "minor_value": 272
+  },
+  "sata_version": {
+    "string": "SATA 3.0",
+    "value": 63
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797551,
+    "asctime": "Sun Feb 10 19:19:11 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 10,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 95,
+        "worst": 95,
+        "thresh": 50,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Retired_Block_Count",
+        "value": 95,
+        "worst": 95,
+        "thresh": 3,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 24,
+          "string": "24"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours_and_Msec",
+        "value": 90,
+        "worst": 90,
+        "thresh": 0,
+        "when_failed": "1",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 3796879938692401,
+          "string": "9521h+14m+44.030s"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2072,
+          "string": "2072"
+        }
+      },
+      {
+        "id": 171,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 172,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 174,
+        "name": "Unexpect_Power_Loss_Ct",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 48,
+          "string": "----CK ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 249,
+          "string": "249"
+        }
+      },
+      {
+        "id": 177,
+        "name": "Wear_Range_Delta",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 99,
+          "string": "99"
+        }
+      },
+      {
+        "id": 181,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 182,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 187,
+        "name": "Reported_Uncorrect",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 18,
+          "string": "-O--C- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 36,
+        "worst": 57,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 55838310436,
+          "string": "36 (Min/Max 13/57)"
+        }
+      },
+      {
+        "id": 195,
+        "name": "ECC_Uncorr_Error_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 196,
+        "name": "Reallocated_Event_Count",
+        "value": 95,
+        "worst": 95,
+        "thresh": 3,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 24,
+          "string": "24"
+        }
+      },
+      {
+        "id": 201,
+        "name": "Unc_Soft_Read_Err_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 204,
+        "name": "Soft_ECC_Correct_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 230,
+        "name": "Life_Curve_Status",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 100,
+          "string": "100"
+        }
+      },
+      {
+        "id": 231,
+        "name": "SSD_Life_Left",
+        "value": 93,
+        "worst": 93,
+        "thresh": 10,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 34359738369,
+          "string": "34359738369"
+        }
+      },
+      {
+        "id": 233,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15005,
+          "string": "15005"
+        }
+      },
+      {
+        "id": 234,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15251,
+          "string": "15251"
+        }
+      },
+      {
+        "id": 241,
+        "name": "Lifetime_Writes_GiB",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15251,
+          "string": "15251"
+        }
+      },
+      {
+        "id": 242,
+        "name": "Lifetime_Reads_GiB",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 18767,
+          "string": "18767"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 9521,
+    "minutes": 14
+  },
+  "power_cycle_count": 2072,
+  "temperature": {
+    "current": 36
+  }
+}

+ 459 - 0
SystemAOB/functions/drive/sdb.txt

@@ -0,0 +1,459 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sdb",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sdb",
+    "info_name": "/dev/sdb",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "Western Digital Red",
+  "model_name": "WDC WD20EFRX-68EUZN0",
+  "serial_number": "WD-WCC4M7PLT66J",
+  "wwn": {
+    "naa": 5,
+    "oui": 5358,
+    "id": 10216012843
+  },
+  "firmware_version": "82.00A82",
+  "user_capacity": {
+    "blocks": 3907029168,
+    "bytes": 2000398934016
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 4096,
+  "rotation_rate": 5400,
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ACS-2 (minor revision not indicated)",
+    "major_value": 1022,
+    "minor_value": 0
+  },
+  "sata_version": {
+    "string": "SATA 3.0",
+    "value": 62
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797141,
+    "asctime": "Sun Feb 10 19:12:21 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 16,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 200,
+        "worst": 200,
+        "thresh": 51,
+        "when_failed": "",
+        "flags": {
+          "value": 47,
+          "string": "POSR-K ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 3,
+        "name": "Spin_Up_Time",
+        "value": 174,
+        "worst": 165,
+        "thresh": 21,
+        "when_failed": "",
+        "flags": {
+          "value": 39,
+          "string": "POS--K ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4300,
+          "string": "4300"
+        }
+      },
+      {
+        "id": 4,
+        "name": "Start_Stop_Count",
+        "value": 96,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4654,
+          "string": "4654"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Reallocated_Sector_Ct",
+        "value": 200,
+        "worst": 200,
+        "thresh": 140,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 7,
+        "name": "Seek_Error_Rate",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 46,
+          "string": "-OSR-K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours",
+        "value": 89,
+        "worst": 89,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 8198,
+          "string": "8198"
+        }
+      },
+      {
+        "id": 10,
+        "name": "Spin_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 11,
+        "name": "Calibration_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2679,
+          "string": "2679"
+        }
+      },
+      {
+        "id": 192,
+        "name": "Power-Off_Retract_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 211,
+          "string": "211"
+        }
+      },
+      {
+        "id": 193,
+        "name": "Load_Cycle_Count",
+        "value": 195,
+        "worst": 195,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 16219,
+          "string": "16219"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 112,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 35,
+          "string": "35"
+        }
+      },
+      {
+        "id": 196,
+        "name": "Reallocated_Event_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 197,
+        "name": "Current_Pending_Sector",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 198,
+        "name": "Offline_Uncorrectable",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 48,
+          "string": "----CK ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 199,
+        "name": "UDMA_CRC_Error_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 200,
+        "name": "Multi_Zone_Error_Rate",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 8,
+          "string": "---R-- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 8198
+  },
+  "power_cycle_count": 2679,
+  "temperature": {
+    "current": 35
+  }
+}

+ 617 - 0
SystemAOB/functions/drive/sdc.txt

@@ -0,0 +1,617 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sdc",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sdc",
+    "info_name": "/dev/sdc",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "Seagate Barracuda 7200.14 (AF)",
+  "model_name": "ST2000DM001-1CH164",
+  "serial_number": "Z1E99HMC",
+  "wwn": {
+    "naa": 5,
+    "oui": 3152,
+    "id": 2061669450
+  },
+  "firmware_version": "CC27",
+  "user_capacity": {
+    "blocks": 3907029168,
+    "bytes": 2000398934016
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 4096,
+  "rotation_rate": 7200,
+  "form_factor": {
+    "ata_value": 2,
+    "name": "3.5 inches"
+  },
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ACS-2, ACS-3 T13/2161-D revision 3b",
+    "major_value": 1008,
+    "minor_value": 31
+  },
+  "sata_version": {
+    "string": "SATA 3.1",
+    "value": 126
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797296,
+    "asctime": "Sun Feb 10 19:14:56 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 10,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 115,
+        "worst": 99,
+        "thresh": 6,
+        "when_failed": "",
+        "flags": {
+          "value": 15,
+          "string": "POSR-- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 86025176,
+          "string": "86025176"
+        }
+      },
+      {
+        "id": 3,
+        "name": "Spin_Up_Time",
+        "value": 96,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 3,
+          "string": "PO---- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 4,
+        "name": "Start_Stop_Count",
+        "value": 96,
+        "worst": 96,
+        "thresh": 20,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4370,
+          "string": "4370"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Reallocated_Sector_Ct",
+        "value": 100,
+        "worst": 100,
+        "thresh": 10,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 7,
+        "name": "Seek_Error_Rate",
+        "value": 80,
+        "worst": 60,
+        "thresh": 30,
+        "when_failed": "",
+        "flags": {
+          "value": 15,
+          "string": "POSR-- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 110215814,
+          "string": "110215814"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours",
+        "value": 88,
+        "worst": 88,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 11192,
+          "string": "11192"
+        }
+      },
+      {
+        "id": 10,
+        "name": "Spin_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 97,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 20,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2669,
+          "string": "2669"
+        }
+      },
+      {
+        "id": 183,
+        "name": "Runtime_Bad_Block",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 184,
+        "name": "End-to-End_Error",
+        "value": 100,
+        "worst": 100,
+        "thresh": 99,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 187,
+        "name": "Reported_Uncorrect",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 188,
+        "name": "Command_Timeout",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0 0 0"
+        }
+      },
+      {
+        "id": 189,
+        "name": "High_Fly_Writes",
+        "value": 99,
+        "worst": 99,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 58,
+          "string": "-O-RCK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 1,
+          "string": "1"
+        }
+      },
+      {
+        "id": 190,
+        "name": "Airflow_Temperature_Cel",
+        "value": 64,
+        "worst": 49,
+        "thresh": 45,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 622985252,
+          "string": "36 (Min/Max 34/37)"
+        }
+      },
+      {
+        "id": 191,
+        "name": "G-Sense_Error_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 192,
+        "name": "Power-Off_Retract_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 246,
+          "string": "246"
+        }
+      },
+      {
+        "id": 193,
+        "name": "Load_Cycle_Count",
+        "value": 50,
+        "worst": 50,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 101342,
+          "string": "101342"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 36,
+        "worst": 51,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 42949672996,
+          "string": "36 (0 10 0 0 0)"
+        }
+      },
+      {
+        "id": 197,
+        "name": "Current_Pending_Sector",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 18,
+          "string": "-O--C- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 198,
+        "name": "Offline_Uncorrectable",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 16,
+          "string": "----C- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 199,
+        "name": "UDMA_CRC_Error_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 62,
+          "string": "-OSRCK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 240,
+        "name": "Head_Flying_Hours",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 12602821320906682,
+          "string": "6074h+48m+54.323s"
+        }
+      },
+      {
+        "id": 241,
+        "name": "Total_LBAs_Written",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 36524852004,
+          "string": "36524852004"
+        }
+      },
+      {
+        "id": 242,
+        "name": "Total_LBAs_Read",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 51255764039,
+          "string": "51255764039"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 11192
+  },
+  "power_cycle_count": 2669,
+  "temperature": {
+    "current": 36
+  }
+}

BIN
SystemAOB/functions/drive/smartctl_armv6


BIN
SystemAOB/functions/drive/smartctl_i386


+ 169 - 0
SystemAOB/functions/panel/drive/index-cls.php

@@ -0,0 +1,169 @@
+
+<!DOCTYPE html>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6"/>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type='text/javascript' charset='utf-8'>
+    // Hides mobile browser's address bar when page is done loading.
+      window.addEventListener('load', function(e) {
+        setTimeout(function() { window.scrollTo(0, 1); }, 1);
+      }, false);
+</script>
+<title>ArOZ Onlineβ</title>
+<link rel="stylesheet" href="../../../script/tocas/tocas.css">
+<script src="../../../script/tocas/tocas.js"></script>
+<script src="../../../script/jquery.min.js"></script>
+</head>
+<body style="background-color: rgb(247, 247, 247);">
+<div class="ts container">
+<br>
+<div class="ts segment">
+	<div class="ts header">
+		Cluster Storage Manager
+    <div class="sub header">
+		 Harddisk SMART
+	</div>
+	</div>
+</div>
+<div class="ts divider"></div>
+<div class="ts segment">
+	<div class="ts items">
+		<div class="item">
+			<i id="MessageIcon" class="large inverted info rounded checkmark icon"></i>
+			<div class="content">
+				<div class="header" id="MessageHeader">Operating normal.</div>
+				<div class="extra" id="MessageContent">
+					System working.
+				</div>
+			</div>
+		</div>
+	</div>
+		
+	<div class="ts fluid statistics">
+		<div class="statistic">
+			<div class="value" id="Cluster">0</div>
+			<div class="label">Cluster online</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="Installed">0</div>
+			<div class="label">Disk installed</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="Healthy">0</div>
+			<div class="label">Disk healthy</div>
+		</div>
+		<div class="statistic">
+			<div class="value" id="capacity">0 Byte</div>
+			<div class="label">Total</div>
+		</div>
+	</div>
+
+	<div class="ts divider"></div>
+
+	<table class="ts very basic table">
+		<thead>
+			<tr>
+				<th>IPs</th>
+				<th>Model</th>
+				<th>Mounted</th>
+				<th>Capactiy</th>
+				<th>SMART</th>
+			</tr>
+		</thead>
+		<tbody id="SMARTtableBody">
+		</tbody>
+	</table>
+</div>
+<br>
+</div>
+
+
+
+<Script>
+var capacity = 0;
+var healthy = 0;
+var totalDisk = 0;
+var cluster = 0;
+
+var template = "<tr><td>%ip%</td><td>%model%</td><td>%mount%</td><td>%capacity%</td><td>%smart%</td></tr>";
+$.get( "../cluster/clusterList.config", function( raw ) {
+	cluster = raw.split("\n").length - 1;
+	$.each( raw.split("\n"), function( key, IP ) {
+		$.get( "http://" + IP + "/AOB/SystemAOB/functions/drive/opr.php?opr=scan", function( raw ) {
+			var Maindata = JSON.parse(raw);
+			$.each( Maindata["devices"], function( key, value ) {
+				$.get( "http://" + IP + "/AOB/SystemAOB/functions/drive/opr.php?opr=info&drive=" + value["name"], function( raw ) {
+					var DiskData = JSON.parse(raw);
+					var tmp = template;
+					var smart = "OK";
+					
+					if(typeof DiskData["ata_smart_attributes"] === 'undefined'){
+						smart = "Unknown";
+						healthy = healthy - 1;
+					}else{
+						$.each( DiskData["ata_smart_attributes"]["table"], function( key, value ) {
+							if(value["when_failed"] !== ""){
+								smart = "Failed";
+								healthy = healthy - 1;
+								$("#MessageIcon").attr("class","large inverted negative rounded remove icon");
+								$("#MessageHeader").text("Warning");
+								$("#MessageContent").text("One or more disk on cluster have SMART warning.");
+							}
+						});
+					}
+		
+					
+					tmp = tmp.replace("%ip%",IP);													
+					tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);					
+					tmp = tmp.replace("%model%",DiskData["model_name"]);
+					tmp = tmp.replace("%capacity%",disksize(DiskData["user_capacity"]["bytes"]));
+					tmp = tmp.replace("%smart%",smart);
+					
+					capacity = capacity + DiskData["user_capacity"]["bytes"];
+					totalDisk = totalDisk + 1;
+					healthy = healthy + 1;
+					$("#Cluster").text(cluster);
+					$("#Installed").text(totalDisk);
+					$("#Healthy").text(healthy);
+					$("#capacity").text(disksize(capacity));
+					
+					$("#SMARTtableBody").append(tmp);
+				});
+			  
+			});
+		});
+	});
+});
+
+function disksize(size){
+	if(size >= 1000000000000000){
+		return Math.floor(size/1000000000000000*10)/10 + " PB";
+	}else if(size >= 1000000000000){
+		return Math.floor(size/1000000000000*10)/10 + " TB";
+	}else if(size >= 1000000000){
+		return Math.floor(size/1000000000*10)/10 + " GB";
+	}else if(size >= 1000000){
+		return Math.floor(size/1000000*10)/10 + " MB";
+	}else if(size >= 1024){
+		return Math.floor(size/1000*10)/10 + " KB";
+	}else{
+		return size + " Bytes";
+	}
+}
+
+console.warn("%cSTOP!\n%cPlease beware not to copy and paste anything from the internet to this console as this might bring damage to your system.",'color: red;font-size: 76px','color: red');
+
+console.info(`%c         !          ____ _____ ___  ____  
+       !   !       / ___|_   _/ _ \\|  _ \\ 
+      !  !  !      \\___ \\ | || | | | |_) | 
+     !   !   !      ___) || || |_| |  __/ 
+    !    !    !    |____/ |_| \\___/|_|    
+   !     !     !     
+  !             !      
+ !       !       !  
+!!!!!!!!!!!!!!!!!!! `,'color: red;');
+</script>
+</body>
+</html>

+ 162 - 0
SystemAOB/functions/panel/drive/index.php

@@ -0,0 +1,162 @@
+
+<!DOCTYPE html>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6"/>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type='text/javascript' charset='utf-8'>
+    // Hides mobile browser's address bar when page is done loading.
+      window.addEventListener('load', function(e) {
+        setTimeout(function() { window.scrollTo(0, 1); }, 1);
+      }, false);
+</script>
+<title>ArOZ Onlineβ</title>
+<link rel="stylesheet" href="../../../script/tocas/tocas.css">
+<script src="../../../script/tocas/tocas.js"></script>
+<script src="../../../script/jquery.min.js"></script>
+</head>
+<body style="background-color: rgb(247, 247, 247);">
+<div class="ts container">
+<br>
+<div class="ts segment">
+	<div class="ts header">
+    Harddisk S.M.A.R.T
+    <div class="sub header">
+			<div class="ts divider"></div>
+			<button class="ts left icon label" onclick="showSMARTDetails()">
+				<i class="notice icon"></i> View SMART
+			</button>
+	</div>
+	</div>
+</div>
+<div class="ts divider"></div>
+<div class="ts segment">
+	<div class="ts divided items" id="diskFrame">
+
+	</div>
+</div>
+<br><br><br>
+</div>
+
+
+
+<div class="ts modals dimmer">
+    <dialog id="smartModals" class="ts closable modal">
+	    <div class="header">
+			S.M.A.R.T Information
+		</div>
+        <div class="content">
+        <table class="ts very basic table">
+            <thead>
+                <tr>
+                    <th>ID</th>
+                    <th>Attribute</th>
+                    <th>Value</th>
+                    <th>Worst</th>
+                    <th>Threshold</th>
+                    <th>State</th>
+                </tr>
+            </thead>
+            <tbody id="SMARTtableBody">
+            </tbody>
+        </table>
+
+        </div>
+        <div class="actions">
+            <button class="ts deny button">
+                Close
+            </button>
+        </div>
+    </dialog>
+</div>
+
+<Script>
+var template = '<div class="item" device="%mount%" onclick="select(this)"><i class="large disk outline icon"></i><div class="content"><div class="header">%model% / %capacity% / %temp%℃</div><div class="extra">Model Family: %model_family%<br>Fount point: %mount%<br>Firmware version: %firmware_version%<br>Serial: %serial_number%<br>Power on: %hour% Hours<br>Speed: %speed%<br>Rotation speed: %rotation_rate% rpm<br>Protocol: %protocol%</div></div></div>';
+
+$.get( "opr.php?opr=scan", function( raw ) {
+	var Maindata = JSON.parse(raw);
+	$.each( Maindata["devices"], function( key, value ) {
+		$.get( "opr.php?opr=info&drive=" + value["name"], function( raw ) {
+			var DiskData = JSON.parse(raw);
+			var tmp = template;
+			
+			tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);
+			
+			tmp = tmp.replace("%model%",DiskData["model_name"]);
+			tmp = tmp.replace("%capacity%",disksize(DiskData["user_capacity"]["bytes"]));
+			tmp = tmp.replace("%temp%",DiskData["temperature"]["current"]);
+			tmp = tmp.replace("%model_family%",DiskData["model_family"]);
+			tmp = tmp.replace("%mount%",DiskData["device"]["info_name"]);
+			tmp = tmp.replace("%firmware_version%",DiskData["firmware_version"]);
+			tmp = tmp.replace("%serial_number%",DiskData["serial_number"]);
+			tmp = tmp.replace("%hour%",DiskData["power_on_time"]["hours"]);
+			tmp = tmp.replace("%speed%",DiskData["sata_version"]["string"] + " " + DiskData["interface_speed"]["current"]["string"]);
+			tmp = tmp.replace("%rotation_rate%",DiskData["rotation_rate"]);
+			tmp = tmp.replace("%protocol%",DiskData["device"]["protocol"]);
+			$("#diskFrame").append(tmp);
+		});
+	  
+	});
+});
+
+function select(div){
+	$("div.item").find( "i" ).css( "background-color", "#f7f7f7" );
+	$("div.item").find( "i" ).css( "color", "#919191" );
+	$("div.item").find( "i" ).attr( "class", "large disk outline icon" );
+	
+	$(div).find( "i" ).css( "background-color", "#49af79" );
+	$(div).find( "i" ).css( "color", "#ffffff" );
+	$(div).find( "i" ).attr( "class", "large checkmark icon" );
+}
+function showSMARTDetails(){
+	var mountpoint = $("div.item:has(i[class='large checkmark icon'])").attr("device");
+	$.get( "opr.php?opr=info&drive=" + mountpoint, function( raw ) {
+		var DiskData = JSON.parse(raw);
+		$("#SMARTtableBody").html("");
+		$.each( DiskData["ata_smart_attributes"]["table"], function( key, value ) {
+			var tmp = tmp + "<tr>";
+				tmp = tmp + "<td>" + value["id"] + "</td>";
+				tmp = tmp + "<td>" + value["name"] + "</td>";
+				tmp = tmp + "<td>" + value["value"] + "</td>";
+				tmp = tmp + "<td>" + value["worst"] + "</td>";
+				tmp = tmp + "<td>" + value["thresh"] + "</td>";
+				if(value["when_failed"] == ""){
+					tmp = tmp + "<td>OK</td>";
+				}else{
+					tmp = tmp + "<td>Failed</td>";
+				}
+				$("#SMARTtableBody").append(tmp);
+		});
+		ts('#smartModals').modal("show");
+	});
+}
+
+function disksize(size){
+	if(size >= 1000000000000){
+		return Math.floor(size/1000000000000) + " TB";
+	}else if(size >= 1000000000){
+		return Math.floor(size/1000000000) + " GB";
+	}else if(size >= 1000000){
+		return Math.floor(size/1000000) + " MB";
+	}else if(size >= 1024){
+		return Math.floor(size/1000) + " KB";
+	}else{
+		return size + " Bytes";
+	}
+}
+
+console.warn("%cSTOP!\n%cPlease beware not to copy and paste anything from the internet to this console as this might bring damage to your system.",'color: red;font-size: 76px','color: red');
+
+console.info(`%c         !          ____ _____ ___  ____  
+       !   !       / ___|_   _/ _ \\|  _ \\ 
+      !  !  !      \\___ \\ | || | | | |_) | 
+     !   !   !      ___) || || |_| |  __/ 
+    !    !    !    |____/ |_| \\___/|_|    
+   !     !     !     
+  !             !      
+ !       !       !  
+!!!!!!!!!!!!!!!!!!! `,'color: red;');
+</script>
+</body>
+</html>

+ 32 - 0
SystemAOB/functions/panel/drive/opr.php

@@ -0,0 +1,32 @@
+<?php
+header("Access-Control-Allow-Origin: *");
+
+if($_GET["opr"] == "scan"){
+	echo shell_exec('./smartctl_i386 --scan -j');
+	//echo file_get_contents("scan.txt");
+}else if($_GET["opr"] == "info"){
+	//smartctl -H /dev/sdb -j
+	//echo shell_exec('sudo ./smartctl_i386 -i '.$_GET["drive"].' -j -A');
+	$DiskData = [];
+    $DiskData["model_name"] = "Unknown";
+    $DiskData["user_capacity"]["bytes"] = "0";
+    $DiskData["temperature"]["current"] = "0";
+    $DiskData["model_family"] = "Unknown";
+    $DiskData["device"]["info_name"] = "Unknown";
+    $DiskData["firmware_version"] = "0.0.0";
+    $DiskData["serial_number"] = "Unknown";
+    $DiskData["power_on_time"]["hours"] = 0;
+    $DiskData["sata_version"]["string"] = "Unknown";
+    $DiskData["interface_speed"]["current"]["string"] = "Unknown";
+    $DiskData["rotation_rate"] = 0;
+    $DiskData["device"]["protocol"] = "Unknown";
+	
+	$execResult = json_decode(shell_exec('sudo ./smartctl_i386 -i '.$_GET["drive"].' -j -A'),true);
+	//$execResult = json_decode(file_get_contents(explode("/",$_GET["drive"])[2].".txt"),true);
+	if($execResult == null){
+		die("");
+	}
+    $DiskData = array_merge($DiskData,$execResult);
+    echo json_encode($DiskData);
+}
+?>

+ 65 - 0
SystemAOB/functions/panel/drive/scan.txt

@@ -0,0 +1,65 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "--scan",
+      "-j"
+    ],
+    "exit_status": 0
+  },
+  "devices": [
+    {
+      "name": "/dev/sda",
+      "info_name": "/dev/sda",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/sdb",
+      "info_name": "/dev/sdb",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/sdc",
+      "info_name": "/dev/sdc",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,0",
+      "info_name": "/dev/csmi0,0",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,1",
+      "info_name": "/dev/csmi0,1",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,2",
+      "info_name": "/dev/csmi0,2",
+      "type": "ata",
+      "protocol": "ATA"
+    },
+    {
+      "name": "/dev/csmi0,4",
+      "info_name": "/dev/csmi0,4",
+      "type": "ata",
+      "protocol": "ATA"
+    }
+  ]
+}

+ 570 - 0
SystemAOB/functions/panel/drive/sda.txt

@@ -0,0 +1,570 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sda",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sda",
+    "info_name": "/dev/sda",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "SandForce Driven SSDs",
+  "model_name": "ADATA SP900",
+  "serial_number": "7F2620004631",
+  "wwn": {
+    "naa": 5,
+    "oui": 7371800,
+    "id": 1002634
+  },
+  "firmware_version": "5.8.2",
+  "user_capacity": {
+    "blocks": 500118192,
+    "bytes": 256060514304
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 512,
+  "rotation_rate": 0,
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ATA8-ACS, ACS-2 T13/2015-D revision 3",
+    "major_value": 508,
+    "minor_value": 272
+  },
+  "sata_version": {
+    "string": "SATA 3.0",
+    "value": 63
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797551,
+    "asctime": "Sun Feb 10 19:19:11 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 10,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 95,
+        "worst": 95,
+        "thresh": 50,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Retired_Block_Count",
+        "value": 95,
+        "worst": 95,
+        "thresh": 3,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 24,
+          "string": "24"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours_and_Msec",
+        "value": 90,
+        "worst": 90,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 3796879938692401,
+          "string": "9521h+14m+44.030s"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2072,
+          "string": "2072"
+        }
+      },
+      {
+        "id": 171,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 172,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 174,
+        "name": "Unexpect_Power_Loss_Ct",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 48,
+          "string": "----CK ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 249,
+          "string": "249"
+        }
+      },
+      {
+        "id": 177,
+        "name": "Wear_Range_Delta",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 99,
+          "string": "99"
+        }
+      },
+      {
+        "id": 181,
+        "name": "Program_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 10,
+          "string": "-O-R-- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 182,
+        "name": "Erase_Fail_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 187,
+        "name": "Reported_Uncorrect",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 18,
+          "string": "-O--C- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 36,
+        "worst": 57,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 55838310436,
+          "string": "36 (Min/Max 13/57)"
+        }
+      },
+      {
+        "id": 195,
+        "name": "ECC_Uncorr_Error_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 196,
+        "name": "Reallocated_Event_Count",
+        "value": 95,
+        "worst": 95,
+        "thresh": 3,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 24,
+          "string": "24"
+        }
+      },
+      {
+        "id": 201,
+        "name": "Unc_Soft_Read_Err_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 204,
+        "name": "Soft_ECC_Correct_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 28,
+          "string": "--SRC- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 8597147203,
+          "string": "2/7212611"
+        }
+      },
+      {
+        "id": 230,
+        "name": "Life_Curve_Status",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 100,
+          "string": "100"
+        }
+      },
+      {
+        "id": 231,
+        "name": "SSD_Life_Left",
+        "value": 93,
+        "worst": 93,
+        "thresh": 10,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 34359738369,
+          "string": "34359738369"
+        }
+      },
+      {
+        "id": 233,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15005,
+          "string": "15005"
+        }
+      },
+      {
+        "id": 234,
+        "name": "SandForce_Internal",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15251,
+          "string": "15251"
+        }
+      },
+      {
+        "id": 241,
+        "name": "Lifetime_Writes_GiB",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 15251,
+          "string": "15251"
+        }
+      },
+      {
+        "id": 242,
+        "name": "Lifetime_Reads_GiB",
+        "value": 0,
+        "worst": 0,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 18767,
+          "string": "18767"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 9521,
+    "minutes": 14
+  },
+  "power_cycle_count": 2072,
+  "temperature": {
+    "current": 36
+  }
+}

+ 459 - 0
SystemAOB/functions/panel/drive/sdb.txt

@@ -0,0 +1,459 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sdb",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sdb",
+    "info_name": "/dev/sdb",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "Western Digital Red",
+  "model_name": "WDC WD20EFRX-68EUZN0",
+  "serial_number": "WD-WCC4M7PLT66J",
+  "wwn": {
+    "naa": 5,
+    "oui": 5358,
+    "id": 10216012843
+  },
+  "firmware_version": "82.00A82",
+  "user_capacity": {
+    "blocks": 3907029168,
+    "bytes": 2000398934016
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 4096,
+  "rotation_rate": 5400,
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ACS-2 (minor revision not indicated)",
+    "major_value": 1022,
+    "minor_value": 0
+  },
+  "sata_version": {
+    "string": "SATA 3.0",
+    "value": 62
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797141,
+    "asctime": "Sun Feb 10 19:12:21 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 16,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 200,
+        "worst": 200,
+        "thresh": 51,
+        "when_failed": "",
+        "flags": {
+          "value": 47,
+          "string": "POSR-K ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 3,
+        "name": "Spin_Up_Time",
+        "value": 174,
+        "worst": 165,
+        "thresh": 21,
+        "when_failed": "",
+        "flags": {
+          "value": 39,
+          "string": "POS--K ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4300,
+          "string": "4300"
+        }
+      },
+      {
+        "id": 4,
+        "name": "Start_Stop_Count",
+        "value": 96,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4654,
+          "string": "4654"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Reallocated_Sector_Ct",
+        "value": 200,
+        "worst": 200,
+        "thresh": 140,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 7,
+        "name": "Seek_Error_Rate",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 46,
+          "string": "-OSR-K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours",
+        "value": 89,
+        "worst": 89,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 8198,
+          "string": "8198"
+        }
+      },
+      {
+        "id": 10,
+        "name": "Spin_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 11,
+        "name": "Calibration_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2679,
+          "string": "2679"
+        }
+      },
+      {
+        "id": 192,
+        "name": "Power-Off_Retract_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 211,
+          "string": "211"
+        }
+      },
+      {
+        "id": 193,
+        "name": "Load_Cycle_Count",
+        "value": 195,
+        "worst": 195,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 16219,
+          "string": "16219"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 112,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 35,
+          "string": "35"
+        }
+      },
+      {
+        "id": 196,
+        "name": "Reallocated_Event_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 197,
+        "name": "Current_Pending_Sector",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 198,
+        "name": "Offline_Uncorrectable",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 48,
+          "string": "----CK ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 199,
+        "name": "UDMA_CRC_Error_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 200,
+        "name": "Multi_Zone_Error_Rate",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 8,
+          "string": "---R-- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 8198
+  },
+  "power_cycle_count": 2679,
+  "temperature": {
+    "current": 35
+  }
+}

+ 617 - 0
SystemAOB/functions/panel/drive/sdc.txt

@@ -0,0 +1,617 @@
+{
+  "json_format_version": [
+    1,
+    0
+  ],
+  "smartctl": {
+    "version": [
+      7,
+      0
+    ],
+    "svn_revision": "4883",
+    "platform_info": "x86_64-w64-mingw32-win7-sp1",
+    "build_info": "(sf-7.0-1)",
+    "argv": [
+      "smartctl",
+      "-i",
+      "/dev/sdc",
+      "-j",
+      "-A"
+    ],
+    "exit_status": 0
+  },
+  "device": {
+    "name": "/dev/sdc",
+    "info_name": "/dev/sdc",
+    "type": "ata",
+    "protocol": "ATA"
+  },
+  "model_family": "Seagate Barracuda 7200.14 (AF)",
+  "model_name": "ST2000DM001-1CH164",
+  "serial_number": "Z1E99HMC",
+  "wwn": {
+    "naa": 5,
+    "oui": 3152,
+    "id": 2061669450
+  },
+  "firmware_version": "CC27",
+  "user_capacity": {
+    "blocks": 3907029168,
+    "bytes": 2000398934016
+  },
+  "logical_block_size": 512,
+  "physical_block_size": 4096,
+  "rotation_rate": 7200,
+  "form_factor": {
+    "ata_value": 2,
+    "name": "3.5 inches"
+  },
+  "in_smartctl_database": true,
+  "ata_version": {
+    "string": "ACS-2, ACS-3 T13/2161-D revision 3b",
+    "major_value": 1008,
+    "minor_value": 31
+  },
+  "sata_version": {
+    "string": "SATA 3.1",
+    "value": 126
+  },
+  "interface_speed": {
+    "max": {
+      "sata_value": 14,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    },
+    "current": {
+      "sata_value": 3,
+      "string": "6.0 Gb/s",
+      "units_per_second": 60,
+      "bits_per_unit": 100000000
+    }
+  },
+  "local_time": {
+    "time_t": 1549797296,
+    "asctime": "Sun Feb 10 19:14:56 2019 CST"
+  },
+  "ata_smart_attributes": {
+    "revision": 10,
+    "table": [
+      {
+        "id": 1,
+        "name": "Raw_Read_Error_Rate",
+        "value": 115,
+        "worst": 99,
+        "thresh": 6,
+        "when_failed": "",
+        "flags": {
+          "value": 15,
+          "string": "POSR-- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 86025176,
+          "string": "86025176"
+        }
+      },
+      {
+        "id": 3,
+        "name": "Spin_Up_Time",
+        "value": 96,
+        "worst": 96,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 3,
+          "string": "PO---- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 4,
+        "name": "Start_Stop_Count",
+        "value": 96,
+        "worst": 96,
+        "thresh": 20,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 4370,
+          "string": "4370"
+        }
+      },
+      {
+        "id": 5,
+        "name": "Reallocated_Sector_Ct",
+        "value": 100,
+        "worst": 100,
+        "thresh": 10,
+        "when_failed": "",
+        "flags": {
+          "value": 51,
+          "string": "PO--CK ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 7,
+        "name": "Seek_Error_Rate",
+        "value": 80,
+        "worst": 60,
+        "thresh": 30,
+        "when_failed": "",
+        "flags": {
+          "value": 15,
+          "string": "POSR-- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 110215814,
+          "string": "110215814"
+        }
+      },
+      {
+        "id": 9,
+        "name": "Power_On_Hours",
+        "value": 88,
+        "worst": 88,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 11192,
+          "string": "11192"
+        }
+      },
+      {
+        "id": 10,
+        "name": "Spin_Retry_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 97,
+        "when_failed": "",
+        "flags": {
+          "value": 19,
+          "string": "PO--C- ",
+          "prefailure": true,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 12,
+        "name": "Power_Cycle_Count",
+        "value": 98,
+        "worst": 98,
+        "thresh": 20,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 2669,
+          "string": "2669"
+        }
+      },
+      {
+        "id": 183,
+        "name": "Runtime_Bad_Block",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 184,
+        "name": "End-to-End_Error",
+        "value": 100,
+        "worst": 100,
+        "thresh": 99,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 187,
+        "name": "Reported_Uncorrect",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 188,
+        "name": "Command_Timeout",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0 0 0"
+        }
+      },
+      {
+        "id": 189,
+        "name": "High_Fly_Writes",
+        "value": 99,
+        "worst": 99,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 58,
+          "string": "-O-RCK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 1,
+          "string": "1"
+        }
+      },
+      {
+        "id": 190,
+        "name": "Airflow_Temperature_Cel",
+        "value": 64,
+        "worst": 49,
+        "thresh": 45,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 622985252,
+          "string": "36 (Min/Max 34/37)"
+        }
+      },
+      {
+        "id": 191,
+        "name": "G-Sense_Error_Rate",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 192,
+        "name": "Power-Off_Retract_Count",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 246,
+          "string": "246"
+        }
+      },
+      {
+        "id": 193,
+        "name": "Load_Cycle_Count",
+        "value": 50,
+        "worst": 50,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 50,
+          "string": "-O--CK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 101342,
+          "string": "101342"
+        }
+      },
+      {
+        "id": 194,
+        "name": "Temperature_Celsius",
+        "value": 36,
+        "worst": 51,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 34,
+          "string": "-O---K ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 42949672996,
+          "string": "36 (0 10 0 0 0)"
+        }
+      },
+      {
+        "id": 197,
+        "name": "Current_Pending_Sector",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 18,
+          "string": "-O--C- ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 198,
+        "name": "Offline_Uncorrectable",
+        "value": 100,
+        "worst": 100,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 16,
+          "string": "----C- ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": true,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 199,
+        "name": "UDMA_CRC_Error_Count",
+        "value": 200,
+        "worst": 200,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 62,
+          "string": "-OSRCK ",
+          "prefailure": false,
+          "updated_online": true,
+          "performance": true,
+          "error_rate": true,
+          "event_count": true,
+          "auto_keep": true
+        },
+        "raw": {
+          "value": 0,
+          "string": "0"
+        }
+      },
+      {
+        "id": 240,
+        "name": "Head_Flying_Hours",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 12602821320906682,
+          "string": "6074h+48m+54.323s"
+        }
+      },
+      {
+        "id": 241,
+        "name": "Total_LBAs_Written",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 36524852004,
+          "string": "36524852004"
+        }
+      },
+      {
+        "id": 242,
+        "name": "Total_LBAs_Read",
+        "value": 100,
+        "worst": 253,
+        "thresh": 0,
+        "when_failed": "",
+        "flags": {
+          "value": 0,
+          "string": "------ ",
+          "prefailure": false,
+          "updated_online": false,
+          "performance": false,
+          "error_rate": false,
+          "event_count": false,
+          "auto_keep": false
+        },
+        "raw": {
+          "value": 51255764039,
+          "string": "51255764039"
+        }
+      }
+    ]
+  },
+  "power_on_time": {
+    "hours": 11192
+  },
+  "power_cycle_count": 2669,
+  "temperature": {
+    "current": 36
+  }
+}

BIN
SystemAOB/functions/panel/drive/smartctl_armv6


BIN
SystemAOB/functions/panel/drive/smartctl_i386


+ 6 - 0
SystemAOB/functions/recovery/enable.php

@@ -0,0 +1,6 @@
+<?php
+exec('sudo a2dissite 000-default.conf');
+exec('sudo a2ensite 001-recovery.conf');
+exec('sudo systemctl reload apache2');
+echo "REBOOTED."
+?>

+ 70 - 0
SystemAOB/functions/recovery/menu.php

@@ -0,0 +1,70 @@
+
+
+<!DOCTYPE html>
+<meta name="apple-mobile-web-app-capable" content="yes" />
+<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=0.6, maximum-scale=0.6"/>
+<html>
+<head>
+<meta charset="UTF-8">
+<script type='text/javascript' charset='utf-8'>
+    // Hides mobile browser's address bar when page is done loading.
+      window.addEventListener('load', function(e) {
+        setTimeout(function() { window.scrollTo(0, 1); }, 1);
+      }, false);
+</script>
+<title>ArOZ Onlineβ</title>
+<link rel="stylesheet" href="../../../script/tocas/tocas.css">
+<script src="../../../script/tocas/tocas.js"></script>
+<script src="../../../script/jquery.min.js"></script>
+</head>
+<body style="background:rgba(255,255,255,1);">
+<div class="ts fluid borderless slate">
+	<div class="ts segment" style="width:100%;">
+		<div class="ts header">
+			Advance boot menu
+			<div class="sub header">Boot advanced mode here.</div>
+		</div>
+	</div>
+	List of boot
+
+</div>
+
+	<div class="ts container">
+	<?php
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' || !file_exists("/var/www/recovery/")) {
+    echo '<div class="ts divider"></div><div class="ts secondary message">
+		<div class="header">Host Operation System not supported</div>
+		<p>This function is currently supported on specific system.<br> If you are sure this function should be available, please check if your ArOZ Online system is up to date.</p>
+	</div><div class="ts divider"></div>';
+	die();
+}
+?>
+	<br>
+		<h4>Boot into recovery mode</h4>
+		<a class="ts button" href="enable.php">BOOT</a>
+	</div>
+
+<div>
+</div>
+
+
+<div id="msgbox" class="ts bottom right snackbar">
+    <div class="content">
+        Your request is processing now.
+    </div>
+</div>
+<br><br>
+<script>
+
+
+
+function msg(content) {
+		ts('.snackbar').snackbar({
+			content: content,
+			actionEmphasis: 'negative',
+		});
+}
+
+</script>
+</body>
+</html>