diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-18 13:36:39 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-18 13:36:39 +0000 |
commit | 4298941471eb35605dbe002f8e33b26617f02586 (patch) | |
tree | 921e5697e2fd0dc602ded8078848d80cb86c173b /python/vyos/accel_ppp.py | |
parent | 9e2e1700c9ea6b9f7fe5662f45672943380b3905 (diff) | |
download | vyos-1x-4298941471eb35605dbe002f8e33b26617f02586.tar.gz vyos-1x-4298941471eb35605dbe002f8e33b26617f02586.zip |
T5013: accelppp replace cpu key to cpu_load_percentage op-mode
Change op-mode raw statistics for accel_ppp.py
dict key 'cpu' to 'cpu_load_percentage' and value to integer
Diffstat (limited to 'python/vyos/accel_ppp.py')
-rw-r--r-- | python/vyos/accel_ppp.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/accel_ppp.py b/python/vyos/accel_ppp.py index bfc8ee5a9..0af311e57 100644 --- a/python/vyos/accel_ppp.py +++ b/python/vyos/accel_ppp.py @@ -38,6 +38,9 @@ def get_server_statistics(accel_statistics, pattern, sep=':') -> dict: if key in ['starting', 'active', 'finishing']: stat_dict['sessions'][key] = value.strip() continue + if key == 'cpu': + stat_dict['cpu_load_percentage'] = int(re.sub(r'%', '', value.strip())) + continue stat_dict[key] = value.strip() return stat_dict |