summaryrefslogtreecommitdiff
path: root/src/op_mode/uptime.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-10 13:48:16 +0200
committerGitHub <noreply@github.com>2024-06-10 13:48:16 +0200
commit50a5a29ae128795d718a3ed6878887d49544f54d (patch)
tree781de91b602918abdfa91e76c51ff4ca080fdfeb /src/op_mode/uptime.py
parent0ab54fafba6661486c555c027af5b0eb8a136b29 (diff)
parente318eb33446de47835480d4b8f1646b39fb5c388 (diff)
downloadvyos-1x-50a5a29ae128795d718a3ed6878887d49544f54d.tar.gz
vyos-1x-50a5a29ae128795d718a3ed6878887d49544f54d.zip
Merge pull request #3606 from c-po/utils-cpu-T5195
vyos.utils: T5195: import vyos.cpu to this package
Diffstat (limited to 'src/op_mode/uptime.py')
-rwxr-xr-xsrc/op_mode/uptime.py4
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)