Code Monkey home page Code Monkey logo

collectd-cuda's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

collectd-cuda's Issues

No output

Wasn't able to get any output from installing this plugin into the collectd config . Any help on where i might have gone wrong?

Missing configuration file

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,

when collectd_cuda.sh is called via a symbolic link $SCRIPTDIR isn't set correctly and config file won't be found

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.