Page MenuHomePhorge

final class PhutilSystem
Arcanist Technical Documentation ()

Interact with the operating system.

Tasks

Interacting with Standard I/O

Interacting with System Memory

  • public static function getSystemMemoryInformation() — Get information about total and free memory on the system.
  • public static function parseMemInfo($data) — Parse the output of `/proc/meminfo`.
  • public static function parseVMStat($data) — Parse the output of `vm_stat`.

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

public static function getStdinHandle()

This method is not documented.
Return
wild

public static function getStdoutHandle()

This method is not documented.
Return
wild

public static function getStderrHandle()

This method is not documented.
Return
wild

public static function writeStderr($message)

This method is not documented.
Parameters
$message
Return
wild

private static function getStdioHandle($ref)

This method is not documented.
Parameters
$ref
Return
wild

public static function getSystemMemoryInformation()

Get information about total and free memory on the system.

Because "free memory" is a murky concept, the interpretation of the values returned from this method will vary from system to system and the numbers themselves may be only roughly accurate.

Return
map<string, wild>Dictionary of memory information.

public static function parseMemInfo($data)

Parse the output of /proc/meminfo.

See getSystemMemoryInformation(). This method is used to get memory information on Linux.

Parameters
string$dataRaw `/proc/meminfo`.
Return
map<string, wild>Parsed memory information.

public static function parseVMStat($data)

Parse the output of vm_stat.

See getSystemMemoryInformation(). This method is used to get memory information on Mac OS X.

Parameters
string$dataRaw `vm_stat` output.
Return
map<string, wild>Parsed memory information.