apps.plugin: print also the original comm (#18727)
* print also the original comm * remove colon from external plugins sanitization
Costa Tsaousis committed
Oct 8, 2024 at 18:23 UTC
02c06c0ea99d03838f85f8798827ece913b90bbb
2 files changed
+3
-3
src/collectors/apps.plugin/apps_plugin.c
+2
-1
@@ -177,7 +177,8 @@ void print_process_tree(struct pid_stat *root, struct pid_stat *parent, int dept
177
string2str(children[i]->target->name),
178
string2str(children[i]->cmdline));
179
#else
180
- printf("[%d] %s [%s]: %s\n", children[i]->pid,
180
+ printf("[%d] orig: '%s' new: '%s' [target: %s]: cmdline: %s\n", children[i]->pid,
181
+ string2str(children[i]->comm_orig),
182
string2str(children[i]->comm),
183
string2str(children[i]->target->name),
184
string2str(children[i]->cmdline));
src/libnetdata/sanitizers/sanitizers-pluginsd.c
+1
-2
@@ -9,7 +9,6 @@
9
* ' -> _
10
* ` -> _
11
* \ -> /
12
- * : -> _
12
* = -> _
13
* | -> _
14
*/
@@ -33,7 +32,7 @@ static unsigned char external_plugins_map[256] = {
32
['8'] = '8', ['9'] = '9',
33
34
// symbols
36
- [':'] = '_', [';'] = ';', ['<'] = '<', ['='] = '_', ['>'] = '>', ['?'] = '?', ['@'] = '@',
35
+ [':'] = ':', [';'] = ';', ['<'] = '<', ['='] = '_', ['>'] = '>', ['?'] = '?', ['@'] = '@',
36
37
// capitals
38
['A'] = 'A', ['B'] = 'B', ['C'] = 'C', ['D'] = 'D', ['E'] = 'E', ['F'] = 'F', ['G'] = 'G', ['H'] = 'H',