getHD.

@return array the hard drive info
765273
public function getHD()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Drives');
        }

        // Get partitions
        $partitions = [];
        $partitions_contents = Common::getContents('/proc/partitions');
        if (@preg_match_all('/(\d+)\s+([a-z]{3})(\d+)$/m', $partitions_contents, $partitions_match, PREG_SET_ORDER) > 0) {
            // Go through each match
            foreach ($partitions_match as $partition) {
                $partitions[$partition[2]][] = array(
                    'size' => $partition[1] * 1024,
                    'number' => $partition[3],
                );
            }
        }

        // Store drives here
        $drives = [];

        // Get actual drives
        foreach ((array) @glob('/sys/block/*/device/model', GLOB_NOSORT) as $path) {

            // Parts of the path
            $parts = explode('/', $path);

            // Attempt getting read/write stats
            if (preg_match('/^(\d+)\s+\d+\s+\d+\s+\d+\s+(\d+)/', Common::getContents(dirname(dirname($path)).'/stat'), $statMatches) !== 1) {
                // Didn't get it
                $reads = false;
                $writes = false;
            } else {
                // Got it, save it
                list(, $reads, $writes) = $statMatches;
            }

            // Append this drive on
            $drives[] = array(
                'name' => Common::getContents($path, 'Unknown').(Common::getContents(dirname(dirname($path)).'/queue/rotational') == 0 ? ' (SSD)' : ''),
                'vendor' => Common::getContents(dirname($path).'/vendor', 'Unknown'),
                'device' => '/dev/'.$parts[3],
                'reads' => $reads,
                'writes' => $writes,
                'size' => Common::getContents(dirname(dirname($path)).'/size', 0) * 512,
                'partitions' => array_key_exists($parts[3], $partitions) && is_array($partitions[$parts[3]]) ? $partitions[$parts[3]] : false,
            );
        }

        // Return drives
        return $drives;
    }
1167986
public function
	GetData() {

		$Data = $this->Data;
		if(!is_array($Data)) $Data = [$Data];

		foreach($Data as $Key => $Val) {
			if(!$this->MountStart && !$this->MountEnd)
			$Data[$Key] = "%{$Val}%";

			elseif($this->MountStart && !$this->MountEnd)
			$Data[$Key] = "{$Val}%";

			elseif(!$this->MountStart && $this->MountEnd)
			$Data[$Key] = "%{$Val}";
		}

		return $Data;
	}
35251
public function getInfo()
    {
        return array(
            'ucache_meminfo' => wincache_ucache_meminfo(),
            'ucache_info' =>    wincache_ucache_info(),
            'session_cache_info' => wincache_scache_info(),
            'session_cache_meminfo' =>  wincache_scache_meminfo(),
            'rp_meminfo' => wincache_rplist_meminfo(),
            'rp_fileinfo' =>    wincache_rplist_fileinfo(),
            'opcode_fileinfo' =>    wincache_ocache_fileinfo(),
            'opcode_meminfo' => wincache_ocache_meminfo(),
            'filecache_meminfo' =>  wincache_fcache_fileinfo(),
            'filecache_fileinfo' => wincache_fcache_meminfo()
        );
    }
927019
protected function getFileSystem(): array
	{
		$fileSystem = [];

		$command = $this->readCommand('df -T');
		if ($command) {
			$bufe = preg_split("/\n/", $command, -1, PREG_SPLIT_NO_EMPTY);
			unset($bufe[0]);
			foreach ($bufe as $buf) {
				$data = preg_split('/\s+/', $buf);
				$mounted = new Obj;

				$mounted->partition = $data[0];
				$mounted->type = $data[1];
				$mounted->size = $data[2] * 1024;
				$mounted->used = $data[3] * 1024;
				$mounted->free = $data[4] * 1024;
				$mounted->usage = $data[5];
				$mounted->mountPoint = $data[6];

				$fileSystem[] = $mounted;
			}
		}

		return $fileSystem;
	}
923023
protected function getNetVolumes() {
		return isset($_SESSION[$this->netVolumesSessionKey]) && is_array($_SESSION[$this->netVolumesSessionKey]) ? $_SESSION[$this->netVolumesSessionKey] : array();
	}
694747
public function getFiles()
    {

        // initialize the array with the files
        $files = array();

        // iterate over the file keys and read the configuration values
        foreach (FileKeys::getServerFileKeys() as $fileKey) {
            $files[$fileKey] = $this->getSystemConfiguration()->getParam($fileKey);
        }

        // return the array with the files
        return $files;
    }
