function FLUX_RQS()
{
    $MAIN = array();
    $xdata = array();
    $ydata = array();
    $q = new mysql_squid_builder();
    if (!$q->TABLE_EXISTS("dashboard_size_day")) {
        DUMP_HOUR();
        return;
    }
    $sql = "SELECT SUM(RQS) as RQS,TIME FROM dashboard_size_day GROUP BY TIME ORDER BY TIME ASC";
    echo "FLUX_RQS:: dashboard_size_day ****************** {$sql} **********************\n";
    $results = $q->QUERY_SQL($sql);
    events("{$sql} -> " . mysql_num_rows($results) . " items");
    if (!$q->ok) {
        events($q->mysql_error);
    }
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $time = strtotime($ligne["TIME"]);
        $min = date("l H:i", $time);
        echo "FLUX_RQS: {$min} = {$ligne["RQS"]}\n";
        $xdata[] = $min;
        $ydata[] = $ligne["RQS"];
    }
    $MAIN["xdata"] = $xdata;
    $MAIN["ydata"] = $ydata;
    @file_put_contents("{$GLOBALS["BASEDIR"]}/FLUX_RQS", serialize($MAIN));
    if (count($xdata) < 2) {
        @unlink("{$GLOBALS["BASEDIR"]}/FLUX_RQS");
        FLUX_RQS_POSTGRES();
    }
    // -----------------------------------------------------------------------------------------------------
    DUMP_HOUR();
}
예제 #2
0
    exit;
}
if ($argv[1] == "--backup-size") {
    backup_size();
    exit;
}
if ($argv[1] == "--members-graph") {
    $GLOBALS["OUTPUT"] = true;
    exit;
}
if ($argv[1] == "--clean") {
    squidhour_clean();
    exit;
}
if ($argv[1] == "--dump-hour") {
    DUMP_HOUR();
    exit;
}
if ($argv[1] == "--dump-users") {
    FULL_USERS_DAY();
    exit;
}
if ($argv[1] == "--cache-avg") {
    CACHES_AVG();
    exit;
}
parse();
function build_progress($text, $pourc)
{
    $cachefile = "/usr/share/artica-postfix/ressources/logs/admin.refresh.progress";
    echo "{$pourc}% {$text}\n";