Skip to content
New issue

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

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

Already on GitHub? # to your account

Inconsistent Handling of the Process Threads #58

Closed
PeterZaitsev opened this issue Aug 28, 2018 · 2 comments
Closed

Inconsistent Handling of the Process Threads #58

PeterZaitsev opened this issue Aug 28, 2018 · 2 comments

Comments

@PeterZaitsev
Copy link

It looks like different data is handled inconsistently for threads belonging to the process

for namedprocess_namegroup_cpu_user_seconds_total the value seems to include all the threads, same for namedprocess_namegroup_read_bytes_total however namedprocess_namegroup_context_switches_total seems to only report value from the main thread which is not meaningful value for threaded processes.

@ncabatoff
Copy link
Owner

Thanks for the bug report, sadly you appear to be correct. The documentation for all this isn't wonderful, but I guess for anything that can be different from one thread to another (like context switches) there's no way to obtain the aggregate value without visiting every thread's proc files.

Unfortunately this means I'm going to have to either eliminate the -threads option and make it mandatory, or make the context switch metrics contingent on providing that option. I'll have to think about that, but for now I'll start by getting something working.

@ncabatoff
Copy link
Owner

I fixed this in the pre-release v0.3.11, by reading the thread data whether or not -threads is given. The thread-based metrics are only emitted when -threads is given, as before. I haven't yet decided whether to eliminate the option altogether and always emit them.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants