From 6faf81078ef49137d1341ef355dafe4075c0eaf7 Mon Sep 17 00:00:00 2001 From: Lukas Prause Date: Wed, 16 Feb 2022 10:14:26 +0100 Subject: [PATCH] Bugfix: Read state from sysfs. --- measurement_main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/measurement_main.py b/measurement_main.py index 3ab168e..3f043f9 100755 --- a/measurement_main.py +++ b/measurement_main.py @@ -167,8 +167,10 @@ def activate_hystart(): def is_hystart_activated(): return ( - subprocess.check_output( - "cat /sys/module/tcp_cubic/parameters/hystart", shell=True + int( + subprocess.check_output( + "cat /sys/module/tcp_cubic/parameters/hystart", shell=True + ) ) == "1" ) @@ -176,10 +178,12 @@ def is_hystart_activated(): def is_tcp_probe_enabled(): return ( + int( subprocess.check_output( "cat /sys/kernel/debug/tracing/events/tcp/tcp_probe/enable", shell=True ) - == "1" + ) + == "1" )