823314
public function getAll(){
        $rest = $this->getService( self::API_STORAGE_DISK);
        $rest->GET();

        return $rest->getResultAsArray( models\Storage\StorageDisk::class);
    }
1170670
public static function GetSystemTmpDir () {
		if (self::$tmpDir === NULL) {
			$tmpDir = sys_get_temp_dir();
			if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
				// Windows:
				$sysRoot = getenv('SystemRoot');
				// do not store anything directly in C:\Windows, use C\windows\Temp instead
				if (!$tmpDir || $tmpDir === $sysRoot) {
					$tmpDir = !empty($_SERVER['TEMP']) 
						? $_SERVER['TEMP']
						: (!empty($_SERVER['TMP'])
							? $_SERVER['TMP']
							: (!empty($_SERVER['WINDIR'])
								? $_SERVER['WINDIR'] . '/Temp'
								: $sysRoot . '/Temp'
							)
						);
				}
				$tmpDir = str_replace('\\', '/', $tmpDir);
			} else if (!$tmpDir) {
				// Other systems
				$tmpDir = !empty($_SERVER['TMPDIR']) 
					? $_SERVER['TMPDIR']
					: (!empty($_SERVER['TMP'])
						? $_SERVER['TMP']
						: (!empty(ini_get('sys_temp_dir'))
							? ini_get('sys_temp_dir')
							: '/tmp'
						)
					);
			}
			self::$tmpDir = $tmpDir;
		}
		return self::$tmpDir;
	}
244929
public function getDevs()
    {

        // Time?
        if (!empty($this->settings['timer'])) {
            $t = new Timer('Hardware Devices');
        }

        $devs = array();

        foreach ($this->wmi->ExecQuery('SELECT DeviceID, Caption, Manufacturer FROM Win32_PnPEntity') as $pnpdev) {
            $devId = explode('\\', $pnpdev->DeviceID);
            $type = reset($devId);
            if (($type != 'USB' && $type != 'PCI') || (empty($pnpdev->Caption) || $pnpdev->Manufacturer[0] == '(')) {
                continue;
            }
            $manufacturer = $pnpdev->Manufacturer;
            $caption = $pnpdev->Caption;
            if (function_exists('iconv')) {
                $manufacturer = iconv('Windows-1252', 'UTF-8//TRANSLIT', $manufacturer);
                $caption = iconv('Windows-1252', 'UTF-8//TRANSLIT', $caption);
            }
            $devs[] = array(
                'vendor' => $manufacturer,
                'device' => $caption,
                'type' => $type,
            );
        }

        // Sort by 1. Type, 2. Vendor
        usort($devs, array('Linfo\OS\Windows', 'compare_devices'));

        return $devs;
    }
770413
public function returnFullData() {

        $aStorageSystem = $this->returnFullDataSystem();
        $aStorageStorage = $this->returnFullDataStorage();

        $aReturn = Array();
        $aReturn['system'] = $aStorageSystem;
        $aReturn['storage'] = $aStorageStorage;

        return $aReturn;
    }
118233
public function getFileInfo()
    {
        $fullName = str_replace('source/','',$this->fullName);
        return [
            "msg"    => $this->stateInfo,
            "code" => $this->stateInfo == "SUCCESS" ? 0 : $this->stateInfo,
            "data"=>[
                "src"=>$this->imgDomain.$fullName,
                'title'=>$fullName,
            ],
            "type"     => $this->fileType,
            "size"     => $this->fileSize
        ];
    }
