repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.removeDupsAndCount | public static function removeDupsAndCount($arrDev)
{
$result = array();
foreach ($arrDev as $dev) {
if (count($result) === 0) {
array_push($result, $dev);
} else {
$found = false;
foreach ($result as $tmp) {
... | php | public static function removeDupsAndCount($arrDev)
{
$result = array();
foreach ($arrDev as $dev) {
if (count($result) === 0) {
array_push($result, $dev);
} else {
$found = false;
foreach ($result as $tmp) {
... | [
"public",
"static",
"function",
"removeDupsAndCount",
"(",
"$",
"arrDev",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"arrDev",
"as",
"$",
"dev",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"result",
")",
"===",
"0",
")",... | remove duplicate Entries and Count
@param array $arrDev list of HWDevices
@see HWDevice
@return array | [
"remove",
"duplicate",
"Entries",
"and",
"Count"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L255-L277 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getMemPercentApplication | public function getMemPercentApplication()
{
if ($this->_memApplication !== null) {
if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
return round($this->_memApplication / $this->_memTotal * 100);
} else {
return 0;
}
} ... | php | public function getMemPercentApplication()
{
if ($this->_memApplication !== null) {
if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
return round($this->_memApplication / $this->_memTotal * 100);
} else {
return 0;
}
} ... | [
"public",
"function",
"getMemPercentApplication",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_memApplication",
"!==",
"null",
")",
"{",
"if",
"(",
"(",
"$",
"this",
"->",
"_memApplication",
">",
"0",
")",
"&&",
"(",
"$",
"this",
"->",
"_memTotal",
"... | return percent of used memory for applications
@see System::_memApplication
@see System::_memTotal
@return Integer | [
"return",
"percent",
"of",
"used",
"memory",
"for",
"applications"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L304-L315 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getMemPercentCache | public function getMemPercentCache()
{
if ($this->_memCache !== null) {
if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
return round(($this->_memCache + $this->_memApplication) / ... | php | public function getMemPercentCache()
{
if ($this->_memCache !== null) {
if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
return round(($this->_memCache + $this->_memApplication) / ... | [
"public",
"function",
"getMemPercentCache",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_memCache",
"!==",
"null",
")",
"{",
"if",
"(",
"(",
"$",
"this",
"->",
"_memCache",
">",
"0",
")",
"&&",
"(",
"$",
"this",
"->",
"_memTotal",
">",
"0",
")",
... | return percent of used memory for cache
@see System::_memCache
@see System::_memTotal
@return Integer | [
"return",
"percent",
"of",
"used",
"memory",
"for",
"cache"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L325-L340 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getMemPercentBuffer | public function getMemPercentBuffer()
{
if ($this->_memBuffer !== null) {
if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
if (($this->_memCache !== null) && ($this->_memCache > 0)) {
if (($this->_memApplication !== null) && ($this->_memApplication > 0... | php | public function getMemPercentBuffer()
{
if ($this->_memBuffer !== null) {
if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
if (($this->_memCache !== null) && ($this->_memCache > 0)) {
if (($this->_memApplication !== null) && ($this->_memApplication > 0... | [
"public",
"function",
"getMemPercentBuffer",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_memBuffer",
"!==",
"null",
")",
"{",
"if",
"(",
"(",
"$",
"this",
"->",
"_memBuffer",
">",
"0",
")",
"&&",
"(",
"$",
"this",
"->",
"_memTotal",
">",
"0",
")... | return percent of used memory for buffer
@see System::_memBuffer
@see System::_memTotal
@return Integer | [
"return",
"percent",
"of",
"used",
"memory",
"for",
"buffer"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L350-L371 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getSwapFree | public function getSwapFree()
{
if (count($this->_swapDevices) > 0) {
$free = 0;
foreach ($this->_swapDevices as $dev) {
$free += $dev->getFree();
}
return $free;
}
return null;
} | php | public function getSwapFree()
{
if (count($this->_swapDevices) > 0) {
$free = 0;
foreach ($this->_swapDevices as $dev) {
$free += $dev->getFree();
}
return $free;
}
return null;
} | [
"public",
"function",
"getSwapFree",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_swapDevices",
")",
">",
"0",
")",
"{",
"$",
"free",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"_swapDevices",
"as",
"$",
"dev",
")",
"{",
"$... | Returns total free swap space
@see System::_swapDevices
@see DiskDevice::getFree()
@return Integer | [
"Returns",
"total",
"free",
"swap",
"space"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L381-L393 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getSwapTotal | public function getSwapTotal()
{
if (count($this->_swapDevices) > 0) {
$total = 0;
foreach ($this->_swapDevices as $dev) {
$total += $dev->getTotal();
}
return $total;
} else {
return null;
}
} | php | public function getSwapTotal()
{
if (count($this->_swapDevices) > 0) {
$total = 0;
foreach ($this->_swapDevices as $dev) {
$total += $dev->getTotal();
}
return $total;
} else {
return null;
}
} | [
"public",
"function",
"getSwapTotal",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_swapDevices",
")",
">",
"0",
")",
"{",
"$",
"total",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"_swapDevices",
"as",
"$",
"dev",
")",
"{",
... | Returns total swap space
@see System::_swapDevices
@see DiskDevice::getTotal()
@return Integer | [
"Returns",
"total",
"swap",
"space"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L403-L415 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getSwapUsed | public function getSwapUsed()
{
if (count($this->_swapDevices) > 0) {
$used = 0;
foreach ($this->_swapDevices as $dev) {
$used += $dev->getUsed();
}
return $used;
} else {
return null;
}
} | php | public function getSwapUsed()
{
if (count($this->_swapDevices) > 0) {
$used = 0;
foreach ($this->_swapDevices as $dev) {
$used += $dev->getUsed();
}
return $used;
} else {
return null;
}
} | [
"public",
"function",
"getSwapUsed",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_swapDevices",
")",
">",
"0",
")",
"{",
"$",
"used",
"=",
"0",
";",
"foreach",
"(",
"$",
"this",
"->",
"_swapDevices",
"as",
"$",
"dev",
")",
"{",
"$... | Returns total used swap space
@see System::_swapDevices
@see DiskDevice::getUsed()
@return Integer | [
"Returns",
"total",
"used",
"swap",
"space"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L425-L437 |
phpsysinfo/phpsysinfo | includes/to/class.System.inc.php | System.getSwapPercentUsed | public function getSwapPercentUsed()
{
if ($this->getSwapTotal() !== null) {
if ($this->getSwapTotal() > 0) {
return round($this->getSwapUsed() / $this->getSwapTotal() * 100);
} else {
return 0;
}
} else {
return null;
... | php | public function getSwapPercentUsed()
{
if ($this->getSwapTotal() !== null) {
if ($this->getSwapTotal() > 0) {
return round($this->getSwapUsed() / $this->getSwapTotal() * 100);
} else {
return 0;
}
} else {
return null;
... | [
"public",
"function",
"getSwapPercentUsed",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getSwapTotal",
"(",
")",
"!==",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getSwapTotal",
"(",
")",
">",
"0",
")",
"{",
"return",
"round",
"(",
"$",
"th... | return percent of total swap space used
@see System::getSwapUsed()
@see System::getSwapTotal()
@return Integer | [
"return",
"percent",
"of",
"total",
"swap",
"space",
"used"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/to/class.System.inc.php#L447-L458 |
phpsysinfo/phpsysinfo | includes/xml/class.SimpleXMLExtended.inc.php | SimpleXMLExtended.addChild | public function addChild($name, $value = null)
{
$nameUtf8 = $this->_toUTF8($name);
if ($value == null) {
return new SimpleXMLExtended($this->_SimpleXmlElement->addChild($nameUtf8), $this->_encoding);
} else {
$valueUtf8 = htmlspecialchars($this->_toUTF8($value), ENT_... | php | public function addChild($name, $value = null)
{
$nameUtf8 = $this->_toUTF8($name);
if ($value == null) {
return new SimpleXMLExtended($this->_SimpleXmlElement->addChild($nameUtf8), $this->_encoding);
} else {
$valueUtf8 = htmlspecialchars($this->_toUTF8($value), ENT_... | [
"public",
"function",
"addChild",
"(",
"$",
"name",
",",
"$",
"value",
"=",
"null",
")",
"{",
"$",
"nameUtf8",
"=",
"$",
"this",
"->",
"_toUTF8",
"(",
"$",
"name",
")",
";",
"if",
"(",
"$",
"value",
"==",
"null",
")",
"{",
"return",
"new",
"Simpl... | insert a child element with or without a value, also doing conversation of name and if value is set to utf8
@param String $name name of the child element
@param String $value a value that should be insert to the child
@return SimpleXMLExtended extended child SimpleXMLElement | [
"insert",
"a",
"child",
"element",
"with",
"or",
"without",
"a",
"value",
"also",
"doing",
"conversation",
"of",
"name",
"and",
"if",
"value",
"is",
"set",
"to",
"utf8"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/xml/class.SimpleXMLExtended.inc.php#L105-L115 |
phpsysinfo/phpsysinfo | includes/xml/class.SimpleXMLExtended.inc.php | SimpleXMLExtended.addCData | public function addCData($name, $cdata)
{
$nameUtf8 = $this->_toUTF8($name);
$node = $this->_SimpleXmlElement->addChild($nameUtf8);
$domnode = dom_import_simplexml($node);
$no = $domnode->ownerDocument;
$domnode->appendChild($no->createCDATASection($cdata));
return n... | php | public function addCData($name, $cdata)
{
$nameUtf8 = $this->_toUTF8($name);
$node = $this->_SimpleXmlElement->addChild($nameUtf8);
$domnode = dom_import_simplexml($node);
$no = $domnode->ownerDocument;
$domnode->appendChild($no->createCDATASection($cdata));
return n... | [
"public",
"function",
"addCData",
"(",
"$",
"name",
",",
"$",
"cdata",
")",
"{",
"$",
"nameUtf8",
"=",
"$",
"this",
"->",
"_toUTF8",
"(",
"$",
"name",
")",
";",
"$",
"node",
"=",
"$",
"this",
"->",
"_SimpleXmlElement",
"->",
"addChild",
"(",
"$",
"... | insert a child with cdata section
@param String $name name of the child element
@param String $cdata data for CDATA section
@return SimpleXMLExtended extended child SimpleXMLElement | [
"insert",
"a",
"child",
"with",
"cdata",
"section"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/xml/class.SimpleXMLExtended.inc.php#L125-L134 |
phpsysinfo/phpsysinfo | includes/xml/class.SimpleXMLExtended.inc.php | SimpleXMLExtended.addAttribute | public function addAttribute($name, $value)
{
$nameUtf8 = $this->_toUTF8($name);
$valueUtf8 = htmlspecialchars($this->_toUTF8($value), ENT_COMPAT, "UTF-8");
if (($valueUtf8 === "") && (version_compare("5.2.2", PHP_VERSION, ">"))) {
$this->_SimpleXmlElement->addAttribute($nameUtf8... | php | public function addAttribute($name, $value)
{
$nameUtf8 = $this->_toUTF8($name);
$valueUtf8 = htmlspecialchars($this->_toUTF8($value), ENT_COMPAT, "UTF-8");
if (($valueUtf8 === "") && (version_compare("5.2.2", PHP_VERSION, ">"))) {
$this->_SimpleXmlElement->addAttribute($nameUtf8... | [
"public",
"function",
"addAttribute",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"$",
"nameUtf8",
"=",
"$",
"this",
"->",
"_toUTF8",
"(",
"$",
"name",
")",
";",
"$",
"valueUtf8",
"=",
"htmlspecialchars",
"(",
"$",
"this",
"->",
"_toUTF8",
"(",
"$... | add a attribute to a child and convert name and value to utf8
@param String $name name of the attribute
@param String $value value of the attribute
@return Void | [
"add",
"a",
"attribute",
"to",
"a",
"child",
"and",
"convert",
"name",
"and",
"value",
"to",
"utf8"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/xml/class.SimpleXMLExtended.inc.php#L144-L153 |
phpsysinfo/phpsysinfo | includes/xml/class.SimpleXMLExtended.inc.php | SimpleXMLExtended.combinexml | public function combinexml(SimpleXMLElement $new_child)
{
$node1 = dom_import_simplexml($this->_SimpleXmlElement);
$dom_sxe = dom_import_simplexml($new_child);
$node2 = $node1->ownerDocument->importNode($dom_sxe, true);
$node1->appendChild($node2);
} | php | public function combinexml(SimpleXMLElement $new_child)
{
$node1 = dom_import_simplexml($this->_SimpleXmlElement);
$dom_sxe = dom_import_simplexml($new_child);
$node2 = $node1->ownerDocument->importNode($dom_sxe, true);
$node1->appendChild($node2);
} | [
"public",
"function",
"combinexml",
"(",
"SimpleXMLElement",
"$",
"new_child",
")",
"{",
"$",
"node1",
"=",
"dom_import_simplexml",
"(",
"$",
"this",
"->",
"_SimpleXmlElement",
")",
";",
"$",
"dom_sxe",
"=",
"dom_import_simplexml",
"(",
"$",
"new_child",
")",
... | append a xml-tree to another xml-tree
@param SimpleXMLElement $new_child child that should be appended
@return Void | [
"append",
"a",
"xml",
"-",
"tree",
"to",
"another",
"xml",
"-",
"tree"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/xml/class.SimpleXMLExtended.inc.php#L162-L168 |
phpsysinfo/phpsysinfo | includes/xml/class.SimpleXMLExtended.inc.php | SimpleXMLExtended._toUTF8 | private function _toUTF8($str)
{
$str = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', ' ', $str)); //remove nonprintable characters
if ($this->_encoding != null) {
if (strcasecmp($this->_encoding, "UTF-8") == 0) {
return $str;
} elseif (strcasecmp($this->_encodi... | php | private function _toUTF8($str)
{
$str = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', ' ', $str)); //remove nonprintable characters
if ($this->_encoding != null) {
if (strcasecmp($this->_encoding, "UTF-8") == 0) {
return $str;
} elseif (strcasecmp($this->_encodi... | [
"private",
"function",
"_toUTF8",
"(",
"$",
"str",
")",
"{",
"$",
"str",
"=",
"trim",
"(",
"preg_replace",
"(",
"'/[\\x00-\\x09\\x0b-\\x1F]/'",
",",
"' '",
",",
"$",
"str",
")",
")",
";",
"//remove nonprintable characters",
"if",
"(",
"$",
"this",
"->",
"_... | convert a string into an UTF-8 string
@param String $str string to convert
@return String UTF-8 string | [
"convert",
"a",
"string",
"into",
"an",
"UTF",
"-",
"8",
"string"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/xml/class.SimpleXMLExtended.inc.php#L177-L216 |
phpsysinfo/phpsysinfo | includes/output/class.WebpageXSLT.inc.php | WebpageXSLT.run | public function run()
{
CommonFunctions::checkForExtensions(array('xsl'));
$xmlfile = $this->getXMLString();
$xslfile = "phpsysinfo.xslt";
$domxml = new DOMDocument();
$domxml->loadXML($xmlfile);
$domxsl = new DOMDocument();
$domxsl->load($xslfile);
$x... | php | public function run()
{
CommonFunctions::checkForExtensions(array('xsl'));
$xmlfile = $this->getXMLString();
$xslfile = "phpsysinfo.xslt";
$domxml = new DOMDocument();
$domxml->loadXML($xmlfile);
$domxsl = new DOMDocument();
$domxsl->load($xslfile);
$x... | [
"public",
"function",
"run",
"(",
")",
"{",
"CommonFunctions",
"::",
"checkForExtensions",
"(",
"array",
"(",
"'xsl'",
")",
")",
";",
"$",
"xmlfile",
"=",
"$",
"this",
"->",
"getXMLString",
"(",
")",
";",
"$",
"xslfile",
"=",
"\"phpsysinfo.xslt\"",
";",
... | generate the static page
@return void | [
"generate",
"the",
"static",
"page"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/output/class.WebpageXSLT.inc.php#L41-L53 |
phpsysinfo/phpsysinfo | includes/os/class.DragonFly.inc.php | DragonFly._uptime | private function _uptime()
{
$a = $this->grabkey('kern.boottime');
preg_match("/sec = ([0-9]+)/", $a, $buf);
$this->sys->setUptime(time() - $buf[1]);
} | php | private function _uptime()
{
$a = $this->grabkey('kern.boottime');
preg_match("/sec = ([0-9]+)/", $a, $buf);
$this->sys->setUptime(time() - $buf[1]);
} | [
"private",
"function",
"_uptime",
"(",
")",
"{",
"$",
"a",
"=",
"$",
"this",
"->",
"grabkey",
"(",
"'kern.boottime'",
")",
";",
"preg_match",
"(",
"\"/sec = ([0-9]+)/\"",
",",
"$",
"a",
",",
"$",
"buf",
")",
";",
"$",
"this",
"->",
"sys",
"->",
"setU... | UpTime
time the system is running
@return void | [
"UpTime",
"time",
"the",
"system",
"is",
"running"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.DragonFly.inc.php#L48-L53 |
phpsysinfo/phpsysinfo | includes/os/class.DragonFly.inc.php | DragonFly._network | private function _network()
{
CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_b);
CommonFunctions::executeProgram('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_n);
$lines_b = preg_split("/\n/", $ne... | php | private function _network()
{
CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_b);
CommonFunctions::executeProgram('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_n);
$lines_b = preg_split("/\n/", $ne... | [
"private",
"function",
"_network",
"(",
")",
"{",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'netstat'",
",",
"'-nbdi | cut -c1-25,44- | grep \"^[a-z]*[0-9][ \\t].*Link\"'",
",",
"$",
"netstat_b",
")",
";",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'netstat'"... | get network information
@return void | [
"get",
"network",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.DragonFly.inc.php#L60-L79 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions._findProgram | private static function _findProgram($strProgram)
{
$path_parts = pathinfo($strProgram);
if (empty($path_parts['basename'])) {
return null;
}
$arrPath = array();
if (empty($path_parts['dirname']) || ($path_parts['dirname'] == '.')) {
if ((PSI_OS == 'W... | php | private static function _findProgram($strProgram)
{
$path_parts = pathinfo($strProgram);
if (empty($path_parts['basename'])) {
return null;
}
$arrPath = array();
if (empty($path_parts['dirname']) || ($path_parts['dirname'] == '.')) {
if ((PSI_OS == 'W... | [
"private",
"static",
"function",
"_findProgram",
"(",
"$",
"strProgram",
")",
"{",
"$",
"path_parts",
"=",
"pathinfo",
"(",
"$",
"strProgram",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"path_parts",
"[",
"'basename'",
"]",
")",
")",
"{",
"return",
"null",
... | Find a system program, do also path checking when not running on WINNT
on WINNT we simply return the name with the exe extension to the program name
@param string $strProgram name of the program
@return string|null complete path and name of the program | [
"Find",
"a",
"system",
"program",
"do",
"also",
"path",
"checking",
"when",
"not",
"running",
"on",
"WINNT",
"on",
"WINNT",
"we",
"simply",
"return",
"the",
"name",
"with",
"the",
"exe",
"extension",
"to",
"the",
"program",
"name"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L61-L147 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.executeProgram | public static function executeProgram($strProgramname, $strArgs, &$strBuffer, $booErrorRep = true, $timeout = PSI_EXEC_TIMEOUT_INT)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$out = self::_parse_log_f... | php | public static function executeProgram($strProgramname, $strArgs, &$strBuffer, $booErrorRep = true, $timeout = PSI_EXEC_TIMEOUT_INT)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$out = self::_parse_log_f... | [
"public",
"static",
"function",
"executeProgram",
"(",
"$",
"strProgramname",
",",
"$",
"strArgs",
",",
"&",
"$",
"strBuffer",
",",
"$",
"booErrorRep",
"=",
"true",
",",
"$",
"timeout",
"=",
"PSI_EXEC_TIMEOUT_INT",
")",
"{",
"if",
"(",
"defined",
"(",
"'PS... | Execute a system program. return a trim()'d result.
does very crude pipe checking. you need ' | ' for it to work
ie $program = CommonFunctions::executeProgram('netstat', '-anp | grep LIST');
NOT $program = CommonFunctions::executeProgram('netstat', '-anp|grep LIST');
@param string $strProgramname name of the program... | [
"Execute",
"a",
"system",
"program",
".",
"return",
"a",
"trim",
"()",
"d",
"result",
".",
"does",
"very",
"crude",
"pipe",
"checking",
".",
"you",
"need",
"|",
"for",
"it",
"to",
"work",
"ie",
"$program",
"=",
"CommonFunctions",
"::",
"executeProgram",
... | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L163-L288 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.rolv | public static function rolv($similarFileName, $match = "//", $replace = "")
{
$filename = preg_replace($match, $replace, $similarFileName);
if (CommonFunctions::fileexists($filename) && CommonFunctions::rfts($filename, $buf, 1, 4096, false) && (($buf=trim($buf)) != "")) {
return $buf;
... | php | public static function rolv($similarFileName, $match = "//", $replace = "")
{
$filename = preg_replace($match, $replace, $similarFileName);
if (CommonFunctions::fileexists($filename) && CommonFunctions::rfts($filename, $buf, 1, 4096, false) && (($buf=trim($buf)) != "")) {
return $buf;
... | [
"public",
"static",
"function",
"rolv",
"(",
"$",
"similarFileName",
",",
"$",
"match",
"=",
"\"//\"",
",",
"$",
"replace",
"=",
"\"\"",
")",
"{",
"$",
"filename",
"=",
"preg_replace",
"(",
"$",
"match",
",",
"$",
"replace",
",",
"$",
"similarFileName",
... | read a one-line value from a file with a similar name
@return value if successfull or null if not | [
"read",
"a",
"one",
"-",
"line",
"value",
"from",
"a",
"file",
"with",
"a",
"similar",
"name"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L295-L303 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.readenv | public static function readenv($strElem, &$strBuffer)
{
$strBuffer = '';
if (PSI_OS == 'WINNT') { //case insensitive
if (isset($_SERVER)) {
foreach ($_SERVER as $index=>$value) {
if (is_string($value) && (trim($value) !== '') && (strtolower($index) ===... | php | public static function readenv($strElem, &$strBuffer)
{
$strBuffer = '';
if (PSI_OS == 'WINNT') { //case insensitive
if (isset($_SERVER)) {
foreach ($_SERVER as $index=>$value) {
if (is_string($value) && (trim($value) !== '') && (strtolower($index) ===... | [
"public",
"static",
"function",
"readenv",
"(",
"$",
"strElem",
",",
"&",
"$",
"strBuffer",
")",
"{",
"$",
"strBuffer",
"=",
"''",
";",
"if",
"(",
"PSI_OS",
"==",
"'WINNT'",
")",
"{",
"//case insensitive",
"if",
"(",
"isset",
"(",
"$",
"_SERVER",
")",
... | read data from array $_SERVER
@param string $strElem element of array
@param string &$strBuffer output of the command
@return string | [
"read",
"data",
"from",
"array",
"$_SERVER"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L313-L335 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.rfts | public static function rfts($strFileName, &$strRet, $intLines = 0, $intBytes = 4096, $booErrorRep = true)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$out = self::_parse_log_file("Reading: ".$strFileNa... | php | public static function rfts($strFileName, &$strRet, $intLines = 0, $intBytes = 4096, $booErrorRep = true)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$out = self::_parse_log_file("Reading: ".$strFileNa... | [
"public",
"static",
"function",
"rfts",
"(",
"$",
"strFileName",
",",
"&",
"$",
"strRet",
",",
"$",
"intLines",
"=",
"0",
",",
"$",
"intBytes",
"=",
"4096",
",",
"$",
"booErrorRep",
"=",
"true",
")",
"{",
"if",
"(",
"defined",
"(",
"'PSI_LOG'",
")",
... | read a file and return the content as a string
@param string $strFileName name of the file which should be read
@param string &$strRet content of the file (reference)
@param integer $intLines control how many lines should be read
@param integer $intBytes control how many bytes of each line should be read
@... | [
"read",
"a",
"file",
"and",
"return",
"the",
"content",
"as",
"a",
"string"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L348-L411 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.fileexists | public static function fileexists($strFileName)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$log_file = substr(PSI_LOG, 1);
if (file_exists($log_file)
&& ($contents = @file_... | php | public static function fileexists($strFileName)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$log_file = substr(PSI_LOG, 1);
if (file_exists($log_file)
&& ($contents = @file_... | [
"public",
"static",
"function",
"fileexists",
"(",
"$",
"strFileName",
")",
"{",
"if",
"(",
"defined",
"(",
"'PSI_LOG'",
")",
"&&",
"is_string",
"(",
"PSI_LOG",
")",
"&&",
"(",
"strlen",
"(",
"PSI_LOG",
")",
">",
"0",
")",
"&&",
"(",
"(",
"substr",
"... | file exists
@param string $strFileName name of the file which should be check
@return boolean command successfull or not | [
"file",
"exists"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L420-L443 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.gdc | public static function gdc($strPath, $booErrorRep = true)
{
$arrDirectoryContent = array();
$error = PSI_Error::singleton();
if (is_dir($strPath)) {
if ($handle = opendir($strPath)) {
while (($strFile = readdir($handle)) !== false) {
if ($strFi... | php | public static function gdc($strPath, $booErrorRep = true)
{
$arrDirectoryContent = array();
$error = PSI_Error::singleton();
if (is_dir($strPath)) {
if ($handle = opendir($strPath)) {
while (($strFile = readdir($handle)) !== false) {
if ($strFi... | [
"public",
"static",
"function",
"gdc",
"(",
"$",
"strPath",
",",
"$",
"booErrorRep",
"=",
"true",
")",
"{",
"$",
"arrDirectoryContent",
"=",
"array",
"(",
")",
";",
"$",
"error",
"=",
"PSI_Error",
"::",
"singleton",
"(",
")",
";",
"if",
"(",
"is_dir",
... | reads a directory and return the name of the files and directorys in it
@param string $strPath path of the directory which should be read
@param boolean $booErrorRep en- or disables the reporting of errors which should be logged
@return array content of the directory excluding . and .. | [
"reads",
"a",
"directory",
"and",
"return",
"the",
"name",
"of",
"the",
"files",
"and",
"directorys",
"in",
"it"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L453-L477 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.checkForExtensions | public static function checkForExtensions($arrExt = array())
{
if ((strcasecmp(PSI_SYSTEM_CODEPAGE, "UTF-8") == 0) || (strcasecmp(PSI_SYSTEM_CODEPAGE, "CP437") == 0))
$arrReq = array('simplexml', 'pcre', 'xml', 'dom');
elseif (PSI_OS == "WINNT")
$arrReq = array('simplexml', '... | php | public static function checkForExtensions($arrExt = array())
{
if ((strcasecmp(PSI_SYSTEM_CODEPAGE, "UTF-8") == 0) || (strcasecmp(PSI_SYSTEM_CODEPAGE, "CP437") == 0))
$arrReq = array('simplexml', 'pcre', 'xml', 'dom');
elseif (PSI_OS == "WINNT")
$arrReq = array('simplexml', '... | [
"public",
"static",
"function",
"checkForExtensions",
"(",
"$",
"arrExt",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"(",
"strcasecmp",
"(",
"PSI_SYSTEM_CODEPAGE",
",",
"\"UTF-8\"",
")",
"==",
"0",
")",
"||",
"(",
"strcasecmp",
"(",
"PSI_SYSTEM_CODEPAGE",
... | Check for needed php extensions
We need that extensions for almost everything
This function will return a hard coded
XML string (with headers) if the SimpleXML extension isn't loaded.
Then it will terminate the script.
See bug #1787137
@param array $arrExt additional extensions for which a check should run
@return v... | [
"Check",
"for",
"needed",
"php",
"extensions"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L492-L520 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions._timeoutfgets | private static function _timeoutfgets($pipes, &$out, &$err, $timeout)
{
$w = null;
$e = null;
$te = false;
if (defined("PSI_MODE_POPEN") && PSI_MODE_POPEN === true) {
$pipe2 = false;
} else {
$pipe2 = true;
}
while (!(feof($pipes[1]) &... | php | private static function _timeoutfgets($pipes, &$out, &$err, $timeout)
{
$w = null;
$e = null;
$te = false;
if (defined("PSI_MODE_POPEN") && PSI_MODE_POPEN === true) {
$pipe2 = false;
} else {
$pipe2 = true;
}
while (!(feof($pipes[1]) &... | [
"private",
"static",
"function",
"_timeoutfgets",
"(",
"$",
"pipes",
",",
"&",
"$",
"out",
",",
"&",
"$",
"err",
",",
"$",
"timeout",
")",
"{",
"$",
"w",
"=",
"null",
";",
"$",
"e",
"=",
"null",
";",
"$",
"te",
"=",
"false",
";",
"if",
"(",
"... | get the content of stdout/stderr with the option to set a timeout for reading
@param array $pipes array of file pointers for stdin, stdout, stderr (proc_open())
@param string &$out target string for the output message (reference)
@param string &$err target string for the error message (reference)
@param in... | [
"get",
"the",
"content",
"of",
"stdout",
"/",
"stderr",
"with",
"the",
"option",
"to",
"set",
"a",
"timeout",
"for",
"reading"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L532-L571 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.getWMI | public static function getWMI($wmi, $strClass, $strValue = array())
{
$arrData = array();
if ($wmi) {
$value = "";
try {
$objWEBM = $wmi->Get($strClass);
$arrProp = $objWEBM->Properties_;
$arrWEBMCol = $objWEBM->Instances_();
... | php | public static function getWMI($wmi, $strClass, $strValue = array())
{
$arrData = array();
if ($wmi) {
$value = "";
try {
$objWEBM = $wmi->Get($strClass);
$arrProp = $objWEBM->Properties_;
$arrWEBMCol = $objWEBM->Instances_();
... | [
"public",
"static",
"function",
"getWMI",
"(",
"$",
"wmi",
",",
"$",
"strClass",
",",
"$",
"strValue",
"=",
"array",
"(",
")",
")",
"{",
"$",
"arrData",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"wmi",
")",
"{",
"$",
"value",
"=",
"\"\"",
";... | function for getting a list of values in the specified context
optionally filter this list, based on the list from third parameter
@param $wmi object holds the COM object that we pull the WMI data from
@param string $strClass name of the class where the values are stored
@param array $strValue filter out only needed ... | [
"function",
"for",
"getting",
"a",
"list",
"of",
"values",
"in",
"the",
"specified",
"context",
"optionally",
"filter",
"this",
"list",
"based",
"on",
"the",
"list",
"from",
"third",
"parameter"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L583-L620 |
phpsysinfo/phpsysinfo | includes/class.CommonFunctions.inc.php | CommonFunctions.getPlugins | public static function getPlugins()
{
if (defined('PSI_PLUGINS') && is_string(PSI_PLUGINS)) {
if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
return eval(strtolower(PSI_PLUGINS));
} else {
return array(strtolower(PSI_PLUGINS));
}
} else {... | php | public static function getPlugins()
{
if (defined('PSI_PLUGINS') && is_string(PSI_PLUGINS)) {
if (preg_match(ARRAY_EXP, PSI_PLUGINS)) {
return eval(strtolower(PSI_PLUGINS));
} else {
return array(strtolower(PSI_PLUGINS));
}
} else {... | [
"public",
"static",
"function",
"getPlugins",
"(",
")",
"{",
"if",
"(",
"defined",
"(",
"'PSI_PLUGINS'",
")",
"&&",
"is_string",
"(",
"PSI_PLUGINS",
")",
")",
"{",
"if",
"(",
"preg_match",
"(",
"ARRAY_EXP",
",",
"PSI_PLUGINS",
")",
")",
"{",
"return",
"e... | get all configured plugins from phpsysinfo.ini (file must be included and processed before calling this function)
@return array | [
"get",
"all",
"configured",
"plugins",
"from",
"phpsysinfo",
".",
"ini",
"(",
"file",
"must",
"be",
"included",
"and",
"processed",
"before",
"calling",
"this",
"function",
")"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.CommonFunctions.inc.php#L627-L638 |
phpsysinfo/phpsysinfo | includes/mb/class.mbm5.inc.php | MBM5._temperature | private function _temperature()
{
for ($intPosi = 3; $intPosi < 6; $intPosi++) {
if ($this->_buf_value[$intPosi] == 0) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice(... | php | private function _temperature()
{
for ($intPosi = 3; $intPosi < 6; $intPosi++) {
if ($this->_buf_value[$intPosi] == 0) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice(... | [
"private",
"function",
"_temperature",
"(",
")",
"{",
"for",
"(",
"$",
"intPosi",
"=",
"3",
";",
"$",
"intPosi",
"<",
"6",
";",
"$",
"intPosi",
"++",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_buf_value",
"[",
"$",
"intPosi",
"]",
"==",
"0",
")",
... | get temperature information
@return void | [
"get",
"temperature",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.mbm5.inc.php#L52-L65 |
phpsysinfo/phpsysinfo | includes/mb/class.mbm5.inc.php | MBM5._fans | private function _fans()
{
for ($intPosi = 13; $intPosi < 16; $intPosi++) {
if (!isset($this->_buf_value[$intPosi])) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice();... | php | private function _fans()
{
for ($intPosi = 13; $intPosi < 16; $intPosi++) {
if (!isset($this->_buf_value[$intPosi])) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice();... | [
"private",
"function",
"_fans",
"(",
")",
"{",
"for",
"(",
"$",
"intPosi",
"=",
"13",
";",
"$",
"intPosi",
"<",
"16",
";",
"$",
"intPosi",
"++",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_buf_value",
"[",
"$",
"intPosi",
"]",
... | get fan information
@return void | [
"get",
"fan",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.mbm5.inc.php#L72-L85 |
phpsysinfo/phpsysinfo | includes/mb/class.mbm5.inc.php | MBM5._voltage | private function _voltage()
{
for ($intPosi = 6; $intPosi < 13; $intPosi++) {
if ($this->_buf_value[$intPosi] == 0) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice();
... | php | private function _voltage()
{
for ($intPosi = 6; $intPosi < 13; $intPosi++) {
if ($this->_buf_value[$intPosi] == 0) {
continue;
}
preg_match("/([0-9\.])*/", str_replace(",", ".", $this->_buf_value[$intPosi]), $hits);
$dev = new SensorDevice();
... | [
"private",
"function",
"_voltage",
"(",
")",
"{",
"for",
"(",
"$",
"intPosi",
"=",
"6",
";",
"$",
"intPosi",
"<",
"13",
";",
"$",
"intPosi",
"++",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_buf_value",
"[",
"$",
"intPosi",
"]",
"==",
"0",
")",
"... | get voltage information
@return void | [
"get",
"voltage",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.mbm5.inc.php#L92-L104 |
phpsysinfo/phpsysinfo | plugins/raid/class.raid.inc.php | Raid.execute | public function execute()
{
if (count($this->_filecontent)>0) {
foreach ($this->prog_items as $item) if (isset($this->_filecontent[$item])) {
if ($item !== 'idrac') {
if (!is_null($buffer = $this->_filecontent[$item]) && (($buffer = trim($buffer)) != "")) {
... | php | public function execute()
{
if (count($this->_filecontent)>0) {
foreach ($this->prog_items as $item) if (isset($this->_filecontent[$item])) {
if ($item !== 'idrac') {
if (!is_null($buffer = $this->_filecontent[$item]) && (($buffer = trim($buffer)) != "")) {
... | [
"public",
"function",
"execute",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_filecontent",
")",
">",
"0",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"prog_items",
"as",
"$",
"item",
")",
"if",
"(",
"isset",
"(",
"$",
"this",
"-... | doing all tasks to get the required informations that the plugin needs
result is stored in an internal array<br>the array is build like a tree,
so that it is possible to get only a specific process with the childs
@return void | [
"doing",
"all",
"tasks",
"to",
"get",
"the",
"required",
"informations",
"that",
"the",
"plugin",
"needs",
"result",
"is",
"stored",
"in",
"an",
"internal",
"array<br",
">",
"the",
"array",
"is",
"build",
"like",
"a",
"tree",
"so",
"that",
"it",
"is",
"p... | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/plugins/raid/class.raid.inc.php#L1290-L1326 |
phpsysinfo/phpsysinfo | plugins/raid/class.raid.inc.php | Raid.xml | public function xml()
{
if (empty($this->_result)) {
return $this->xml->getSimpleXmlElement();
}
$hideRaids = array();
if (defined('PSI_PLUGIN_RAID_HIDE_DEVICES') && is_string(PSI_PLUGIN_RAID_HIDE_DEVICES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_RAID_HIDE_DEVI... | php | public function xml()
{
if (empty($this->_result)) {
return $this->xml->getSimpleXmlElement();
}
$hideRaids = array();
if (defined('PSI_PLUGIN_RAID_HIDE_DEVICES') && is_string(PSI_PLUGIN_RAID_HIDE_DEVICES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_RAID_HIDE_DEVI... | [
"public",
"function",
"xml",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"_result",
")",
")",
"{",
"return",
"$",
"this",
"->",
"xml",
"->",
"getSimpleXmlElement",
"(",
")",
";",
"}",
"$",
"hideRaids",
"=",
"array",
"(",
")",
";",
... | generates the XML content for the plugin
@return SimpleXMLElement entire XML content for the plugin | [
"generates",
"the",
"XML",
"content",
"for",
"the",
"plugin"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/plugins/raid/class.raid.inc.php#L1333-L1402 |
phpsysinfo/phpsysinfo | includes/ups/class.pmset.inc.php | Pmset._info | private function _info()
{
if (empty($this->_output)) {
return;
}
$model = array();
$percCharge = array();
$lines = explode(PHP_EOL, implode($this->_output));
if (count($lines)>1) {
$model = explode('FW:', $lines[1]);
if (strpos($mo... | php | private function _info()
{
if (empty($this->_output)) {
return;
}
$model = array();
$percCharge = array();
$lines = explode(PHP_EOL, implode($this->_output));
if (count($lines)>1) {
$model = explode('FW:', $lines[1]);
if (strpos($mo... | [
"private",
"function",
"_info",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"_output",
")",
")",
"{",
"return",
";",
"}",
"$",
"model",
"=",
"array",
"(",
")",
";",
"$",
"percCharge",
"=",
"array",
"(",
")",
";",
"$",
"lines",
"=... | parse the input and store data in resultset for xml generation
@return void | [
"parse",
"the",
"input",
"and",
"store",
"data",
"in",
"resultset",
"for",
"xml",
"generation"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/ups/class.pmset.inc.php#L52-L83 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._hostname | private function _hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('hostname', '', $ret)) {
$this->sys->setHostname($ret);
}
... | php | private function _hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('hostname', '', $ret)) {
$this->sys->setHostname($ret);
}
... | [
"private",
"function",
"_hostname",
"(",
")",
"{",
"if",
"(",
"PSI_USE_VHOST",
"===",
"true",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"readenv",
"(",
"'SERVER_NAME'",
",",
"$",
"hnm",
")",
")",
"$",
"this",
"->",
"sys",
"->",
"setHostname",
"(",
... | Virtual Host Name
@return void | [
"Virtual",
"Host",
"Name"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L34-L43 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._cpuinfo | private function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
$dev = new CpuDevice();
$details = preg_split("/\n/", $processor, -1, PREG_S... | php | private function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
$dev = new CpuDevice();
$details = preg_split("/\n/", $processor, -1, PREG_S... | [
"private",
"function",
"_cpuinfo",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/cpuinfo'",
",",
"$",
"bufr",
")",
")",
"{",
"$",
"processors",
"=",
"preg_split",
"(",
"'/\\s?\\n\\s?\\n/'",
",",
"trim",
"(",
"$",
"bufr",
")",
")... | CPU information
All of the tags here are highly architecture dependant
@return void | [
"CPU",
"information",
"All",
"of",
"the",
"tags",
"here",
"are",
"highly",
"architecture",
"dependant"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L96-L134 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._pci | private function _pci()
{
if (CommonFunctions::rfts('/proc/pci', $bufr)) {
$device = false;
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/^\s*Bus\s/', $buf)) {
$device = true;
... | php | private function _pci()
{
if (CommonFunctions::rfts('/proc/pci', $bufr)) {
$device = false;
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/^\s*Bus\s/', $buf)) {
$device = true;
... | [
"private",
"function",
"_pci",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/pci'",
",",
"$",
"bufr",
")",
")",
"{",
"$",
"device",
"=",
"false",
";",
"$",
"bufe",
"=",
"preg_split",
"(",
"\"/\\n/\"",
",",
"$",
"bufr",
",",
... | PCI devices
@return void | [
"PCI",
"devices"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L141-L167 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._ide | private function _ide()
{
$bufd = CommonFunctions::gdc('/proc/ide', false);
foreach ($bufd as $file) {
if (preg_match('/^hd/', $file)) {
$dev = new HWDevice();
$dev->setName(trim($file));
if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DE... | php | private function _ide()
{
$bufd = CommonFunctions::gdc('/proc/ide', false);
foreach ($bufd as $file) {
if (preg_match('/^hd/', $file)) {
$dev = new HWDevice();
$dev->setName(trim($file));
if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DE... | [
"private",
"function",
"_ide",
"(",
")",
"{",
"$",
"bufd",
"=",
"CommonFunctions",
"::",
"gdc",
"(",
"'/proc/ide'",
",",
"false",
")",
";",
"foreach",
"(",
"$",
"bufd",
"as",
"$",
"file",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^hd/'",
",",
"$",
... | IDE devices
@return void | [
"IDE",
"devices"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L174-L191 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._scsi | private function _scsi()
{
$get_type = false;
if (CommonFunctions::rfts('/proc/scsi/scsi', $bufr, 0, 4096, PSI_DEBUG)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i... | php | private function _scsi()
{
$get_type = false;
if (CommonFunctions::rfts('/proc/scsi/scsi', $bufr, 0, 4096, PSI_DEBUG)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/Vendor: (.*) Model: (.*) Rev: (.*)/i... | [
"private",
"function",
"_scsi",
"(",
")",
"{",
"$",
"get_type",
"=",
"false",
";",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/scsi/scsi'",
",",
"$",
"bufr",
",",
"0",
",",
"4096",
",",
"PSI_DEBUG",
")",
")",
"{",
"$",
"bufe",
"=",
"preg... | SCSI devices
@return void | [
"SCSI",
"devices"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L198-L217 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._usb | private function _usb()
{
if (CommonFunctions::rfts('/proc/bus/usb/devices', $bufr, 0, 4096, false)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$devnum = -1;
$results = array();
foreach ($bufe as $buf) {
if (preg_match('/^T/'... | php | private function _usb()
{
if (CommonFunctions::rfts('/proc/bus/usb/devices', $bufr, 0, 4096, false)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$devnum = -1;
$results = array();
foreach ($bufe as $buf) {
if (preg_match('/^T/'... | [
"private",
"function",
"_usb",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/bus/usb/devices'",
",",
"$",
"bufr",
",",
"0",
",",
"4096",
",",
"false",
")",
")",
"{",
"$",
"bufe",
"=",
"preg_split",
"(",
"\"/\\n/\"",
",",
"$",
... | USB devices
@return void | [
"USB",
"devices"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L224-L248 |
phpsysinfo/phpsysinfo | includes/os/class.HPUX.inc.php | HPUX._memory | private function _memory()
{
if (CommonFunctions::rfts('/proc/meminfo', $bufr)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/Mem:\s+(.*)$/', $buf, $ar_buf)) {
$ar_buf = preg_split('/\s+/',... | php | private function _memory()
{
if (CommonFunctions::rfts('/proc/meminfo', $bufr)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
if (preg_match('/Mem:\s+(.*)$/', $buf, $ar_buf)) {
$ar_buf = preg_split('/\s+/',... | [
"private",
"function",
"_memory",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/meminfo'",
",",
"$",
"bufr",
")",
")",
"{",
"$",
"bufe",
"=",
"preg_split",
"(",
"\"/\\n/\"",
",",
"$",
"bufr",
",",
"-",
"1",
",",
"PREG_SPLIT_NO... | Physical memory information and Swap Space information
@return void | [
"Physical",
"memory",
"information",
"and",
"Swap",
"Space",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.HPUX.inc.php#L280-L311 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._kstat | private function _kstat($key)
{
if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {
list($key, $value) = preg_split("/\t/", $m, 2);
return trim($value);
} else {
return '';
}
} | php | private function _kstat($key)
{
if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {
list($key, $value) = preg_split("/\t/", $m, 2);
return trim($value);
} else {
return '';
}
} | [
"private",
"function",
"_kstat",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'kstat'",
",",
"'-p d '",
".",
"$",
"key",
",",
"$",
"m",
",",
"PSI_DEBUG",
")",
"&&",
"(",
"$",
"m",
"!==",
"\"\"",
")",
")",
"... | Extract kernel values via kstat() interface
@param string $key key for kstat programm
@return string | [
"Extract",
"kernel",
"values",
"via",
"kstat",
"()",
"interface"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L36-L45 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._hostname | private function _hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {
$ip = gethostbyname($result);
... | php | private function _hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {
$ip = gethostbyname($result);
... | [
"private",
"function",
"_hostname",
"(",
")",
"{",
"if",
"(",
"PSI_USE_VHOST",
"===",
"true",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"readenv",
"(",
"'SERVER_NAME'",
",",
"$",
"hnm",
")",
")",
"$",
"this",
"->",
"sys",
"->",
"setHostname",
"(",
... | Virtual Host Name
@return void | [
"Virtual",
"Host",
"Name"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L52-L64 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._kernel | private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
$os.=' '.$version;
}
if (CommonFunctions::executePr... | php | private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
$os.=' '.$version;
}
if (CommonFunctions::executePr... | [
"private",
"function",
"_kernel",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'uname'",
",",
"'-s'",
",",
"$",
"os",
",",
"PSI_DEBUG",
")",
"&&",
"(",
"$",
"os",
"!=",
"\"\"",
")",
")",
"{",
"if",
"(",
"CommonFunctions",
... | Kernel Version
@return void | [
"Kernel",
"Version"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L71-L85 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._loadavg | private function _loadavg()
{
$load1 = $this->_kstat('unix:0:system_misc:avenrun_1min');
$load5 = $this->_kstat('unix:0:system_misc:avenrun_5min');
$load15 = $this->_kstat('unix:0:system_misc:avenrun_15min');
$this->sys->setLoad(round($load1 / 256, 2).' '.round($load5 / 256, 2).' '.r... | php | private function _loadavg()
{
$load1 = $this->_kstat('unix:0:system_misc:avenrun_1min');
$load5 = $this->_kstat('unix:0:system_misc:avenrun_5min');
$load15 = $this->_kstat('unix:0:system_misc:avenrun_15min');
$this->sys->setLoad(round($load1 / 256, 2).' '.round($load5 / 256, 2).' '.r... | [
"private",
"function",
"_loadavg",
"(",
")",
"{",
"$",
"load1",
"=",
"$",
"this",
"->",
"_kstat",
"(",
"'unix:0:system_misc:avenrun_1min'",
")",
";",
"$",
"load5",
"=",
"$",
"this",
"->",
"_kstat",
"(",
"'unix:0:system_misc:avenrun_5min'",
")",
";",
"$",
"lo... | Processor Load
optionally create a loadbar
@return void | [
"Processor",
"Load",
"optionally",
"create",
"a",
"loadbar"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L104-L110 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._cpuinfo | private function _cpuinfo()
{
if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
$cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
for ($cpu=0; $cpu < $cpuc; $cpu++) {
$dev = new CpuDevice();
... | php | private function _cpuinfo()
{
if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
$cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
for ($cpu=0; $cpu < $cpuc; $cpu++) {
$dev = new CpuDevice();
... | [
"private",
"function",
"_cpuinfo",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'kstat'",
",",
"'-p d cpu_info:*:cpu_info*:core_id'",
",",
"$",
"m",
",",
"PSI_DEBUG",
")",
"&&",
"(",
"$",
"m",
"!==",
"\"\"",
")",
")",
"{",
"$"... | CPU information
@return void | [
"CPU",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L117-L141 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._network | private function _network()
{
if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
$lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
$ar_buf = preg_split("/\s+/", $line);
... | php | private function _network()
{
if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
$lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
$ar_buf = preg_split("/\s+/", $line);
... | [
"private",
"function",
"_network",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'netstat'",
",",
"'-ni | awk \\'(NF ==10){print;}\\''",
",",
"$",
"netstat",
",",
"PSI_DEBUG",
")",
")",
"{",
"$",
"lines",
"=",
"preg_split",
"(",
"\... | Network devices
@return void | [
"Network",
"devices"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L148-L204 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._memory | private function _memory()
{
$pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
$this->sys->setMemTotal($this->_kstat('unix:0:system_pages:pagestotal') * $pagesize);
$this->sys->setMemUsed($this->_kstat('unix:0:system_pages:pageslocked') * $pagesize);
$this->sys->setMemFree($th... | php | private function _memory()
{
$pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
$this->sys->setMemTotal($this->_kstat('unix:0:system_pages:pagestotal') * $pagesize);
$this->sys->setMemUsed($this->_kstat('unix:0:system_pages:pageslocked') * $pagesize);
$this->sys->setMemFree($th... | [
"private",
"function",
"_memory",
"(",
")",
"{",
"$",
"pagesize",
"=",
"$",
"this",
"->",
"_kstat",
"(",
"'unix:0:seg_cache:slab_size'",
")",
";",
"$",
"this",
"->",
"sys",
"->",
"setMemTotal",
"(",
"$",
"this",
"->",
"_kstat",
"(",
"'unix:0:system_pages:pag... | Physical memory information and Swap Space information
@return void | [
"Physical",
"memory",
"information",
"and",
"Swap",
"Space",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L211-L225 |
phpsysinfo/phpsysinfo | includes/os/class.SunOS.inc.php | SunOS._filesystems | private function _filesystems()
{
if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
$df = preg_replace('/\n\s/m', ' ', $df);
$mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
foreach ($mounts as $mount) {
$ar_buf = preg_split('/\... | php | private function _filesystems()
{
if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
$df = preg_replace('/\n\s/m', ' ', $df);
$mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
foreach ($mounts as $mount) {
$ar_buf = preg_split('/\... | [
"private",
"function",
"_filesystems",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'df'",
",",
"'-k'",
",",
"$",
"df",
",",
"PSI_DEBUG",
")",
")",
"{",
"$",
"df",
"=",
"preg_replace",
"(",
"'/\\n\\s/m'",
",",
"' '",
",",
... | filesystem information
@return void | [
"filesystem",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.SunOS.inc.php#L232-L270 |
phpsysinfo/phpsysinfo | includes/os/class.OS.inc.php | OS._users | protected function _users()
{
if (CommonFunctions::executeProgram('who', '', $strBuf, PSI_DEBUG)) {
if (strlen($strBuf) > 0) {
$lines = preg_split('/\n/', $strBuf);
$this->sys->setUsers(count($lines));
}
} elseif (CommonFunctions::executeProgra... | php | protected function _users()
{
if (CommonFunctions::executeProgram('who', '', $strBuf, PSI_DEBUG)) {
if (strlen($strBuf) > 0) {
$lines = preg_split('/\n/', $strBuf);
$this->sys->setUsers(count($lines));
}
} elseif (CommonFunctions::executeProgra... | [
"protected",
"function",
"_users",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'who'",
",",
"''",
",",
"$",
"strBuf",
",",
"PSI_DEBUG",
")",
")",
"{",
"if",
"(",
"strlen",
"(",
"$",
"strBuf",
")",
">",
"0",
")",
"{",
... | Number of Users
@return void | [
"Number",
"of",
"Users"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.OS.inc.php#L98-L126 |
phpsysinfo/phpsysinfo | includes/os/class.OS.inc.php | OS._ip | protected function _ip()
{
if (PSI_USE_VHOST === true) {
if ((CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result)) //is server address defined
&& !strstr($result, '.') && strstr($result, ':')) { //is IPv6, quick version of preg_match(... | php | protected function _ip()
{
if (PSI_USE_VHOST === true) {
if ((CommonFunctions::readenv('SERVER_ADDR', $result) || CommonFunctions::readenv('LOCAL_ADDR', $result)) //is server address defined
&& !strstr($result, '.') && strstr($result, ':')) { //is IPv6, quick version of preg_match(... | [
"protected",
"function",
"_ip",
"(",
")",
"{",
"if",
"(",
"PSI_USE_VHOST",
"===",
"true",
")",
"{",
"if",
"(",
"(",
"CommonFunctions",
"::",
"readenv",
"(",
"'SERVER_ADDR'",
",",
"$",
"result",
")",
"||",
"CommonFunctions",
"::",
"readenv",
"(",
"'LOCAL_AD... | IP of the Host
@return void | [
"IP",
"of",
"the",
"Host"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.OS.inc.php#L133-L154 |
phpsysinfo/phpsysinfo | includes/os/class.OS.inc.php | OS.getSys | final public function getSys()
{
$this->build();
if (!$this->blockname || $this->blockname==='vitals') {
$this->_ip();
}
return $this->sys;
} | php | final public function getSys()
{
$this->build();
if (!$this->blockname || $this->blockname==='vitals') {
$this->_ip();
}
return $this->sys;
} | [
"final",
"public",
"function",
"getSys",
"(",
")",
"{",
"$",
"this",
"->",
"build",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"blockname",
"||",
"$",
"this",
"->",
"blockname",
"===",
"'vitals'",
")",
"{",
"$",
"this",
"->",
"_ip",
"(",
"... | get the filled or unfilled (with default values) System object
@see PSI_Interface_OS::getSys()
@return System | [
"get",
"the",
"filled",
"or",
"unfilled",
"(",
"with",
"default",
"values",
")",
"System",
"object"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.OS.inc.php#L163-L171 |
phpsysinfo/phpsysinfo | includes/class.Parser.inc.php | Parser.lspci | public static function lspci($debug = PSI_DEBUG)
{
$arrResults = array();
if (CommonFunctions::executeProgram("lspci", "", $strBuf, $debug)) {
$arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
foreach ($arrLines as $strLine) {
$arrParams = preg... | php | public static function lspci($debug = PSI_DEBUG)
{
$arrResults = array();
if (CommonFunctions::executeProgram("lspci", "", $strBuf, $debug)) {
$arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
foreach ($arrLines as $strLine) {
$arrParams = preg... | [
"public",
"static",
"function",
"lspci",
"(",
"$",
"debug",
"=",
"PSI_DEBUG",
")",
"{",
"$",
"arrResults",
"=",
"array",
"(",
")",
";",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"\"lspci\"",
",",
"\"\"",
",",
"$",
"strBuf",
",",
"$",
"... | parsing the output of lspci command
@param bool $debug
@return array | [
"parsing",
"the",
"output",
"of",
"lspci",
"command"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.Parser.inc.php#L34-L53 |
phpsysinfo/phpsysinfo | includes/class.Parser.inc.php | Parser.df | public static function df($df_param = "", $get_inodes = true)
{
$arrResult = array();
if (CommonFunctions::executeProgram('mount', '', $mount, PSI_DEBUG)) {
$mount = preg_split("/\n/", $mount, -1, PREG_SPLIT_NO_EMPTY);
foreach ($mount as $mount_line) {
if (pre... | php | public static function df($df_param = "", $get_inodes = true)
{
$arrResult = array();
if (CommonFunctions::executeProgram('mount', '', $mount, PSI_DEBUG)) {
$mount = preg_split("/\n/", $mount, -1, PREG_SPLIT_NO_EMPTY);
foreach ($mount as $mount_line) {
if (pre... | [
"public",
"static",
"function",
"df",
"(",
"$",
"df_param",
"=",
"\"\"",
",",
"$",
"get_inodes",
"=",
"true",
")",
"{",
"$",
"arrResult",
"=",
"array",
"(",
")",
";",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'mount'",
",",
"''",
",",... | parsing the output of df command
@param string $df_param additional parameter for df command
@param bool $get_inodes
@return array | [
"parsing",
"the",
"output",
"of",
"df",
"command"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/class.Parser.inc.php#L63-L274 |
phpsysinfo/phpsysinfo | includes/ups/class.snmpups.inc.php | SNMPups._info | private function _info()
{
if (empty($this->_output)) {
return;
}
foreach ($this->_output as $result) {
$dev = new UPSDevice();
$status = "";
$status2 = "";
$status3 = "";
$dev->setMode("SNMP");
if (preg_matc... | php | private function _info()
{
if (empty($this->_output)) {
return;
}
foreach ($this->_output as $result) {
$dev = new UPSDevice();
$status = "";
$status2 = "";
$status3 = "";
$dev->setMode("SNMP");
if (preg_matc... | [
"private",
"function",
"_info",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"_output",
")",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"_output",
"as",
"$",
"result",
")",
"{",
"$",
"dev",
"=",
"new",
"UPSDevi... | parse the input and store data in resultset for xml generation
@return Void | [
"parse",
"the",
"input",
"and",
"store",
"data",
"in",
"resultset",
"for",
"xml",
"generation"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/ups/class.snmpups.inc.php#L147-L273 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | JavaScriptPacker._pack | private function _pack($script)
{
for ($i = 0; isset($this->_parsers[$i]); $i++) {
$script = call_user_func(array(&$this, $this->_parsers[$i]), $script);
}
return $script;
} | php | private function _pack($script)
{
for ($i = 0; isset($this->_parsers[$i]); $i++) {
$script = call_user_func(array(&$this, $this->_parsers[$i]), $script);
}
return $script;
} | [
"private",
"function",
"_pack",
"(",
"$",
"script",
")",
"{",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"isset",
"(",
"$",
"this",
"->",
"_parsers",
"[",
"$",
"i",
"]",
")",
";",
"$",
"i",
"++",
")",
"{",
"$",
"script",
"=",
"call_user_func",
"(",
... | apply all parsing routines | [
"apply",
"all",
"parsing",
"routines"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L111-L118 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | JavaScriptPacker._basicCompression | private function _basicCompression($script)
{
$parser = new ParseMaster();
// make safe
$parser->escapeChar = '\\';
// protect strings
$parser->add('/\'[^\'\\n\\r]*\'/', self::IGNORE);
$parser->add('/"[^"\\n\\r]*"/', self::IGNORE);
// remove comments
$... | php | private function _basicCompression($script)
{
$parser = new ParseMaster();
// make safe
$parser->escapeChar = '\\';
// protect strings
$parser->add('/\'[^\'\\n\\r]*\'/', self::IGNORE);
$parser->add('/"[^"\\n\\r]*"/', self::IGNORE);
// remove comments
$... | [
"private",
"function",
"_basicCompression",
"(",
"$",
"script",
")",
"{",
"$",
"parser",
"=",
"new",
"ParseMaster",
"(",
")",
";",
"// make safe",
"$",
"parser",
"->",
"escapeChar",
"=",
"'\\\\'",
";",
"// protect strings",
"$",
"parser",
"->",
"add",
"(",
... | zero encoding - just removal of white space and comments | [
"zero",
"encoding",
"-",
"just",
"removal",
"of",
"white",
"space",
"and",
"comments"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L128-L156 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | JavaScriptPacker._bootStrap | private function _bootStrap($packed, $keywords)
{
$ENCODE = $this->_safeRegExp('$encode\\($count\\)');
// $packed: the packed script
$packed = "'" . $this->_escape($packed) . "'";
// $ascii: base for encoding
$ascii = min(count($keywords['sorted']), $this->_encoding);
... | php | private function _bootStrap($packed, $keywords)
{
$ENCODE = $this->_safeRegExp('$encode\\($count\\)');
// $packed: the packed script
$packed = "'" . $this->_escape($packed) . "'";
// $ascii: base for encoding
$ascii = min(count($keywords['sorted']), $this->_encoding);
... | [
"private",
"function",
"_bootStrap",
"(",
"$",
"packed",
",",
"$",
"keywords",
")",
"{",
"$",
"ENCODE",
"=",
"$",
"this",
"->",
"_safeRegExp",
"(",
"'$encode\\\\($count\\\\)'",
")",
";",
"// $packed: the packed script",
"$",
"packed",
"=",
"\"'\"",
".",
"$",
... | build the boot function used for loading and decoding | [
"build",
"the",
"boot",
"function",
"used",
"for",
"loading",
"and",
"decoding"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L294-L372 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | JavaScriptPacker._encode62 | private function _encode62($charCode)
{
$res = '';
if ($charCode >= $this->_encoding) {
$res = $this->_encode62((int) ($charCode / $this->_encoding));
}
$charCode = $charCode % $this->_encoding;
if ($charCode > 35)
return $res . chr($charCode + 29);
... | php | private function _encode62($charCode)
{
$res = '';
if ($charCode >= $this->_encoding) {
$res = $this->_encode62((int) ($charCode / $this->_encoding));
}
$charCode = $charCode % $this->_encoding;
if ($charCode > 35)
return $res . chr($charCode + 29);
... | [
"private",
"function",
"_encode62",
"(",
"$",
"charCode",
")",
"{",
"$",
"res",
"=",
"''",
";",
"if",
"(",
"$",
"charCode",
">=",
"$",
"this",
"->",
"_encoding",
")",
"{",
"$",
"res",
"=",
"$",
"this",
"->",
"_encode62",
"(",
"(",
"int",
")",
"("... | characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ | [
"characters",
":",
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L407-L419 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | ParseMaster._escape | private function _escape($string, $escapeChar)
{
if ($escapeChar) {
$this->buffer = $escapeChar;
return preg_replace_callback(
'/\\' . $escapeChar . '(.)' .'/',
array(&$this, '_escapeBis'),
$string
);
} else {
... | php | private function _escape($string, $escapeChar)
{
if ($escapeChar) {
$this->buffer = $escapeChar;
return preg_replace_callback(
'/\\' . $escapeChar . '(.)' .'/',
array(&$this, '_escapeBis'),
$string
);
} else {
... | [
"private",
"function",
"_escape",
"(",
"$",
"string",
",",
"$",
"escapeChar",
")",
"{",
"if",
"(",
"$",
"escapeChar",
")",
"{",
"$",
"this",
"->",
"buffer",
"=",
"$",
"escapeChar",
";",
"return",
"preg_replace_callback",
"(",
"'/\\\\'",
".",
"$",
"escape... | encode escaped characters | [
"encode",
"escaped",
"characters"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L731-L745 |
phpsysinfo/phpsysinfo | includes/js/class.JavaScriptPacker.inc.php | ParseMaster._unescape | private function _unescape($string, $escapeChar)
{
if ($escapeChar) {
$regexp = '/'.'\\'.$escapeChar.'/';
$this->buffer = array('escapeChar'=> $escapeChar, 'i' => 0);
return preg_replace_callback(
$regexp,
array(&$this, '_unescapeBis'),
... | php | private function _unescape($string, $escapeChar)
{
if ($escapeChar) {
$regexp = '/'.'\\'.$escapeChar.'/';
$this->buffer = array('escapeChar'=> $escapeChar, 'i' => 0);
return preg_replace_callback(
$regexp,
array(&$this, '_unescapeBis'),
... | [
"private",
"function",
"_unescape",
"(",
"$",
"string",
",",
"$",
"escapeChar",
")",
"{",
"if",
"(",
"$",
"escapeChar",
")",
"{",
"$",
"regexp",
"=",
"'/'",
".",
"'\\\\'",
".",
"$",
"escapeChar",
".",
"'/'",
";",
"$",
"this",
"->",
"buffer",
"=",
"... | decode escaped characters | [
"decode",
"escaped",
"characters"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/js/class.JavaScriptPacker.inc.php#L754-L769 |
phpsysinfo/phpsysinfo | includes/os/class.NetBSD.inc.php | NetBSD._network | private function _network()
{
CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_b);
CommonFunctions::executeProgram('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_n);
$lines_b = preg_split("/\n/", $ne... | php | private function _network()
{
CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_b);
CommonFunctions::executeProgram('netstat', '-ndi | cut -c1-25,44- | grep "^[a-z]*[0-9][ \t].*Link"', $netstat_n);
$lines_b = preg_split("/\n/", $ne... | [
"private",
"function",
"_network",
"(",
")",
"{",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'netstat'",
",",
"'-nbdi | cut -c1-25,44- | grep \"^[a-z]*[0-9][ \\t].*Link\"'",
",",
"$",
"netstat_b",
")",
";",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'netstat'"... | get network information
@return void | [
"get",
"network",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.NetBSD.inc.php#L60-L105 |
phpsysinfo/phpsysinfo | includes/os/class.NetBSD.inc.php | NetBSD.ide | protected function ide()
{
foreach ($this->readdmesg() as $line) {
if (preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9]+ (.*): <(.*)>/', $line, $ar_buf)
|| preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9]+ /', $line, $ar_buf)) {
$dev = new HWDevice();... | php | protected function ide()
{
foreach ($this->readdmesg() as $line) {
if (preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9]+ (.*): <(.*)>/', $line, $ar_buf)
|| preg_match('/^(.*) at (pciide|wdc|atabus|atapibus)[0-9]+ /', $line, $ar_buf)) {
$dev = new HWDevice();... | [
"protected",
"function",
"ide",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"readdmesg",
"(",
")",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^(.*) at (pciide|wdc|atabus|atapibus)[0-9]+ (.*): <(.*)>/'",
",",
"$",
"line",
",",
"$",
"a... | IDE information
@return void | [
"IDE",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.NetBSD.inc.php#L112-L148 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.readdmesg | protected function readdmesg()
{
if (count($this->_dmesg) === 0) {
if (PSI_OS != "Darwin") {
if (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot'... | php | protected function readdmesg()
{
if (count($this->_dmesg) === 0) {
if (PSI_OS != "Darwin") {
if (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot'... | [
"protected",
"function",
"readdmesg",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_dmesg",
")",
"===",
"0",
")",
"{",
"if",
"(",
"PSI_OS",
"!=",
"\"Darwin\"",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/var/run/dmesg.b... | read /var/run/dmesg.boot, but only if we haven't already
@return array | [
"read",
"/",
"var",
"/",
"run",
"/",
"dmesg",
".",
"boot",
"but",
"only",
"if",
"we",
"haven",
"t",
"already"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L175-L187 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.hostname | protected function hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('hostname', '', $buf, PSI_DEBUG)) {
$this->sys->setHostname($buf);
... | php | protected function hostname()
{
if (PSI_USE_VHOST === true) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('hostname', '', $buf, PSI_DEBUG)) {
$this->sys->setHostname($buf);
... | [
"protected",
"function",
"hostname",
"(",
")",
"{",
"if",
"(",
"PSI_USE_VHOST",
"===",
"true",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"readenv",
"(",
"'SERVER_NAME'",
",",
"$",
"hnm",
")",
")",
"$",
"this",
"->",
"sys",
"->",
"setHostname",
"(",
... | Virtual Host Name
@return void | [
"Virtual",
"Host",
"Name"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L211-L220 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.kernel | protected function kernel()
{
$s = $this->grabkey('kern.version');
$a = preg_split('/:/', $s);
if (isset($a[2])) {
$this->sys->setKernel($a[0].$a[1].':'.$a[2]);
} else {
$this->sys->setKernel($s);
}
} | php | protected function kernel()
{
$s = $this->grabkey('kern.version');
$a = preg_split('/:/', $s);
if (isset($a[2])) {
$this->sys->setKernel($a[0].$a[1].':'.$a[2]);
} else {
$this->sys->setKernel($s);
}
} | [
"protected",
"function",
"kernel",
"(",
")",
"{",
"$",
"s",
"=",
"$",
"this",
"->",
"grabkey",
"(",
"'kern.version'",
")",
";",
"$",
"a",
"=",
"preg_split",
"(",
"'/:/'",
",",
"$",
"s",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"a",
"[",
"2",
"]"... | Kernel Version
@return void | [
"Kernel",
"Version"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L227-L236 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.loadavg | protected function loadavg()
{
$s = $this->grabkey('vm.loadavg');
$s = preg_replace('/{ /', '', $s);
$s = preg_replace('/ }/', '', $s);
$this->sys->setLoad($s);
if (PSI_LOAD_BAR && (PSI_OS != "Darwin")) {
if ($fd = $this->grabkey('kern.cp_time')) {
... | php | protected function loadavg()
{
$s = $this->grabkey('vm.loadavg');
$s = preg_replace('/{ /', '', $s);
$s = preg_replace('/ }/', '', $s);
$this->sys->setLoad($s);
if (PSI_LOAD_BAR && (PSI_OS != "Darwin")) {
if ($fd = $this->grabkey('kern.cp_time')) {
... | [
"protected",
"function",
"loadavg",
"(",
")",
"{",
"$",
"s",
"=",
"$",
"this",
"->",
"grabkey",
"(",
"'vm.loadavg'",
")",
";",
"$",
"s",
"=",
"preg_replace",
"(",
"'/{ /'",
",",
"''",
",",
"$",
"s",
")",
";",
"$",
"s",
"=",
"preg_replace",
"(",
"... | Processor Load
optionally create a loadbar
@return void | [
"Processor",
"Load",
"optionally",
"create",
"a",
"loadbar"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L244-L267 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.cpuinfo | protected function cpuinfo()
{
$dev = new CpuDevice();
if (PSI_OS == "NetBSD") {
if ($model = $this->grabkey('machdep.cpu_brand')) {
$dev->setModel($model);
}
if ($cpuspeed = $this->grabkey('machdep.tsc_freq')) {
$dev->setCpuSpeed(ro... | php | protected function cpuinfo()
{
$dev = new CpuDevice();
if (PSI_OS == "NetBSD") {
if ($model = $this->grabkey('machdep.cpu_brand')) {
$dev->setModel($model);
}
if ($cpuspeed = $this->grabkey('machdep.tsc_freq')) {
$dev->setCpuSpeed(ro... | [
"protected",
"function",
"cpuinfo",
"(",
")",
"{",
"$",
"dev",
"=",
"new",
"CpuDevice",
"(",
")",
";",
"if",
"(",
"PSI_OS",
"==",
"\"NetBSD\"",
")",
"{",
"if",
"(",
"$",
"model",
"=",
"$",
"this",
"->",
"grabkey",
"(",
"'machdep.cpu_brand'",
")",
")"... | CPU information
@return void | [
"CPU",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L274-L321 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.scsi | protected function scsi()
{
foreach ($this->readdmesg() as $line) {
if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_buf[1].": ".trim($ar_buf[2]));
$this->sys->setScsiDevices($dev);
} elsei... | php | protected function scsi()
{
foreach ($this->readdmesg() as $line) {
if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_buf[1].": ".trim($ar_buf[2]));
$this->sys->setScsiDevices($dev);
} elsei... | [
"protected",
"function",
"scsi",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"readdmesg",
"(",
")",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"$",
"this",
"->",
"_SCSIRegExp1",
",",
"$",
"line",
",",
"$",
"ar_buf",
")",
")",
... | SCSI devices
get the scsi device information out of dmesg
@return void | [
"SCSI",
"devices",
"get",
"the",
"scsi",
"device",
"information",
"out",
"of",
"dmesg"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L329-L393 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.pciconf | protected function pciconf()
{
$arrResults = array();
$intS = 0;
if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, PSI_DEBUG)) {
$arrTemp = array();
$arrBlocks = preg_split("/\n\S/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
foreach ($arrBlocks as $s... | php | protected function pciconf()
{
$arrResults = array();
$intS = 0;
if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, PSI_DEBUG)) {
$arrTemp = array();
$arrBlocks = preg_split("/\n\S/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
foreach ($arrBlocks as $s... | [
"protected",
"function",
"pciconf",
"(",
")",
"{",
"$",
"arrResults",
"=",
"array",
"(",
")",
";",
"$",
"intS",
"=",
"0",
";",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"\"pciconf\"",
",",
"\"-lv\"",
",",
"$",
"strBuf",
",",
"PSI_DEBUG",... | parsing the output of pciconf command
@return Array | [
"parsing",
"the",
"output",
"of",
"pciconf",
"command"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L400-L439 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.pci | protected function pci()
{
if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
foreach ($this->readdmesg() as $line) {
if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_bu... | php | protected function pci()
{
if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
foreach ($this->readdmesg() as $line) {
if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_bu... | [
"protected",
"function",
"pci",
"(",
")",
"{",
"if",
"(",
"(",
"!",
"$",
"results",
"=",
"Parser",
"::",
"lspci",
"(",
"false",
")",
")",
"&&",
"(",
"!",
"$",
"results",
"=",
"$",
"this",
"->",
"pciconf",
"(",
")",
")",
")",
"{",
"foreach",
"("... | PCI devices
get the pci device information out of dmesg
@return void | [
"PCI",
"devices",
"get",
"the",
"pci",
"device",
"information",
"out",
"of",
"dmesg"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L447-L465 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.ide | protected function ide()
{
foreach ($this->readdmesg() as $line) {
if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_buf[1].": ".trim($ar_buf[3]));
if (defined('PSI_SHOW_DEVICES_INF... | php | protected function ide()
{
foreach ($this->readdmesg() as $line) {
if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
$dev = new HWDevice();
$dev->setName($ar_buf[1].": ".trim($ar_buf[3]));
if (defined('PSI_SHOW_DEVICES_INF... | [
"protected",
"function",
"ide",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"readdmesg",
"(",
")",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/'",
",",
"$",
"line",
",",
"$",
"ar_buf",
")",
")"... | IDE devices
get the ide device information out of dmesg
@return void | [
"IDE",
"devices",
"get",
"the",
"ide",
"device",
"information",
"out",
"of",
"dmesg"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L473-L540 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.memory | protected function memory()
{
if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
// vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
// I should probably add some version checking here, but for now
// we only support fbsd 4.4
$pagesize = 1024;
... | php | protected function memory()
{
if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
// vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
// I should probably add some version checking here, but for now
// we only support fbsd 4.4
$pagesize = 1024;
... | [
"protected",
"function",
"memory",
"(",
")",
"{",
"if",
"(",
"PSI_OS",
"==",
"'FreeBSD'",
"||",
"PSI_OS",
"==",
"'OpenBSD'",
")",
"{",
"// vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize",
"// I should probably add some version checking here, but for now",
"// we o... | Physical memory information and Swap Space information
@return void | [
"Physical",
"memory",
"information",
"and",
"Swap",
"Space",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L547-L585 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.usb | protected function usb()
{
foreach ($this->readdmesg() as $line) {
// if (preg_match('/^(ugen[0-9\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) {
// $dev->setName($ar_buf[1].": ".$ar_buf[2]);
if (preg_match('/^(u[a-z]+[0-9]+): <([^,]*)(.*)> on (usbus[0-9]+)/', $line, $... | php | protected function usb()
{
foreach ($this->readdmesg() as $line) {
// if (preg_match('/^(ugen[0-9\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) {
// $dev->setName($ar_buf[1].": ".$ar_buf[2]);
if (preg_match('/^(u[a-z]+[0-9]+): <([^,]*)(.*)> on (usbus[0-9]+)/', $line, $... | [
"protected",
"function",
"usb",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"readdmesg",
"(",
")",
"as",
"$",
"line",
")",
"{",
"// if (preg_match('/^(ugen[0-9\\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) {",
"// $dev->setName($ar_buf[1].\":... | USB devices
get the ide device information out of dmesg
@return void | [
"USB",
"devices",
"get",
"the",
"ide",
"device",
"information",
"out",
"of",
"dmesg"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L593-L604 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.filesystems | protected function filesystems()
{
$arrResult = Parser::df();
foreach ($arrResult as $dev) {
$this->sys->setDiskDevices($dev);
}
} | php | protected function filesystems()
{
$arrResult = Parser::df();
foreach ($arrResult as $dev) {
$this->sys->setDiskDevices($dev);
}
} | [
"protected",
"function",
"filesystems",
"(",
")",
"{",
"$",
"arrResult",
"=",
"Parser",
"::",
"df",
"(",
")",
";",
"foreach",
"(",
"$",
"arrResult",
"as",
"$",
"dev",
")",
"{",
"$",
"this",
"->",
"sys",
"->",
"setDiskDevices",
"(",
"$",
"dev",
")",
... | filesystem information
@return void | [
"filesystem",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L611-L617 |
phpsysinfo/phpsysinfo | includes/os/class.BSDCommon.inc.php | BSDCommon.build | public function build()
{
if (!$this->blockname || $this->blockname==='vitals') {
$this->distro();
$this->hostname();
$this->kernel();
$this->_users();
$this->loadavg();
}
if (!$this->blockname || $this->blockname==='hardware') {
... | php | public function build()
{
if (!$this->blockname || $this->blockname==='vitals') {
$this->distro();
$this->hostname();
$this->kernel();
$this->_users();
$this->loadavg();
}
if (!$this->blockname || $this->blockname==='hardware') {
... | [
"public",
"function",
"build",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"blockname",
"||",
"$",
"this",
"->",
"blockname",
"===",
"'vitals'",
")",
"{",
"$",
"this",
"->",
"distro",
"(",
")",
";",
"$",
"this",
"->",
"hostname",
"(",
")",
... | get the information
@see PSI_Interface_OS::build()
@return Void | [
"get",
"the",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.BSDCommon.inc.php#L638-L660 |
phpsysinfo/phpsysinfo | plugins/hyperv/class.hyperv.inc.php | HyperV.execute | public function execute()
{
switch (strtolower(PSI_PLUGIN_HYPERV_ACCESS)) {
case 'command':
if (PSI_OS == 'WINNT') {
try {
$objLocator = new COM('WbemScripting.SWbemLocator');
$wmic = $objLocator->ConnectServer('', 'root\CIMv2');
... | php | public function execute()
{
switch (strtolower(PSI_PLUGIN_HYPERV_ACCESS)) {
case 'command':
if (PSI_OS == 'WINNT') {
try {
$objLocator = new COM('WbemScripting.SWbemLocator');
$wmic = $objLocator->ConnectServer('', 'root\CIMv2');
... | [
"public",
"function",
"execute",
"(",
")",
"{",
"switch",
"(",
"strtolower",
"(",
"PSI_PLUGIN_HYPERV_ACCESS",
")",
")",
"{",
"case",
"'command'",
":",
"if",
"(",
"PSI_OS",
"==",
"'WINNT'",
")",
"{",
"try",
"{",
"$",
"objLocator",
"=",
"new",
"COM",
"(",
... | doing all tasks to get the required informations that the plugin needs
result is stored in an internal array<br>the array is build like a tree,
so that it is possible to get only a specific process with the childs
@return void | [
"doing",
"all",
"tasks",
"to",
"get",
"the",
"required",
"informations",
"that",
"the",
"plugin",
"needs",
"result",
"is",
"stored",
"in",
"an",
"internal",
"array<br",
">",
"the",
"array",
"is",
"build",
"like",
"a",
"tree",
"so",
"that",
"it",
"is",
"p... | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/plugins/hyperv/class.hyperv.inc.php#L39-L85 |
phpsysinfo/phpsysinfo | plugins/hyperv/class.hyperv.inc.php | HyperV.xml | public function xml()
{
foreach ($this->_filecontent as $machine) {
$xmlmach = $this->xml->addChild("Machine");
$xmlmach->addAttribute("Name", $machine[0]);
$xmlmach->addAttribute("State", $machine[1]);
}
return $this->xml->getSimpleXmlElement();
} | php | public function xml()
{
foreach ($this->_filecontent as $machine) {
$xmlmach = $this->xml->addChild("Machine");
$xmlmach->addAttribute("Name", $machine[0]);
$xmlmach->addAttribute("State", $machine[1]);
}
return $this->xml->getSimpleXmlElement();
} | [
"public",
"function",
"xml",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_filecontent",
"as",
"$",
"machine",
")",
"{",
"$",
"xmlmach",
"=",
"$",
"this",
"->",
"xml",
"->",
"addChild",
"(",
"\"Machine\"",
")",
";",
"$",
"xmlmach",
"->",
"addAt... | generates the XML content for the plugin
@return SimpleXMLElement entire XML content for the plugin | [
"generates",
"the",
"XML",
"content",
"for",
"the",
"plugin"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/plugins/hyperv/class.hyperv.inc.php#L92-L101 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._temperature | private function _temperature()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Temperature" && $buffer[11] != "N/A" && $buffer[4] == "C") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | php | private function _temperature()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Temperature" && $buffer[11] != "N/A" && $buffer[4] == "C") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | [
"private",
"function",
"_temperature",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"2"... | get temperature information
@return void | [
"get",
"temperature",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L51-L64 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._voltage | private function _voltage()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Voltage" && $buffer[11] != "N/A" && $buffer[4] == "V") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | php | private function _voltage()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Voltage" && $buffer[11] != "N/A" && $buffer[4] == "V") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | [
"private",
"function",
"_voltage",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"2",
... | get voltage information
@return void | [
"get",
"voltage",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L71-L85 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._fans | private function _fans()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Fan" && $buffer[11] != "N/A" && $buffer[4] == "RPM") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
$de... | php | private function _fans()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Fan" && $buffer[11] != "N/A" && $buffer[4] == "RPM") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
$de... | [
"private",
"function",
"_fans",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"2",
"]"... | get fan information
@return void | [
"get",
"fan",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L92-L109 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._power | private function _power()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "W") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | php | private function _power()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "W") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | [
"private",
"function",
"_power",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"2",
"]... | get power information
@return void | [
"get",
"power",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L116-L129 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._current | private function _current()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "A") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | php | private function _current()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "A") {
$dev = new SensorDevice();
$dev->setName($buffer[1]);
... | [
"private",
"function",
"_current",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"2",
... | get current information
@return void | [
"get",
"current",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L136-L150 |
phpsysinfo/phpsysinfo | includes/mb/class.freeipmi.inc.php | FreeIPMI._other | private function _other()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[4] == "N/A"
&& $buffer[2] != "OEM Reserved" && $buffer[11] != "N/A") {
$dev = new SensorDevice();
$dev->setName($buff... | php | private function _other()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[4] == "N/A"
&& $buffer[2] != "OEM Reserved" && $buffer[11] != "N/A") {
$dev = new SensorDevice();
$dev->setName($buff... | [
"private",
"function",
"_other",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"$",
"buffer",
"=",
"preg_split",
"(",
"\"/\\s*\\|\\s*/\"",
",",
"$",
"line",
")",
";",
"if",
"(",
"$",
"buffer",
"[",
"4",
"]... | get other information
@return void | [
"get",
"other",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.freeipmi.inc.php#L157-L169 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix.readdmesg | protected function readdmesg()
{
if (count($this->_dmesg) === 0) {
if (CommonFunctions::rfts('/var/log/messages', $buf)) {
$blocks = preg_replace("/\s(kernel: MINIX \d+\.\d+\.\d+\.)/", '<BLOCK>$1', $buf);
$parts = preg_split("/<BLOCK>/", $blocks, -1, PREG_... | php | protected function readdmesg()
{
if (count($this->_dmesg) === 0) {
if (CommonFunctions::rfts('/var/log/messages', $buf)) {
$blocks = preg_replace("/\s(kernel: MINIX \d+\.\d+\.\d+\.)/", '<BLOCK>$1', $buf);
$parts = preg_split("/<BLOCK>/", $blocks, -1, PREG_... | [
"protected",
"function",
"readdmesg",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_dmesg",
")",
"===",
"0",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/var/log/messages'",
",",
"$",
"buf",
")",
")",
"{",
"$",
"blocks... | read /var/log/messages, but only if we haven't already
@return array | [
"read",
"/",
"var",
"/",
"log",
"/",
"messages",
"but",
"only",
"if",
"we",
"haven",
"t",
"already"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L41-L52 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._cpuinfo | protected function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
$_n = ""; $_f = ""; $_m = ""; $_s = "";
$dev = new CpuDevi... | php | protected function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
$_n = ""; $_f = ""; $_m = ""; $_s = "";
$dev = new CpuDevi... | [
"protected",
"function",
"_cpuinfo",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/cpuinfo'",
",",
"$",
"bufr",
",",
"0",
",",
"4096",
",",
"false",
")",
")",
"{",
"$",
"processors",
"=",
"preg_split",
"(",
"'/\\s?\\n\\s?\\n/'",
... | get the cpu information
@return void | [
"get",
"the",
"cpu",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L59-L112 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._pci | protected function _pci()
{
if (CommonFunctions::rfts('/proc/pci', $strBuf, 0, 4096, false)) {
$arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
$arrResults = array();
foreach ($arrLines as $strLine) {
$arrParams = preg_split('/\s+/', trim($... | php | protected function _pci()
{
if (CommonFunctions::rfts('/proc/pci', $strBuf, 0, 4096, false)) {
$arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
$arrResults = array();
foreach ($arrLines as $strLine) {
$arrParams = preg_split('/\s+/', trim($... | [
"protected",
"function",
"_pci",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/pci'",
",",
"$",
"strBuf",
",",
"0",
",",
"4096",
",",
"false",
")",
")",
"{",
"$",
"arrLines",
"=",
"preg_split",
"(",
"\"/\\n/\"",
",",
"$",
"s... | PCI devices
get the pci device information out of dmesg
@return void | [
"PCI",
"devices",
"get",
"the",
"pci",
"device",
"information",
"out",
"of",
"dmesg"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L120-L146 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._kernel | private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-rvm', $ret)) {
foreach ($this->readdmesg() as $line) {
if (preg_match('/kernel: MINIX (\d+\.\d+\.\d+)\. \((.+)\)/', $line, $ar_buf)) {
$branch = $ar_buf[2];
break;
... | php | private function _kernel()
{
if (CommonFunctions::executeProgram('uname', '-rvm', $ret)) {
foreach ($this->readdmesg() as $line) {
if (preg_match('/kernel: MINIX (\d+\.\d+\.\d+)\. \((.+)\)/', $line, $ar_buf)) {
$branch = $ar_buf[2];
break;
... | [
"private",
"function",
"_kernel",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'uname'",
",",
"'-rvm'",
",",
"$",
"ret",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"readdmesg",
"(",
")",
"as",
"$",
"line",
")",
"{... | Minix Version
@return void | [
"Minix",
"Version"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L153-L167 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._uptime | private function _uptime()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
$min = $ar_buf[3];
$hours = $ar_buf[2];
$days = $ar_buf[1];
$this->sys->s... | php | private function _uptime()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/up (\d+) day[s]?,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
$min = $ar_buf[3];
$hours = $ar_buf[2];
$days = $ar_buf[1];
$this->sys->s... | [
"private",
"function",
"_uptime",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'uptime'",
",",
"''",
",",
"$",
"buf",
")",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"/up (\\d+) day[s]?,\\s*(\\d+):(\\d+),/\"",
",",
"$",
"buf",
",... | UpTime
time the system is running
@return void | [
"UpTime",
"time",
"the",
"system",
"is",
"running"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L190-L204 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._loadavg | private function _loadavg()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/load averages: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
$this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
}
}
} | php | private function _loadavg()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/load averages: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
$this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
}
}
} | [
"private",
"function",
"_loadavg",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'uptime'",
",",
"''",
",",
"$",
"buf",
")",
")",
"{",
"if",
"(",
"preg_match",
"(",
"\"/load averages: (.*), (.*), (.*)$/\"",
",",
"$",
"buf",
",",
... | Processor Load
optionally create a loadbar
@return void | [
"Processor",
"Load",
"optionally",
"create",
"a",
"loadbar"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L212-L219 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._memory | private function _memory()
{
if (CommonFunctions::rfts('/proc/meminfo', $bufr, 1, 4096, false)) {
$ar_buf = preg_split('/\s+/', trim($bufr));
if (count($ar_buf) >= 5) {
$this->sys->setMemTotal($ar_buf[0]*$ar_buf[1]);
$this->sys->setMemFree($ar_... | php | private function _memory()
{
if (CommonFunctions::rfts('/proc/meminfo', $bufr, 1, 4096, false)) {
$ar_buf = preg_split('/\s+/', trim($bufr));
if (count($ar_buf) >= 5) {
$this->sys->setMemTotal($ar_buf[0]*$ar_buf[1]);
$this->sys->setMemFree($ar_... | [
"private",
"function",
"_memory",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"rfts",
"(",
"'/proc/meminfo'",
",",
"$",
"bufr",
",",
"1",
",",
"4096",
",",
"false",
")",
")",
"{",
"$",
"ar_buf",
"=",
"preg_split",
"(",
"'/\\s+/'",
",",
"trim",
... | Physical memory information and Swap Space information
@return void | [
"Physical",
"memory",
"information",
"and",
"Swap",
"Space",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L246-L257 |
phpsysinfo/phpsysinfo | includes/os/class.Minix.inc.php | Minix._network | private function _network()
{
if (CommonFunctions::executeProgram('ifconfig', '-a', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
if (preg_match("/^([^\s:]+):\saddress\s(\S+)\snetmask/", $line, $ar_buf)) ... | php | private function _network()
{
if (CommonFunctions::executeProgram('ifconfig', '-a', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
if (preg_match("/^([^\s:]+):\saddress\s(\S+)\snetmask/", $line, $ar_buf)) ... | [
"private",
"function",
"_network",
"(",
")",
"{",
"if",
"(",
"CommonFunctions",
"::",
"executeProgram",
"(",
"'ifconfig'",
",",
"'-a'",
",",
"$",
"bufr",
",",
"PSI_DEBUG",
")",
")",
"{",
"$",
"lines",
"=",
"preg_split",
"(",
"\"/\\n/\"",
",",
"$",
"bufr"... | network information
@return void | [
"network",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/os/class.Minix.inc.php#L277-L292 |
phpsysinfo/phpsysinfo | includes/mb/class.hwsensors.inc.php | HWSensors._temperature | private function _temperature()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+temp,\s+([0-9\.]+)\s+degC.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue... | php | private function _temperature()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+temp,\s+([0-9\.]+)\s+degC.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue... | [
"private",
"function",
"_temperature",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^hw\\.sensors\\.[0-9]+=[^\\s,]+,\\s+([^,]+),\\s+temp,\\s+([0-9\\.]+)\\s+degC.*$/'",
",",
"$",
"line",
","... | get temperature information
@return void | [
"get",
"temperature",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.hwsensors.inc.php#L41-L66 |
phpsysinfo/phpsysinfo | includes/mb/class.hwsensors.inc.php | HWSensors._fans | private function _fans()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+fanrpm,\s+([0-9\.]+)\s+RPM.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue($ar_b... | php | private function _fans()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+fanrpm,\s+([0-9\.]+)\s+RPM.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue($ar_b... | [
"private",
"function",
"_fans",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^hw\\.sensors\\.[0-9]+=[^\\s,]+,\\s+([^,]+),\\s+fanrpm,\\s+([0-9\\.]+)\\s+RPM.*$/'",
",",
"$",
"line",
",",
"$... | get fan information
@return void | [
"get",
"fan",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.hwsensors.inc.php#L73-L98 |
phpsysinfo/phpsysinfo | includes/mb/class.hwsensors.inc.php | HWSensors._voltage | private function _voltage()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+volts_dc,\s+([0-9\.]+)\s+V.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue($a... | php | private function _voltage()
{
foreach ($this->_lines as $line) {
if (preg_match('/^hw\.sensors\.[0-9]+=[^\s,]+,\s+([^,]+),\s+volts_dc,\s+([0-9\.]+)\s+V.*$/', $line, $ar_buf)) {
$dev = new SensorDevice();
$dev->setName($ar_buf[1]);
$dev->setValue($a... | [
"private",
"function",
"_voltage",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_lines",
"as",
"$",
"line",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/^hw\\.sensors\\.[0-9]+=[^\\s,]+,\\s+([^,]+),\\s+volts_dc,\\s+([0-9\\.]+)\\s+V.*$/'",
",",
"$",
"line",
",",
... | get voltage information
@return void | [
"get",
"voltage",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.hwsensors.inc.php#L105-L130 |
phpsysinfo/phpsysinfo | includes/mb/class.healthd.inc.php | Healthd._temperature | private function _temperature()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('temp1');
$dev1->setValue($this->_values[1]);
// $dev1->setMax(70);
$this->mbinfo->setMbTemp($dev1);
$dev2 = new SensorDevice... | php | private function _temperature()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('temp1');
$dev1->setValue($this->_values[1]);
// $dev1->setMax(70);
$this->mbinfo->setMbTemp($dev1);
$dev2 = new SensorDevice... | [
"private",
"function",
"_temperature",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_values",
")",
"==",
"14",
")",
"{",
"$",
"dev1",
"=",
"new",
"SensorDevice",
"(",
")",
";",
"$",
"dev1",
"->",
"setName",
"(",
"'temp1'",
")",
";",
... | get temperature information
@return void | [
"get",
"temperature",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.healthd.inc.php#L58-L77 |
phpsysinfo/phpsysinfo | includes/mb/class.healthd.inc.php | Healthd._fans | private function _fans()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('fan1');
$dev1->setValue($this->_values[4]);
// $dev1->setMin(3000);
$this->mbinfo->setMbFan($dev1);
$dev2 = new SensorDevice();
... | php | private function _fans()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('fan1');
$dev1->setValue($this->_values[4]);
// $dev1->setMin(3000);
$this->mbinfo->setMbFan($dev1);
$dev2 = new SensorDevice();
... | [
"private",
"function",
"_fans",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_values",
")",
"==",
"14",
")",
"{",
"$",
"dev1",
"=",
"new",
"SensorDevice",
"(",
")",
";",
"$",
"dev1",
"->",
"setName",
"(",
"'fan1'",
")",
";",
"$",
... | get fan information
@return void | [
"get",
"fan",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.healthd.inc.php#L84-L103 |
phpsysinfo/phpsysinfo | includes/mb/class.healthd.inc.php | Healthd._voltage | private function _voltage()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('Vcore1');
$dev1->setValue($this->_values[7]);
$this->mbinfo->setMbVolt($dev1);
$dev2 = new SensorDevice();
$dev2->setName('Vcor... | php | private function _voltage()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('Vcore1');
$dev1->setValue($this->_values[7]);
$this->mbinfo->setMbVolt($dev1);
$dev2 = new SensorDevice();
$dev2->setName('Vcor... | [
"private",
"function",
"_voltage",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"_values",
")",
"==",
"14",
")",
"{",
"$",
"dev1",
"=",
"new",
"SensorDevice",
"(",
")",
";",
"$",
"dev1",
"->",
"setName",
"(",
"'Vcore1'",
")",
";",
"... | get voltage information
@return void | [
"get",
"voltage",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.healthd.inc.php#L110-L142 |
phpsysinfo/phpsysinfo | includes/mb/class.ipmitool.inc.php | IPMItool._temperature | private function _temperature()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Temperature'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Temperature')))
... | php | private function _temperature()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Temperature'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Temperature')))
... | [
"private",
"function",
"_temperature",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_buf",
"as",
"$",
"sensor",
")",
"{",
"if",
"(",
"(",
"(",
"isset",
"(",
"$",
"sensor",
"[",
"'Sensor Type (Threshold)'",
"]",
")",
"&&",
"(",
"$",
"sensor",
"[... | get temperature information
@return void | [
"get",
"temperature",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.ipmitool.inc.php#L145-L164 |
phpsysinfo/phpsysinfo | includes/mb/class.ipmitool.inc.php | IPMItool._fans | private function _fans()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Fan'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Fan')))
&& isset($senso... | php | private function _fans()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Fan'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Fan')))
&& isset($senso... | [
"private",
"function",
"_fans",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_buf",
"as",
"$",
"sensor",
")",
"{",
"if",
"(",
"(",
"(",
"isset",
"(",
"$",
"sensor",
"[",
"'Sensor Type (Threshold)'",
"]",
")",
"&&",
"(",
"$",
"sensor",
"[",
"'... | get fan information
@return void | [
"get",
"fan",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.ipmitool.inc.php#L200-L222 |
phpsysinfo/phpsysinfo | includes/mb/class.ipmitool.inc.php | IPMItool._power | private function _power()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Current'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Current')))
&& iss... | php | private function _power()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Current'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Current')))
&& iss... | [
"private",
"function",
"_power",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"_buf",
"as",
"$",
"sensor",
")",
"{",
"if",
"(",
"(",
"(",
"isset",
"(",
"$",
"sensor",
"[",
"'Sensor Type (Threshold)'",
"]",
")",
"&&",
"(",
"$",
"sensor",
"[",
"... | get power information
@return void | [
"get",
"power",
"information"
] | train | https://github.com/phpsysinfo/phpsysinfo/blob/0f8d250045c7f5b5f8e721ae195fcfdf73e4eeba/includes/mb/class.ipmitool.inc.php#L229-L248 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.