Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cmd/scheduler/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
nodeGPUOverview := prometheus.NewDesc(
"hami_node_gpu_overview",
"GPU overview on a certain node",
[]string{"node", "device_uuid", "device_index", "device_cores", "shared_containers", "device_memory_limit", "device_type"}, nil,
[]string{"node", "device_uuid", "device_index", "device_cores", "device_memory_limit", "device_type"}, nil,
)
nodeGPUMemoryPercentage := prometheus.NewDesc(
"hami_node_gpu_memory_allocated_ratio",
Expand Down Expand Up @@ -136,7 +136,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
legacyOverview = prometheus.NewDesc(
"nodeGPUOverview",
"GPU overview on a certain node",
[]string{"nodeid", "deviceuuid", "deviceidx", "devicecores", "sharedcontainers", "devicememorylimit", "devicetype"}, nil,
[]string{"nodeid", "deviceuuid", "deviceidx", "devicecores", "devicememorylimit", "devicetype"}, nil,
)
legacyMemoryPercentage = prometheus.NewDesc(
"nodeGPUMemoryPercentage",
Expand Down Expand Up @@ -208,7 +208,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
nodevGPUMemoryAllocatedDesc,
prometheus.GaugeValue,
float64(devs.Device.Usedmem)*float64(1024)*float64(1024),
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Usedcores), devs.Device.Type,
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Totalcore), devs.Device.Type,
)
ch <- prometheus.MustNewConstMetric(
nodevGPUSharedNumDesc,
Expand All @@ -226,7 +226,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
nodeGPUOverview,
prometheus.GaugeValue,
float64(devs.Device.Usedmem)*float64(1024)*float64(1024),
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Usedcores), fmt.Sprint(devs.Device.Used), fmt.Sprint(devs.Device.Totalmem), devs.Device.Type,
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Totalcore), fmt.Sprint(devs.Device.Totalmem), devs.Device.Type,
)
ch <- prometheus.MustNewConstMetric(
nodeGPUMemoryPercentage,
Expand All @@ -252,7 +252,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
legacyMemoryAllocatedDesc,
prometheus.GaugeValue,
float64(devs.Device.Usedmem)*float64(1024)*float64(1024),
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Usedcores), devs.Device.Type,
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Totalcore), devs.Device.Type,
)
ch <- prometheus.MustNewConstMetric(
legacySharedNumDesc,
Expand All @@ -270,7 +270,7 @@ func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
legacyOverview,
prometheus.GaugeValue,
float64(devs.Device.Usedmem)*float64(1024)*float64(1024),
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Usedcores), fmt.Sprint(devs.Device.Used), fmt.Sprint(devs.Device.Totalmem), devs.Device.Type,
nodeID, devs.Device.ID, fmt.Sprint(devs.Device.Index), fmt.Sprint(devs.Device.Totalcore), fmt.Sprint(devs.Device.Totalmem), devs.Device.Type,
)
ch <- prometheus.MustNewConstMetric(
legacyMemoryPercentage,
Expand Down
4 changes: 3 additions & 1 deletion skill/hami-vgpu-metrics-summary/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,12 @@ These are emitted in **bytes**, even though internal scheduler state stores memo
These are emitted directly from quota manager `q.Used` and should be interpreted as **MiB-like GPU memory units**, not bytes.

**Overview labels**
- `hami_node_gpu_overview.device_cores`
- `hami_node_gpu_overview.device_memory_limit`
- legacy `nodeGPUOverview.devicecores`
- legacy `nodeGPUOverview.devicememorylimit`

These label values are also in **MiB-like units**.
These label values are static. Memory limits are in **MiB-like units**, and cores are integers.

Use these conversions when needed:

Expand Down
Loading