Skip to content

Commit

Permalink
Update metrics.csv and multi_metadata.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Dim-P committed Jul 27, 2023
1 parent a0590b9 commit e9534ef
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 7 deletions.
2 changes: 1 addition & 1 deletion collectors/proc.plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ Depending on the configuration, thte following charts will be provided:
- **GPU memory usage**
VRAM, visible VRAM and GTT memory usage in bytes

- **GPU memory percent usage**
- **GPU memory usage percentage**
VRAM, visible VRAM and GTT memory % usage

### configuration
Expand Down
6 changes: 5 additions & 1 deletion collectors/proc.plugin/metrics.csv
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,8 @@ btrfs.device_errors,btrfs device,"write_errs, read_errs, flush_errs, corruption_
powersupply.capacity,power device,capacity,percentage,Battery capacity,line,device,proc.plugin,/sys/class/power_supply
powersupply.charge,power device,"empty_design, empty, now, full, full_design",Ah,Battery charge,line,device,proc.plugin,/sys/class/power_supply
powersupply.energy,power device,"empty_design, empty, now, full, full_design",Wh,Battery energy,line,device,proc.plugin,/sys/class/power_supply
powersupply.voltage,power device,"min_design, min, now, max, max_design",V,Power supply voltage,line,device,proc.plugin,/sys/class/power_supply
powersupply.voltage,power device,"min_design, min, now, max, max_design",V,Power supply voltage,line,device,proc.plugin,/sys/class/power_supply
amdgpu.utilization,gpu,"GPU, memory",percentage,"GPU utilization",line,product_name,proc.plugin,/sys/class/drm
amdgpu.frequency,gpu,"GPU, memory",MHz,"GPU clock",line,product_name,proc.plugin,/sys/class/drm
amdgpu.usage,gpu,"VRAM, visible VRAM, GTT",bytes,"GPU memory usage",area,product_name,proc.plugin,/sys/class/drm
amdgpu.perc_usage,gpu,"VRAM, visible VRAM, GTT",percentage,"GPU memory usage percentage",area,product_name,proc.plugin,/sys/class/drm
102 changes: 102 additions & 0 deletions collectors/proc.plugin/multi_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5180,3 +5180,105 @@ modules:
- name: now
- name: max
- name: max_design
- meta:
plugin_name: proc.plugin
module_name: /sys/class/drm
monitored_instance:
name: AMD GPU
link: "https://www.amd.com"
categories:
- data-collection.hardware-devices-and-sensors
icon_filename: "amd.png"
related_resources:
integrations:
list: []
info_provided_to_referring_integrations:
description: ""
keywords:
- amd
- gpu
- hardware
most_popular: false
overview:
data_collection:
metrics_description: "This integration monitors AMD GPU metrics, such as utilization and memory usage."
method_description: ""
supported_platforms:
include:
- Linux
exclude: []
multi_instance: true
additional_permissions:
description: ""
default_behavior:
auto_detection:
description: ""
limits:
description: ""
performance_impact:
description: ""
setup:
prerequisites:
list: []
configuration:
file:
name: ""
description: ""
options:
description: ""
folding:
title: ""
enabled: true
list: []
examples:
folding:
enabled: true
title: ""
list: []
troubleshooting:
problems:
list: []
alerts: []
metrics:
folding:
title: Metrics
enabled: false
description: ""
availability: []
scopes:
- name: gpu
description: "These metrics refer to the GPU."
labels:
- name: product_name
description: GPU product name (e.g. AMD RX 6600)
metrics:
- name: amdgpu.utilization

