mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
Add go2rtc & remote detectors network bandwidth usage to System table (#6526)
* Add network bandwidth usage to System table display in System.jsx and update get_bandwidth_stats function in util.py to include go2rtc processes * black... * Add network bandwidth usage to system table in web UI and improve regex in get_bandwidth_stats function to include frigate detector processes * black... * Update bandwidth calculation to include both incoming and outgoing traffic * black:(
This commit is contained in:
+5
-3
@@ -864,10 +864,12 @@ def get_bandwidth_stats() -> dict[str, dict]:
|
||||
for line in lines:
|
||||
stats = list(filter(lambda a: a != "", line.strip().split("\t")))
|
||||
try:
|
||||
if re.search("^ffmpeg/([0-9]+)/", stats[0]):
|
||||
if re.search(
|
||||
"(^ffmpeg|\/go2rtc|frigate\.detector\.[a-z]+)/([0-9]+)/", stats[0]
|
||||
):
|
||||
process = stats[0].split("/")
|
||||
usages[process[1]] = {
|
||||
"bandwidth": round(float(stats[2]), 1),
|
||||
usages[process[len(process) - 2]] = {
|
||||
"bandwidth": round(float(stats[1]) + float(stats[2]), 1),
|
||||
}
|
||||
except:
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user