summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlya Mashchenko <ilya@netdata.cloud>2024-06-14 08:51:41 +0300
committerGitHub <noreply@github.com>2024-06-14 08:51:41 +0300
commit606ebbfc8c91c7ced89dd2b20a37a623b4cf1f42 (patch)
tree34621764f2ed7d6ad5d7720dff80b77feedee928 /src
parent9f76ab98d0a9500f951ba3e6e5ab015cd89c8cf1 (diff)
ndsudo update intel_gpu_top (#17883)
* ndsudo intel_gpu_top add igt-list-gpus, igt-device-json * allow ":" and "=" in parameter
Diffstat (limited to 'src')
-rw-r--r--src/collectors/plugins.d/ndsudo.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/collectors/plugins.d/ndsudo.c b/src/collectors/plugins.d/ndsudo.c
index 30f78c752c..4e6c9e2ad3 100644
--- a/src/collectors/plugins.d/ndsudo.c
+++ b/src/collectors/plugins.d/ndsudo.c
@@ -78,6 +78,22 @@ struct command {
},
},
{
+ .name = "igt-list-gpus",
+ .params = "-L",
+ .search = {
+ [0] = "intel_gpu_top",
+ [1] = NULL,
+ },
+ },
+ {
+ .name = "igt-device-json",
+ .params = "-d {{device}} -J -s {{interval}}",
+ .search = {
+ [0] = "intel_gpu_top",
+ [1] = NULL,
+ },
+ },
+ {
.name = "igt-json",
.params = "-J -s {{interval}}",
.search = {
@@ -181,7 +197,8 @@ bool check_string(const char *str, size_t index, char *err, size_t err_size) {
if(!((c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') ||
(c >= '0' && c <= '9') ||
- c == ' ' || c == '_' || c == '-' || c == '/' || c == '.' || c == ',')) {
+ c == ' ' || c == '_' || c == '-' || c == '/' ||
+ c == '.' || c == ',' || c == ':' || c == '=')) {
snprintf(err, err_size, "command line argument No %zu includes invalid character '%c'", index, c);
return false;
}