diff options
author | Christian Breunig <christian@breunig.cc> | 2024-06-10 19:48:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-10 19:48:23 +0200 |
commit | 393e5336dd659ae9db601a1764a4649930c6d336 (patch) | |
tree | 614923e96f8eb04bb644f392eea7482e23630409 /src/op_mode/uptime.py | |
parent | c55422db607efe7b62c863c31a1e8516d57f8e0f (diff) | |
parent | 66af3962fa79e86ca2933289f273ccad08748eab (diff) | |
download | vyos-1x-393e5336dd659ae9db601a1764a4649930c6d336.tar.gz vyos-1x-393e5336dd659ae9db601a1764a4649930c6d336.zip |
Merge pull request #3622 from vyos/mergify/bp/sagitta/pr-3606
vyos.utils: T5195: import vyos.cpu to this package (backport #3606)
Diffstat (limited to 'src/op_mode/uptime.py')
-rwxr-xr-x | src/op_mode/uptime.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/op_mode/uptime.py b/src/op_mode/uptime.py index 059a4c3f6..559eed24c 100755 --- a/src/op_mode/uptime.py +++ b/src/op_mode/uptime.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2021-2023 VyOS maintainers and contributors +# Copyright (C) 2021-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -29,8 +29,8 @@ def _get_uptime_seconds(): def _get_load_averages(): from re import search + from vyos.utils.cpu import get_core_count from vyos.utils.process import cmd - from vyos.cpu import get_core_count data = cmd("uptime") matches = search(r"load average:\s*(?P<one>[0-9\.]+)\s*,\s*(?P<five>[0-9\.]+)\s*,\s*(?P<fifteen>[0-9\.]+)\s*", data) |