Просмотр исходного кода

Bugfix: Read state from sysfs.

master
Lukas Prause 3 лет назад
Родитель
Сommit
6faf81078e
1 измененных файлов: 7 добавлений и 3 удалений
  1. +7
    -3
      measurement_main.py

+ 7
- 3
measurement_main.py Просмотреть файл



def is_hystart_activated(): def is_hystart_activated():
return ( 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" == "1"
) )


def is_tcp_probe_enabled(): def is_tcp_probe_enabled():
return ( return (
int(
subprocess.check_output( subprocess.check_output(
"cat /sys/kernel/debug/tracing/events/tcp/tcp_probe/enable", shell=True "cat /sys/kernel/debug/tracing/events/tcp/tcp_probe/enable", shell=True
) )
== "1"
)
== "1"
) )





Загрузка…
Отмена
Сохранить