@ -43,6 +43,25 @@ class Container extends CPHPDatabaseRecordClass
)
);
public function __get($name)
{
switch($name)
case "sRamUsed":
return $this->GetRamUsed();
break;
case "sDiskUsed":
return $this->GetDiskUsed();
case "sBandwidthUsed":
return $this->GetBandwidthUsed();
default:
return null;
}
public function Deploy()
$sGuaranteedRamPages = $this->sGuaranteedRam * 256;
@ -15,6 +15,12 @@ elseif($_GET['action'] == "stop")
$sContainer->Stop();
elseif($_GET['action'] == "bw")
$result = $sContainer->sNode->ssh->RunCommand("vzctl exec {$sContainer->sInternalId} cat /proc/net/dev", false);
$values = split_whitespace($result->stdout);
pretty_dump($values[1], $values[9]);
echo("Done!");
?>