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_cpu_seconds_total do not includes utime and stime #41

Closed
pavelmash opened this issue Dec 7, 2020 · 0 comments
Closed

process_cpu_seconds_total do not includes utime and stime #41

pavelmash opened this issue Dec 7, 2020 · 0 comments

Comments

@pavelmash
Copy link
Contributor

pavelmash commented Dec 7, 2020

Current implementation of process_cpu_seconds_total gauge uses cutime + cstime so for processes without child's returns 0 Below is an output for example app metric

# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total gauge
process_cpu_seconds_total 0.000000

Can it be calculated as utime + stime + cutime + cstime to produce a valid result?

pavelmash pushed a commit to pavelmash/prometheus-client-c that referenced this issue Dec 13, 2020
pavelmash pushed a commit to pavelmash/prometheus-client-c that referenced this issue Dec 18, 2020
miroswan pushed a commit that referenced this issue Dec 18, 2020
* Using utime + stime and _SC_CLK_TCK for process_cpu_seconds_total

Co-authored-by: pavel.mash <pavel.mash@inbase.com.ua>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants