![]() |
mrtg script for monitoring temperature - Printable Version +- hashcat Forum (https://hashcat.net/forum) +-- Forum: Misc (https://hashcat.net/forum/forum-15.html) +--- Forum: User Contributions (https://hashcat.net/forum/forum-25.html) +--- Thread: mrtg script for monitoring temperature (/thread-2451.html) |
mrtg script for monitoring temperature - gpufreak - 07-14-2013 Hi guys, Been experimenting with different cooling setups and thought this script might be handy for anyone who want to keep an eye on their GPU temperatures. Very quickly put together, but does the job. Sample: ![]() gputemp.sh Code: #!/bin/sh Then mrtg.conf: Code: WorkDir: /var/www/mrtg/ ... repeat for each gpu you want to monitor and change the parameter in the target (in my case i have 0 till 7). RE: mrtg script for monitoring temperature - radix - 07-14-2013 Thats awesome, well done. RE: mrtg script for monitoring temperature - hannhimhe - 07-15-2013 Have not had time to test it but it looks genius. <3 RE: mrtg script for monitoring temperature - epixoip - 07-15-2013 nicely done! quick suggestion, though: instead of piping grep into cut, and then into cut again, i would suggest using something like: Code: awk '/Temperature/ {printf("%d", $5); }' RE: mrtg script for monitoring temperature - gpufreak - 07-15-2013 @epixoip: thanks thats cleaner :-) Don't forget to setup a cronjob to run MRTG every 5 minutes so your graphs get updated. Code: */5 * * * * env LANG=C /usr/bin/mrtg /path/to/mrtg.cfg &> /dev/null I use as WorkDir /var/www/mrtg so a simple apt-get install apache2 will work out of the box by setting the right permissions to the mrtg folder. Then run "indexmaker" (from MRTG package) to generate the right index.html Code: indexmaker -output=/var/www/mrtg/index.html /path/to/mrtg.cfg RE: mrtg script for monitoring temperature - epixoip - 07-15-2013 so this post got me thinking... this would actually be a great solution for remotely monitoring compute nodes in a vcl cluster. especially since ADL of cousre does not work with VCL. so i whipped up this little shell script: gpu_query Code: #!/bin/sh then added a few extends to my snmpd.conf: Code: extend gpu_temp_1 /usr/local/bin/gpu_query temp 1 repeat on each compute node. install mrtg/cacti/whatever on the cluster controller, and voila. Code: epixoip@token:~$ snmpwalk -v 3 -u cacti -l authpriv -x AES -X cactisnmp -a SHA -A cactisnmp butters NET-SNMP-EXTEND-MIB::nsExtendOutput1Line RE: mrtg script for monitoring temperature - gpufreak - 07-15-2013 Great post! I was doing it myself with an rsync on the /var/www/mrtg folder to sync stats from other nodes into a merged "index.html" from indexmaker but SNMP is the "right way to do it" ;-) |