kwilczek / collectd-cuda Goto Github PK
View Code? Open in Web Editor NEWcollectd exec plugin for collecting nVidia GPU metrics.
License: MIT License
collectd exec plugin for collecting nVidia GPU metrics.
License: MIT License
Wasn't able to get any output from installing this plugin into the collectd config . Any help on where i might have gone wrong?
Hi Kamil,
Maybe I am doing something wrong, but it seems in my case collectd is unable to get the configuration file plugins_config.sh
I am getting the following in daemon.log (using Debian 9 OS):
exec plugin: Unable to parse command, ignoring line: "Missing config file!
If i just add in collectd "cd" in the script collectd_cuda.sh to the path where the config file is located everything works:
cd /home/jota/my-scripts/collectd/
Regards,
Hi,
I tried to monitor my GPU today with your script and everything works fine when I call "~/git/collectd-cuda/collectd_cuda.sh". Usually I create links to binaries or scripts in my ~/bin directory. When I call "~/bin/collectd_cuda.sh" your script exits silently with return code 1.
konstantin@majestix:~$ ~/git/collectd-cuda/collectd_cuda.sh
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_sm interval=10 N:300
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_used interval=10 N:593
PUTVAL majestix/cuda-00000000:06:00.0/power-power_limit interval=10 N:125.00
PUTVAL majestix/cuda-00000000:06:00.0/temperature-temperature_memory interval=10 N:N/A
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_video interval=10 N:540
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_free interval=10 N:5348
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_memory interval=10 N:405
PUTVAL majestix/cuda-00000000:06:00.0/absolute-pstate interval=10 N:8
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_graphics interval=10 N:300
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_total interval=10 N:5941
PUTVAL majestix/cuda-00000000:06:00.0/percent-utilization_gpu interval=10 N:2
PUTVAL majestix/cuda-00000000:06:00.0/percent-utilization_memory interval=10 N:3
PUTVAL majestix/cuda-00000000:06:00.0/temperature-temperature_gpu interval=10 N:40
PUTVAL majestix/cuda-00000000:06:00.0/percent-fan_speed interval=10 N:29
PUTVAL majestix/cuda-00000000:06:00.0/power-power_draw interval=10 N:9.48
konstantin@majestix:~$ ln -s ~/git/collectd-cuda/collectd_cuda.sh ~/bin/collectd_cuda.sh
konstantin@majestix:~$ ~/bin/collectd_cuda.sh
konstantin@majestix:~$ echo $?
1
konstantin@majestix:~$
I've added a few diagnostic echos to your script and discovered that setting $SCRIPTDIR is not reliable if the script is called via symbolic link, the variable contains the directory of the link, not the target:
konstantin@majestix:~$ ~/git/collectd-cuda/collectd_cuda.sh
HOSTNAME = majestix
INTERVAL = 10
SCRIPTDIR = /home/konstantin/git/collectd-cuda
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_sm interval=10 N:300
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_used interval=10 N:615
PUTVAL majestix/cuda-00000000:06:00.0/power-power_limit interval=10 N:125.00
PUTVAL majestix/cuda-00000000:06:00.0/temperature-temperature_memory interval=10 N:N/A
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_video interval=10 N:540
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_free interval=10 N:5326
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_memory interval=10 N:405
PUTVAL majestix/cuda-00000000:06:00.0/absolute-pstate interval=10 N:8
PUTVAL majestix/cuda-00000000:06:00.0/cpufreq-clocks_current_graphics interval=10 N:300
PUTVAL majestix/cuda-00000000:06:00.0/memory-memory_total interval=10 N:5941
PUTVAL majestix/cuda-00000000:06:00.0/percent-utilization_gpu interval=10 N:6
PUTVAL majestix/cuda-00000000:06:00.0/percent-utilization_memory interval=10 N:5
PUTVAL majestix/cuda-00000000:06:00.0/temperature-temperature_gpu interval=10 N:40
PUTVAL majestix/cuda-00000000:06:00.0/percent-fan_speed interval=10 N:29
PUTVAL majestix/cuda-00000000:06:00.0/power-power_draw interval=10 N:8.68
konstantin@majestix:~$ ln -s ~/git/collectd-cuda/collectd_cuda.sh ~/bin/collectd_cuda.sh
konstantin@majestix:~$ ~/bin/collectd_cuda.sh
HOSTNAME = majestix
INTERVAL = 10
SCRIPTDIR = /home/konstantin/bin
config file not found in /home/konstantin/bin
konstantin@majestix:~$
As a workaround I'm now using the actual location of the script in my collectd.conf file.
Cheers
Konzty
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.