diff --git a/frigate/util.py b/frigate/util.py index f82476ebc..47b7b4323 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -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 diff --git a/web/src/routes/System.jsx b/web/src/routes/System.jsx index 8d5c4ef80..012d1be03 100644 --- a/web/src/routes/System.jsx +++ b/web/src/routes/System.jsx @@ -239,6 +239,7 @@ export default function System() { Inference Speed CPU % Memory % + Network Bandwidth @@ -247,6 +248,7 @@ export default function System() { {detectors[detector]['inference_speed']} ms {cpu_usages[detectors[detector]['pid']]?.['cpu'] || '- '}% {cpu_usages[detectors[detector]['pid']]?.['mem'] || '- '}% + {bandwidth_usages[detectors[detector]['pid']]?.['bandwidth'] || '- '}KB/s @@ -428,6 +430,7 @@ export default function System() { CPU % Avg CPU % Memory % + Network Bandwidth @@ -436,6 +439,7 @@ export default function System() { {cpu_usages[processes[process]['pid']]?.['cpu'] || '- '}% {cpu_usages[processes[process]['pid']]?.['cpu_average'] || '- '}% {cpu_usages[processes[process]['pid']]?.['mem'] || '- '}% + {bandwidth_usages[processes[process]['pid']]?.['bandwidth'] || '- '}KB/s