Bandwidth testing stuff

feature/node-rewrite
Sven Slootweg 13 years ago
parent 0c7f76400c
commit f2c92c3ac9

@ -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();
break;
case "sBandwidthUsed":
return $this->GetBandwidthUsed();
break;
default:
return null;
break;
}
}
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!");
?>

Loading…
Cancel
Save