0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-27 22:26:21 +00:00

apps.plugin: print also the original comm ()

* print also the original comm

* remove colon from external plugins sanitization
This commit is contained in:
Costa Tsaousis 2024-10-08 18:23:15 +03:00 committed by GitHub
parent b0bcc8fa67
commit 02c06c0ea9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions
src
collectors/apps.plugin
libnetdata/sanitizers

View file

@ -177,7 +177,8 @@ void print_process_tree(struct pid_stat *root, struct pid_stat *parent, int dept
string2str(children[i]->target->name),
string2str(children[i]->cmdline));
#else
printf("[%d] %s [%s]: %s\n", children[i]->pid,
printf("[%d] orig: '%s' new: '%s' [target: %s]: cmdline: %s\n", children[i]->pid,
string2str(children[i]->comm_orig),
string2str(children[i]->comm),
string2str(children[i]->target->name),
string2str(children[i]->cmdline));

View file

@ -9,7 +9,6 @@
* ' -> _
* ` -> _
* \ -> /
* : -> _
* = -> _
* | -> _
*/
@ -33,7 +32,7 @@ static unsigned char external_plugins_map[256] = {
['8'] = '8', ['9'] = '9',
// symbols
[':'] = '_', [';'] = ';', ['<'] = '<', ['='] = '_', ['>'] = '>', ['?'] = '?', ['@'] = '@',
[':'] = ':', [';'] = ';', ['<'] = '<', ['='] = '_', ['>'] = '>', ['?'] = '?', ['@'] = '@',
// capitals
['A'] = 'A', ['B'] = 'B', ['C'] = 'C', ['D'] = 'D', ['E'] = 'E', ['F'] = 'F', ['G'] = 'G', ['H'] = 'H',