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

cmd/scollector: normalize process metrics into os namespace #1524

Merged
merged 1 commit into from
Dec 16, 2015

Conversation

kylebrandt
Copy link
Member

No description provided.

@kylebrandt
Copy link
Member Author

@gbrayut @alienth

return fmt.Errorf("failed to convert process user cpu: %v", err)
}
totalVirtualMem += virtual
rss, err := strconv.ParseInt(stats[23], 10, 54)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

54-byte integer.

@alienth
Copy link
Contributor

alienth commented Dec 16, 2015

Back do you, @kylebrandt
💅

@kylebrandt
Copy link
Member Author

@alienth Ya I considered that but my understanding is that the CPU time will be based on the number of logical cores. So maybe I should just rename it to be clear?

@alienth
Copy link
Contributor

alienth commented Dec 16, 2015

@kylebrandt Rename sounds fine, or maybe just a description note.

@alienth
Copy link
Contributor

alienth commented Dec 16, 2015

🐟 lgtm

@@ -140,6 +145,8 @@ func c_windows_processes() (opentsdb.MultiDataPoint, error) {
tags := opentsdb.TagSet{"name": name, "id": id}
AddTS(&md, "win.proc.cpu", ts, v.PercentPrivilegedTime/NS100_Seconds/numberOfLogicalProcessors, opentsdb.TagSet{"type": "privileged"}.Merge(tags), metadata.Counter, metadata.Pct, descWinProcCPU_priv)
AddTS(&md, "win.proc.cpu", ts, v.PercentUserTime/NS100_Seconds/numberOfLogicalProcessors, opentsdb.TagSet{"type": "user"}.Merge(tags), metadata.Counter, metadata.Pct, descWinProcCPU_user)
totalCPUByName[name] += v.PercentUserTime / NS100_Seconds / numberOfLogicalProcessors
AddTS(&md, "win.proc.cpu_total", ts, v.PercentProcessorTime/NS100_Seconds/numberOfLogicalProcessors, tags, metadata.Counter, metadata.Pct, descWinProcCPU_total)
AddTS(&md, "win.proc.cpu_total", ts, v.PercentProcessorTime/NS100_Seconds/numberOfLogicalProcessors, tags, metadata.Counter, metadata.Pct, descWinProcCPU_total)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate line? or is this just a funky diff?

@gbrayut
Copy link
Contributor

gbrayut commented Dec 16, 2015

LGTM

@kylebrandt kylebrandt merged commit 02c0129 into master Dec 16, 2015
@gbrayut gbrayut deleted the serviceCPUMem branch December 30, 2015 01:39
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

Successfully merging this pull request may close these issues.

3 participants