Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process name is limitated to 15 chars in Linux #428

Closed
abraxxa opened this issue Dec 2, 2015 · 8 comments
Closed

Process name is limitated to 15 chars in Linux #428

abraxxa opened this issue Dec 2, 2015 · 8 comments
Labels
enhancement help wanted Indicates that a maintainer wants help on an issue or pull request Metricbeat Metricbeat module

Comments

@abraxxa
Copy link

abraxxa commented Dec 2, 2015

See https://discuss.elastic.co/t/proc-name-limited-to-15-chars/36034.

Thanks!

@UserNotFound
Copy link

/proc/[pid]/cmdline also contains the information I was wanting to see logged with topbeat. Everything I am interested in logging is "qemu-kvm" or "python" and of very little value without the full command.

[root@ftp00 ~]# cat /proc/15469/stat
15469 (python) S 15466 15469 15469 0 -1 4202752 29048 1939 96 0 1418 161 1 1 20 0 1 0 871492921 678961152 9479 18446744073709551615 4194304 4196532 140733742263776 140733742257984 139951301103955 0 0 20451328 16386 18446744071580752109 0 0 17 0 0 0 294 0 0
[root@ftp00 ~]# cat /proc/15469/cmdline 
../virtualenv/bin/pythonmanage.pysftpd--bind=16--uid=555--gid=555--key=/etc/ssh/site.com.key--realm=testrealm2--proxy

@andrewkroh
Copy link
Member

@UserNotFound See #533

@UserNotFound
Copy link

Ah, I was able to track down that this was committed and merged before 1.1.0 was released, but was not included in the release. Thanks @andrewkroh !

@ruflin
Copy link
Member

ruflin commented Sep 16, 2016

Closing this issue as problem was solved.

@ruflin ruflin closed this as completed Sep 16, 2016
@monicasarbu
Copy link
Contributor

monicasarbu commented Apr 4, 2017

I am still able to reproduce the issue in Metricbeat 5.3 on macOS. The system.process.name is limited to 15 characters, so I am reopening the issue.

@monicasarbu monicasarbu reopened this Apr 4, 2017
@monicasarbu monicasarbu changed the title [Topbeat] work around process name limitation of 15 chars in Linux Process name is limitated to 15 chars in Linux Apr 4, 2017
@monicasarbu monicasarbu added Metricbeat Metricbeat help wanted Indicates that a maintainer wants help on an issue or pull request and removed Topbeat labels Apr 4, 2017
@abraxxa
Copy link
Author

abraxxa commented Apr 4, 2017

Thanks Monica!

@exekias exekias self-assigned this Apr 5, 2017
@ruflin ruflin added the module label Feb 26, 2018
@exekias exekias removed their assignment May 9, 2018
@sundarv85
Copy link

sundarv85 commented Aug 17, 2018

+1 - This is an issue both in Linux and OSX.

@jsoriano
Copy link
Member

As mentioned in the original discuss thread, this is caused by a limitation in the operating systems, the comm value, used for process names in Linux, is limited to 16 bytes including the termination null, so I think there is little we can do against that. Other POSIX systems as OSX have probably similar limitations too.

As a workaround, users may use other fields to identify processes, as system.process.cmdline or system.process.cgroup.id. This can work well for specific use cases as the mentioned before in this issue, but I don't think they can be used to obtain a name in a generic way.

I'm closing this, but I am happy to reopen it if someone has another proposal to collect process names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted Indicates that a maintainer wants help on an issue or pull request Metricbeat Metricbeat module
Projects
None yet
Development

No branches or pull requests

8 participants