Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #%# family=gpu
- #%# capabilities=autoconf
- #STYLE=LINE2 # graph style for number of listeners
- GRAPH="GPU fan speeds" # graph name, labels
- SECTION="GPU" # graph section
- #FANS=($(DISPLAY=:0 aticonfig --pplib-cmd "get fanspeed 0" | awk '/Result/ {print $4}' | cut -d "%" -f1))
- COUNT_DEVICE='./getatinumber.py'
- NFANS=$($COUNT_DEVICE)
- # --- check whether sensors returned data ---
- run_autoconf() {
- if (( NFANS )) ; then echo yes ; exit 0 ; fi
- echo U ; exit 1 ; }
- run_config() { cat << EOF
- graph_title GPU Fan revolution rates
- graph_category ${SECTION}
- graph_args --base 1000 -l 0
- graph_vlabel RPM
- EOF
- for (( I=0 ; I<NFANS ; I++ )) ; do
- gpu${I}.label fan $I
- EOF
- done
- }
- run_() {
- for (( I=0 ; I<NFANS ; I++ )) ; do
- echo -n "gpu$(echo $I).value "; DISPLAY=:0.$I aticonfig --pplib-cmd "get fanspeed 0" | awk '/Result/ {print $4}' | cut -d "%" -f1
- done
- }
- run_$1
- exit 0
- user@linuxcoin:/etc/munin/plugins# munin-run gpu_fanspeed2
- gpu0.value 80
- gpu1.value 100
- user@linuxcoin:/etc/munin/plugins#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement