Returns total swap space

@see System::_swapDevices
@see DiskDevice::getTotal()

@return Integer
166455
public function getSwapTotal()
    {
        if (count($this->_swapDevices) > 0) {
            $total = 0;
            foreach ($this->_swapDevices as $dev) {
                $total += $dev->getTotal();
            }

            return $total;
        } else {
            return null;
        }
    }
481566
public function returnFullDataIo() {
        
        $aDiskIo = $this->getSNMP()->realWalk1d(self::OID_DISK_IO);
        
        
        $aReturn = Array();
        $aReturn['index'] = $aDiskIo[self::OID_DISK_IO_INDEX];
        $aReturn['device'] = $aDiskIo[self::OID_DISK_IO_DEVICE];
        $aReturn['disk_io_read'] = $aDiskIo[self::OID_DISK_IO_READ];
        $aReturn['disk_io_write'] = $aDiskIo[self::OID_DISK_IO_WRITE];
        $aReturn['disk_io_read_access'] = $aDiskIo[self::OID_DISK_IO_READ_ACCESS];
        $aReturn['disk_io_write_access'] = $aDiskIo[self::OID_DISK_IO_WRITE_ACCESS];
        $aReturn['disk_io_load1Min'] = $aDiskIo[self::OID_DISK_IO_LOAD1MIN];
        $aReturn['disk_io_load5Min'] = $aDiskIo[self::OID_DISK_IO_LOAD5MIN];
        $aReturn['disk_io_load15Min'] = $aDiskIo[self::OID_DISK_IO_LOAD15MIN];
        //$aReturn['disk_io_readx'] = $aDiskIo[self::OID_DISK_IO_READX];
        //$aReturn['disk_io_writex'] = $aDiskIo[self::OID_DISK_IO_WRITEX];
        $aReturn['counter_max_value'] = 4294967295;
        
        return $aReturn;
    }
414689
public static function getMemoryUsage()
    {
        $memory = false;
        if (function_exists('xdebug_memory_usage')) {
            $memory = xdebug_memory_usage();
        } elseif (function_exists('memory_get_usage')) {
            $memory = memory_get_usage();
        }
        if ($memory === false) {
            return "Memory usage function not found.";
        }
        $usage = number_format(round($memory / 1024 / 1024, 2), 2);
        return "$usage Mb";
    }
444309
public function getTotalItems()
    {
        $total = 0;
        
        foreach ($this->items as $item) {
            $total += ($item->Quantity) ? $item->Quantity : 1;
        }

        return $total;
    }
1101614
public function getTotal()
    {
        if ($this->updateRequested) {
            $this->total = $this->getTotalWithExclusions([]);
            $this->updateRequested = false;
            $this->saveState();
        }

        return $this->total;
    }
335503
public function getAt(): int
    {
        if ($this->at < 0) {
            return Location::BeforeFirstRow;
        }

        if ($this->at > $this->rowCount()) {
            return Location::AfterLastRow;
        }

        return $this->at;
    }
548078
public function getTotalDataRowCount() {
        if (empty($this->file_data)) {
            return false;
        }

        $data = $this->file_data;

        $this->_detect_and_remove_sep_row_from_data($data);

        $pattern = sprintf('/%1$s[^%1$s]*%1$s/i', $this->enclosure);
        preg_match_all($pattern, $data, $matches);

        /** @var array[] $matches */
        foreach ($matches[0] as $match) {
            if (empty($match) || (strpos($match, $this->enclosure) === false)) {
                continue;
            }

            $replace = str_replace(["\r", "\n"], '', $match);
            $data = str_replace($match, $replace, $data);
        }

        $headingRow = $this->heading ? 1 : 0;

        $count = substr_count($data, "\r")
            + substr_count($data, "\n")
            - substr_count($data, "\r\n")
            - $headingRow;

        return $count;
    }
880860
public int getTotalFree(){
		int total=0;
		for (int i=0; i < this.partitionCount && this.partitions[i] != null ; i++){
			total+=this.partitions[i].getAvailableConnections();
		}
		return total;
	}
368823
public static function getMemoryLimit()
    {
        $iniVal = ini_get('memory_limit');
        $val = $iniVal !== ''
            ? $iniVal
            : ( version_compare(PHP_VERSION, '5.2.0', '>')
                ? '128M'
                : ( version_compare(PHP_VERSION, '5.2.0', '=')
                    ? '16M'
                    : '8M'
                )
            );
        return $val;
    }
448979
protected function calculateTotal()
    {
        $otherConfig = $this->getOtherConfig();
        $total       = $this
            ->getEnvironment()
            ->getDataProvider()
            ->fetchAll($otherConfig->setIdOnly(true));

        if (\is_array($total)) {
            $this->intTotal = $total ? \count($total) : 0;

            return;
        }

        if (\is_object($total)) {
            $this->intTotal = $total->length();

            return;
        }

        $this->intTotal = 0;
    }
795683
public function getSize()
    {
        if ($this->isDirty && $this->bytes) {
            return strlen($this->bytes);
        }
        if ($this->isDirty && $this->filename) {
            return filesize($this->filename);
        }
        if ($this->riakGridFSFile instanceof \RiakGridFSFile) {
            return $this->riakGridFSFile->getSize();
        }
        return 0;
    }
177706
public int getTotalBits() {
    //this total calculates and removes the bits reserved for "offset"
    //   between the different children.
    int total = 0;
    EncodedElement iter = this;
    while(iter != null) {
      total += iter.usableBits - iter.offset;
      iter = iter.next;
    }
    return total;
  }
926013
public function getMemoryUsageData()
	{
		if (null === $this->memoryUsageData)
		{
			$memoryUsage = memory_get_usage();

			$unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];

			$this->memoryUsageData = [
				round($memoryUsage/pow(1024, ($i=floor(log($memoryUsage, 1024))) ), 2),
				$unit[$i]
			];
		}

		return $this->memoryUsageData;
	}
893266
public function calcResourceMemorySize(): int {
		$imageData = getimagesize($this->filePath);
		$mb = 1048576;  // number of bytes in 1M
		$k64 = 65536;	// number of bytes in 64K
		$tweakfactor = 1.62;
		return round(( $imageData[0] * $imageData[1] * $imageData['bits'] * $imageData['channels'] / 8 + $k64) * $tweakfactor);
	}
1107879
public function getTotalPage()
    {
        $this->pageSize > 0 || $this->pageSize = 10;

        $totalPage = ceil($this->total / $this->pageSize);

        $totalPage >= 1 || $totalPage = 1;

        return $totalPage;
    }
351481
public function memory_total()
    {
        $mem_total = 0;
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $os =  $wmi->ExecQuery("SELECT * FROM Win32_OperatingSystem");

            foreach ($os as $m) {
                $mem_total = $m->TotalVisibleMemorySize;
            }
        } else {
            $fh = fopen('/proc/meminfo', 'r');

            while ($line = fgets($fh)) {
                $pieces = array();
                if (preg_match('/^MemTotal:\s+(\d+)\skB$/', trim($line), $pieces)) {
                    $mem_total = $pieces[1];
                    break;
                }
            }
            fclose($fh);
        }
        return $mem_total;
    }
977666
public function numCellsTotal()
    {
        $numCells = 0;
        foreach ($this->structure as $row) {
            $rowCols = isset($row['columns']) ? count($row['columns']) : 0;
            $numCells += $rowCols;
        }
        return $numCells;
    }