Check failure on line 5255 in collectors/proc.plugin/multi_metadata.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] reported by reviewdog 🐶 [error] wrong indentation: expected 12 but found 10 (indentation) Raw Output: ./collectors/proc.plugin/multi_metadata.yaml:5255:11: [error] wrong indentation: expected 12 but found 10 (indentation)
description: GPU utilization
unit: "percentage"
chart_type: line
dimensions:
- name: GPU
- name: memory
- name: amdgpu.frequency
description: GPU clock
unit: "MHz"
chart_type: line
dimensions:
- name: GPU
- name: memory
- name: amdgpu.usage
description: GPU memory usage
unit: "bytes"
chart_type: area
dimensions:

Check failure on line 5273 in collectors/proc.plugin/multi_metadata.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[yamllint] reported by reviewdog 🐶 [error] trailing spaces (trailing-spaces) Raw Output: ./collectors/proc.plugin/multi_metadata.yaml:5273:24: [error] trailing spaces (trailing-spaces)
- name: VRAM
- name: visible VRAM
- name: GTT
- name: amdgpu.perc_usage
description: GPU memory usage percentage
unit: "percentage"
chart_type: area
dimensions:
- name: VRAM
- name: visible VRAM
- name: GTT
10 changes: 5 additions & 5 deletions collectors/proc.plugin/sys_class_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ int do_sys_class_drm(int update_every, usec_t dt) {
, RRDSET_TYPE_LINE
);

rrdlabels_add(c->st_util->rrdlabels, "card", c->id.marketing_name, RRDLABEL_SRC_AUTO);
rrdlabels_add(c->st_util->rrdlabels, "product_name", c->id.marketing_name, RRDLABEL_SRC_AUTO);

if(c->pathname_util_gpu)
c->rd_util_gpu = rrddim_add(c->st_util, "GPU", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
Expand Down Expand Up @@ -774,7 +774,7 @@ int do_sys_class_drm(int update_every, usec_t dt) {
, RRDSET_TYPE_LINE
);

rrdlabels_add(c->st_clk->rrdlabels, "card", c->id.marketing_name, RRDLABEL_SRC_AUTO);
rrdlabels_add(c->st_clk->rrdlabels, "product_name", c->id.marketing_name, RRDLABEL_SRC_AUTO);

if(c->pathname_clk_gpu)
c->rd_clk_gpu = rrddim_add(c->st_clk, "GPU", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
Expand Down Expand Up @@ -817,7 +817,7 @@ int do_sys_class_drm(int update_every, usec_t dt) {
, RRDSET_TYPE_AREA
);

rrdlabels_add(c->st_mem_used->rrdlabels, "card", c->id.marketing_name, RRDLABEL_SRC_AUTO);
rrdlabels_add(c->st_mem_used->rrdlabels, "product_name", c->id.marketing_name, RRDLABEL_SRC_AUTO);

if(c->pathname_mem_used_vram)
c->rd_mem_used_vram = rrddim_add(c->st_mem_used, "VRAM", NULL, 1, 1, RRD_ALGORITHM_ABSOLUTE);
Expand Down Expand Up @@ -858,7 +858,7 @@ int do_sys_class_drm(int update_every, usec_t dt) {
, NULL
, "usage"
, "amdgpu.perc_usage"
, "GPU memory percent usage"
, "GPU memory usage percentage"
, "percentage"
, PLUGIN_PROC_NAME
, PLUGIN_PROC_MODULE_DRM_NAME
Expand All @@ -867,7 +867,7 @@ int do_sys_class_drm(int update_every, usec_t dt) {
, RRDSET_TYPE_AREA
);

rrdlabels_add(c->st_mem_perc->rrdlabels, "card", c->id.marketing_name, RRDLABEL_SRC_AUTO);
rrdlabels_add(c->st_mem_perc->rrdlabels, "product_name", c->id.marketing_name, RRDLABEL_SRC_AUTO);

if(c->pathname_mem_used_vram && c->pathname_mem_total_vram)
c->rd_mem_perc_vram = rrddim_add(c->st_mem_perc, "VRAM", NULL, 1, 100, RRD_ALGORITHM_ABSOLUTE);
Expand Down

0 comments on commit e9534ef

Please sign in to comment.