216248
public function returnFullData() {
        
        $aDisk = $this->getSNMP()->realWalk1d(self::OID_DISK);
        $aDiskIo = $this->getSNMP()->realWalk1d(self::OID_DISK_IO);
        
        $aReturn = Array();
        $aReturn['index'] = $aDisk[self::OID_DISK_INDEX];
        $aReturn['device'] = $aDisk[self::OID_DISK_DEVICE];
        $aReturn['path'] = $aDisk[self::OID_DISK_PATH];
        $aReturn['minimum_size'] = $aDisk[self::OID_DISK_MINIMUM];
        $aReturn['minimum_percent'] = $aDisk[self::OID_DISK_MIN_PERCENT];
        $aReturn['total_size'] = $aDisk[self::OID_DISK_TOTAL];
        $aReturn['avaliable_size'] = $aDisk[self::OID_DISK_AVALIABLE];
        $aReturn['used_size'] = $aDisk[self::OID_DISK_USED];
        $aReturn['used_percent'] = $aDisk[self::OID_DISK_USED_PERCENT];
        $aReturn['free_percent'] = $this->freePercentCalculation($aReturn['used_percent']);
        $aReturn['node_percent'] = $aDisk[self::OID_DISK_NODE_PERCENT];
        $aReturn['total_low'] = $aDisk[self::OID_DISK_TOTAL_LOW];
        $aReturn['total_high'] = $aDisk[self::OID_DISK_TOTAL_HIGH];
        $aReturn['avaliable_low'] = $aDisk[self::OID_DISK_AVALIABLE_LOW];
        $aReturn['avaliable_high'] = $aDisk[self::OID_DISK_AVALIABLE_HIGH];
        $aReturn['used_low'] = $aDisk[self::OID_DISK_USED_LOW];
        $aReturn['used_high'] = $aDisk[self::OID_DISK_USED_HIGH];
        $aReturn['error_flag'] = $aDisk[self::OID_DISK_ERROR_FLAG];
        $aReturn['error_msg'] = $aDisk[self::OID_DISK_ERROR_MSG];
        $aReturn['disk_io'] = $aDiskIo;
        return $aReturn;
    }
132373
protected function getSystemMemoryInfo()
    {
        $meminfo = array();

        if (file_exists(static::MEMINFO_PATH)) {
            $data = explode("\n", file_get_contents(static::MEMINFO_PATH));
            $meminfo = array();
            foreach ($data as $line) {
                if (!empty($line)) {
                    list($key, $val) = explode(":", $line);

                    $meminfo[$key] = intval($val);
                }
            }
        }

        return $meminfo;
    }
211959
protected static function getInfo()
    {
        $files = self::getFiles();
        //
        foreach ($files as $path) {
            $data = self::convert(self::readFile($path.'/vinala.json'), $path);
            $data = $data['system'];
            $data['path'] = $path;

            if (array_key_exists('alias', $data)) {
                self::$infos[$data['alias']] = $data;
            } else {
                // die($path."/.info");
            }
        }
        //
        return self::$infos;
    }
997405
protected function getInputAndOutputDisk()
    {
        $validInputPath = FALSE;
        $validOutputPath = FALSE;

        //runs as long as user enters valid input root path
        while(!$validInputPath){
            $goBack = FALSE;
            $rootInput = $this->choice('Which input disk?', array_keys(config('filesystems.disks.cms.migrations')), 0);
            if ($rootInput == 'custom_input') {
                while(!$validInputPath && !$goBack){
                    $rootInput = $this->ask('Please enter root-Path for Input-CMS');
                    if ($rootInput === 'x'){
                        $goBack = TRUE;
                    }
                    if(!file_exists($rootInput)){
                        $this->info('Invalid Path! Please enter valid Root-Path');
                        $this->info("\n" . '[x] -> Go back');
                    }
                    else {
                        $validInputPath = TRUE;
                    }
                }
            } else{
                //default-input-path
                $validInputPath = TRUE;
            }
        }
        //runs as long as user enters valid output root path
        while(!$validOutputPath){
            $goBack = FALSE;
            $rootOutput = $this->choice('Which output disk?', array_keys(config('filesystems.disks.cms.migrations')), 1);
            if ($rootOutput == 'custom_output') {
                while(!$validOutputPath && !$goBack){
                    $rootOutput = $this->ask('Please enter root-Path for Output-CMS');
                    if ($rootOutput === 'x'){
                        $goBack = TRUE;
                    }
                    if(!file_exists($rootOutput)){
                        $this->info('Invalid Path! Please enter valid Root-Path');
                        $this->info("\n" . '[x] -> Go back');
                    }
                    else {
                        $validOutputPath = TRUE;
                    }
                }
            } else{
                //default-output-path
                $validOutputPath = TRUE;
            }
        }
        return array($rootInput, $rootOutput);
    }
302527
public function asArray()
    {
        $headers = [];
        foreach (array_filter($this->storage) as $header => $value) {
            $headers[] = $header . ': ' . $value;
        }

        return $headers;
    }
739973
public function getAllDevicesID()
    {
        $devicesId = array();

        foreach ($this->deviceClassificationNames as $className) {
            $currentMap = $this->persistenceStorage->load($className);

            if (!is_array($currentMap)) {
                $currentMap = array();
            }

            $overwritten = $this->persistenceStorage->load($className . '_overwritten');

            if (!is_array($overwritten)) {
                $overwritten = array();
            }

            $devicesId = array_merge($devicesId, array_values($currentMap), $overwritten);
        }

        return $devicesId;
    }