diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-02-23 14:47:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 14:47:39 +0000 |
commit | 702441a072bc43b5776ecc6fe041371153aa26c7 (patch) | |
tree | 45bf9994c07519b4e0dde7fea87dc4a88655f71d /python/vyos/accel_ppp.py | |
parent | ab16444374d9a3656356d647de600a042f88420a (diff) | |
parent | 4298941471eb35605dbe002f8e33b26617f02586 (diff) | |
download | vyos-1x-702441a072bc43b5776ecc6fe041371153aa26c7.tar.gz vyos-1x-702441a072bc43b5776ecc6fe041371153aa26c7.zip |
Merge pull request #1829 from sever-sever/T5013
T5013: Extend accelppp op-mode script to get statistic
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 |