<?php
// ¸Þ¸ð¸® »ç¿ë·® ±¸Çϱâ
$host = "www.*****.com";
$oid = ".1.3.6.1.4.1.2021.4.11.0";
$timeout = 200000;
// enterprises.ucdavis.memory.memTotalFree.0
$memTotalFree = @snmpget($host, "public", $oid, $timeout);
if ($memTotalFree === false) {
memTotalFree = "Error";
} else {
$memTotalFree = $memTotalFree . "K";
}
id = ".1.3.6.1.4.1.2021.4.5.0";
// enterprises.ucdavis.memory.memTotalReal.0
$memTotalReal = @snmpget($host, "public", $oid, $timeout);
if ($memTotalReal === false) {
$memTotalReal = "Error";
} else {
$memTotalReal = $memTotalReal . "K";
}
echo "¸Þ¸ð¸® Å©±â : " . $memTotalReal;
echo "¸Þ¸ð¸® free : " . $memTotalFree;
?>
|