sendGraphite("assoc.ess." . $ess, $no);
    }
    /**
     * Radio info
     */
    // channel info
    $chan = getChannelPerRadio($radios);
    foreach ($chan as $radio => $ch) {
        sendGraphite("radio." . $radio . ".channel", $ch);
    }
    // util
    $util = getUtilPerRadio($radios);
    foreach ($util as $radio => $ut) {
        sendGraphite("radio." . $radio . ".util", $ut);
    }
    // noise
    $noise = getNoisePerRadio($radios, $chan);
    foreach ($noise as $radio => $ns) {
        sendGraphite("radio." . $radio . ".noise", $ns);
    }
    // counters
    $counters = getRadioCounters($radios);
    foreach ($counters as $radio => $cnt) {
        foreach ($cnt as $field => $value) {
            sendGraphite("radio." . $radio . "." . $field, $value);
        }
    }
}
if ($graphite_send) {
    fclose($fsock);
}
Exemple #2
0
             foreach ($ping_list as $host) {
                 $ping = ping($host, $rdisc6["IPAddress"], 6);
                 $ping_log = "";
                 foreach ($ping as $metric => $value) {
                     sendGraphite("ping_v6." . str_replace(".", "_", str_replace("%" . $_dev, "", $host)) . "." . $metric, $value);
                     $ping_log .= $metric . " = " . $value . " ";
                 }
                 _l("Ping results: {$ping_log}");
             }
             kill_rdisc6();
         }
         if ($wget_done) {
             if ($_cfg["interfaces"][$_dev]["type"] == "ath10k") {
                 $ath10k_stats = ath10k_stats($_dev, $ath10k_stats);
                 foreach ($ath10k_stats as $field => $value) {
                     sendGraphite("ath10k.{$field}", $value);
                 }
             }
         }
         _l("Done, disabling {$ssid} BSSID {$net["bssid"]}");
         disable_Network($i);
     }
 }
 $bssid_clean = "";
 _l("End of cycle, re-scanning...");
 $networks = iw_scan();
 // check for BSSID list
 $_bssid_ap = get_bssid_list();
 // close graphite
 closeGraphite($graphite_fsock);
 sleep(5);