From 7b1773fa97772e6756646b48d3d85d12426d0ddb Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 7 Jun 2020 11:52:22 +0200 Subject: op-mode: T2559: add "show environment sensors" command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vyos@vmware:~$ show environment sensors VyOS running under hypervisor, no sensors available vyos@apu4:~$ show environment sensors ath10k_hwmon-pci-0500 temp1: N/A k10temp-pci-00c3 temp1: +54.6°C (high = +70.0°C) (crit = +105.0°C, hyst = +104.0°C) fam15h_power-pci-00c4 power1: 3.28 W (interval = 0.01 s, crit = 6.00 W) --- debian/control | 1 + op-mode-definitions/show-environment.xml | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 op-mode-definitions/show-environment.xml diff --git a/debian/control b/debian/control index 85dd919a5..20423aee1 100644 --- a/debian/control +++ b/debian/control @@ -45,6 +45,7 @@ Depends: python3, wide-dhcpv6-client, bmon, hvinfo, + lm-sensors, file, lsscsi, pciutils, diff --git a/op-mode-definitions/show-environment.xml b/op-mode-definitions/show-environment.xml new file mode 100644 index 000000000..88e1718aa --- /dev/null +++ b/op-mode-definitions/show-environment.xml @@ -0,0 +1,21 @@ + + + + + + + Show current system environmental conditions + + + + + Show hardware monitoring results + + + if ! grep -q hypervisor /proc/cpuinfo; then /usr/bin/sensors --no-adapter; else echo "VyOS running under hypervisor, no sensors available"; fi + + + + + + -- cgit v1.2.3