diff --git a/bundles/hardware/files/cpu_frequency b/bundles/hardware/files/cpu_frequency index 8366c4f..a20ad23 100644 --- a/bundles/hardware/files/cpu_frequency +++ b/bundles/hardware/files/cpu_frequency @@ -4,5 +4,7 @@ date=$(date --utc +%s%N) for cpu in $(cat /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus) do - echo "cpu_frequency,cpu=$cpu mhz=$(expr $(cat /sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_cur_freq) / 1000) $date" + # echo "cpu_frequency,cpu=$cpu min=$(expr $(cat /sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_min_freq) / 1000) $date" + echo "cpu_frequency,cpu=$cpu current=$(expr $(cat /sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_cur_freq) / 1000) $date" + # echo "cpu_frequency,cpu=$cpu max=$(expr $(cat /sys/devices/system/cpu/cpu$cpu/cpufreq/scaling_max_freq) / 1000) $date" done diff --git a/bundles/sudo/items.py b/bundles/sudo/items.py index 4f410d9..8d81dcb 100644 --- a/bundles/sudo/items.py +++ b/bundles/sudo/items.py @@ -6,6 +6,6 @@ directories = { for user, commands in node.metadata.get('sudoers').items(): files[f'/etc/sudoers.d/{user}'] = { - 'content': f"{user} ALL=(ALL) NOPASSWD: {', '.join(commands)}", + 'content': f"{user} ALL=(ALL) NOPASSWD: {', '.join(sorted(commands))}", 'mode': '500', } diff --git a/data/grafana/rows/health.py b/data/grafana/rows/health.py index 31c4de9..d1fe2d5 100644 --- a/data/grafana/rows/health.py +++ b/data/grafana/rows/health.py @@ -14,4 +14,20 @@ }, 'unit': 'degrees', }, + 'frequency': { + 'stacked': False, + 'queries': { + 'cpu_frequency': { + 'filters': { + '_measurement': 'cpu_frequency', + '_field': [ + 'current', + ], + }, + 'function': 'mean', + }, + }, + 'unit': 'MHz', + 'display_name': '__field.labels.cpu', + }, } diff --git a/nodes/home.openhab.py b/nodes/home.openhab.py index 27df6d7..e8e29ad 100644 --- a/nodes/home.openhab.py +++ b/nodes/home.openhab.py @@ -14,7 +14,7 @@ ], 'metadata': { 'FIXME_dont_touch_sshd': True, - 'id': '0afcde75-95c8-4fbd-b4c2-8a0fcc92884a', + 'id': '34199b24-4621-42f4-85ae-ec354f9c43e6', 'network': { 'internal': { 'interface': 'eth0',