-
Notifications
You must be signed in to change notification settings - Fork 12
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
Trim or warn about process names longer than 15 characters #33
Comments
martinpitt
added a commit
that referenced
this issue
Jan 19, 2025
/proc/pid/comm is at most 15 characters (plus NUL), so specifying a longer `--command` value will never match. Truncate it to the maximum and warn about it. Note that the manpage speaks about `TASK_COMM_LEN`, but that isn't defined anywhere. So define it ourselves. Fixes #33 [1] https://man7.org/linux/man-pages/man5/proc_pid_comm.5.html
Hello @Impact123 Yes, let's just make longer names work. With #35 the value will be truncated for comparison, and it will print out a warning. E. g.
|
martinpitt
added a commit
that referenced
this issue
Jan 19, 2025
/proc/pid/comm is at most 15 characters (plus NUL), so specifying a longer `--command` value will never match. Truncate it to the maximum and warn about it. Note that the manpage speaks about `TASK_COMM_LEN`, but that isn't defined anywhere. So define it ourselves. Fixes #33 [1] https://man7.org/linux/man-pages/man5/proc_pid_comm.5.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into this when trying to monitor
VictoriaMetrics
. See process name here: https://docs.victoriametrics.com/#production-buildfatrace --command=victoria-metrics-prod
will result in no output.It only works if you use the name
victoria-metric
. Too long names should either be trimmed or warned about. Maybe both.fatrace
on its own shows the name asvictoria-metric
but it's very unintuitive to have to keep the length in mind or check first.Perhaps there is also a way to "just" make the full name work?
The text was updated successfully, but these errors were encountered: