diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2018-11-30 15:41:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-30 15:41:27 +0100 |
commit | 39de47141707969662a61db7b17933fe0bfbba40 (patch) | |
tree | 88cbe548fc2aba55a208f0b830817358c1f62b2b | |
parent | cc1b74b19f2a374330f3eef4f963562dc4ddb9aa (diff) |
Add debug instructions for python modules (#4799)
Used instruction from @ilyam8 in #4085 to add a (How to debug python modules) section.
-rw-r--r-- | collectors/python.d.plugin/README.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/collectors/python.d.plugin/README.md b/collectors/python.d.plugin/README.md index 673fc2c993..f6c2cd265b 100644 --- a/collectors/python.d.plugin/README.md +++ b/collectors/python.d.plugin/README.md @@ -63,7 +63,20 @@ other_job: `update_every`, `retries`, and `priority` are always optional. ---- +## How to debug a python module + +``` +# become user netdata +sudo su -s /bin/bash netdata +``` +Depending on where Netdata was installed, execute one of the following commands to trace the execution of a python module: + +``` +# execute the plugin in debug mode, for a specific module +/opt/netdata/usr/libexec/netdata/plugins.d/python.d.plugin <module> debug trace +/usr/libexec/netdata/plugins.d/python.d.plugin <module> debug trace +``` +Where `[module]` is the directory name under https://github.com/netdata/netdata/tree/master/collectors/python.d.plugin ## How to write a new module |