Ejemplo n.º 1
0
function workerInfo($ip)
{
    $rvs = array();
    $j = rpc($ip, 4028, 'gpucount', '');
    if (!array_key_exists("GPUS", $j)) {
        return "error";
    }
    $cnt = $j["GPUS"][0]["Count"];
    for ($i = 0; $i < $cnt; $i++) {
        $lj = rpc($ip, 4028, 'gpu', $i);
        if (!array_key_exists("GPU", $lj)) {
            return "error";
        }
        array_push($rvs, $lj['GPU'][0]);
    }
    return $rvs;
}
Ejemplo n.º 2
0
function clearPlots($plots)
{
    global $objects;
    if (!count($plots)) {
        return;
    }
    print "clearing " . count($plots) . ": ";
    rpc(array_map("req_clearplot", $plots));
    print " done\n";
}