I have several daemons which names have a common prefix which is longer than 15 characters that seem to get cut off by topbeat and end up being counted as one.
It seems there is no config option in topbeat, is this a limitation of Linux or the API topbeat is using to get the process names?
Is there a way to raise the limit?
The gosigar library that Topbeat is using the get process information, is reading the process name from the /proc/[pid]/stat file on Linux. There is a bug in the current implementation that fails to parse the process name if it contains spaces, but this is fixed recently in the [pull request].(https://github.com/elastic/gosigar/pull/4) and it will be included in the next release.
If this is your case, you can use the latest nightly build that contains this fix. You can find it here.
If not, then can you please copy & paste here the content of the /proc/[pid]/stat for one of your processes? Thanks!
It is already cut off in the stat file:
19211 (nac-logging-amq) S 1 19211 19211 0 -1 4202752 5873068 0 48 0 2444657 118010 0 0 20 0 1 0 363988890 143618048 3147 18446744073709551615 4194304 5777388 140726113689888 140726113689176 140479796634259 0 0 4224 0 0 0 0 17 0 0 0 16 0 0 7874544 7887424 30507008 140726113697094 140726113697600 140726113697600 140726113697736 0
It seems this is a hard limit of the proc filesystem: linux - What is the maximum allowed limit on the length of a process name? - Stack Overflow
The cmdline file contains the full name which could be used to extract the process name instead of the stat file.
I was not aware of this limitation on Linux. Thanks for letting us know. As an workaround we can export command line to contain the full process name. Can you please open a feature request here? Thanks!