cpu freq grafana
This commit is contained in:
parent
44fe39b025
commit
806feb9fdd
4 changed files with 21 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue