Additional improvements and making sure a lot of metrics are actually used.

This commit is contained in:
Yaro Kasear 2025-04-10 09:20:45 -05:00
parent b448b41fa8
commit cbe3048ef2

View file

@ -87,7 +87,8 @@ def main():
with open(args.csv, newline='') as infile, open(args.output, 'w', newline='') as outfile:
reader = csv.DictReader(infile)
fieldnames = reader.fieldnames + [
"ClientsOnAP", "ClientsOnChannel", "APsOnChannel", "CongestionScore"
"ClientsOnAP", "ClientsOnChannel", "APsOnChannel", "CongestionScore",
"AvgAPSignal", "StrongestAPSignal", "UnlinkedDevices"
]
writer = csv.DictWriter(outfile, fieldnames=fieldnames)
writer.writeheader()
@ -107,12 +108,15 @@ def main():
writer.writerow(row)
continue
clients_ap, clients_chan, aps_chan, congestion = get_rf_metrics(cursor, bssid, channel, tstart, tend)
clients_ap, clients_chan, aps_chan, congestion, avg_signal, strongest_signal, unlinked_devices = get_rf_metrics(cursor, bssid, channel, tstart, tend)
row["ClientsOnAP"] = clients_ap
row["ClientsOnChannel"] = clients_chan
row["APsOnChannel"] = aps_chan
row["CongestionScore"] = congestion
row["AvgAPSignal"] = avg_signal
row["StrongestAPSignal"] = strongest_signal
row["UnlinkedDevices"] = unlinked_devices
writer.writerow(row)