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

Add a descriptive name to the process threads #6974

Closed
ancarpan opened this Issue Sep 14, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@ancarpan

ancarpan commented Sep 14, 2018

  • Program: Authoritative, Recursor, dnsdist
  • Issue type: Feature request

Short description

It would be nice if the single threads in the applications had a descriptive name so that debugging and tracing would be easier.

Usecase

While debugging performance issues it would be easier to spot threads actual job and identify possible bottlenecks. Anything that could help identify the process current role/usage would be nice.

Description

Currently:

# pgrep -law pdns_recursor
16701 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no
16703 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no
16704 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no
16705 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no

Nice to have:

# pgrep -law pdns_recursor
16701 pdns_recursor/distributor
16703 pdns_recursor/resolver
16704 pdns_recursor/resolver
16705 pdns_recursor/resolver

Or for dnsdist something like:

$ pgrep -law dnsdist
1934 dnsdist/parent
2162 dnsdist/addlLocal[127.0.0.1:53]
2163 dnsdist/addlLocal[127.0.0.1:53]
2164 dnsdist/newServer[192.169.1.10:5300]
2165 dnsdist/newServer[192.169.1.11:5300]
@pieterlexis

This comment has been minimized.

Member

pieterlexis commented Sep 27, 2018

pgrep -law won't show these names though, but ps -eT will 😄.

Anyway, according to POSIX the name of the thread may only be 16 characters including the \0 terminator. So as verbose as you want is not possible. But we'll see what we can do.

@pieterlexis pieterlexis referenced this issue Sep 27, 2018

Merged

Name threads in the programs #6997

8 of 12 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment