-
Notifications
You must be signed in to change notification settings - Fork 9
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
Metrics support enhancements: 1) Splitting up amd_gpu_memory_use_perc… #5
base: master
Are you sure you want to change the base?
Conversation
…ent into two separate metrics: amd_gpu_memory_used and amd_gpu_memory_total. 2) Adding 'gpu' label which is the index of the gpu on the node. 3) Adding 'node' label which is the name of the node on which the gpu runs. 4) Adding pod name label.
nodename, err := exec.Command("uname", "-n").Output() | ||
if err == nil { | ||
gNodeName = string(nodename) | ||
gPod = string(nodename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need gPod
and gNodeName
- what is gPod
' supposed to be, is it always same as gNodeName
?
nil,// The metric's constant label dimensions. | ||
), | ||
GPUMemoryUsage: prometheus.NewDesc( | ||
GPUMemoryBusyPercent: prometheus.NewDesc( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "busy" memory, does it mean "used"? Not sure what 'busy' means for memory? Could we changed to "used"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we try to pass arguments "node_id" and "pod" in the query, we are getting "Empty Query result".
@@ -141,52 +143,63 @@ func NewCollector(handle func() (collect.AMDParams)) prometheus.Collector { | |||
GPUDevId: prometheus.NewDesc( | |||
prometheus.BuildFQName("amd", "", "gpu_dev_id"), | |||
"AMD Params",// The metric's help text. | |||
[]string{"gpu_dev_id", "productname"},// The metric's variable label dimensions. | |||
[]string{"gpu_dev_id", "productname", "node_id", "pod"},// The metric's variable label dimensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ent into two separate metrics: amd_gpu_memory_used and amd_gpu_memory_total. 2) Adding 'gpu' label which is the index of the gpu on the node. 3) Adding 'node' label which is the name of the node on which the gpu runs. 4) Adding pod name label.