@@ -48,13 +48,13 @@ The GPU metrics plugin will automatically scan for supported **AMD GPUs** that a
4848
4949To check if your AMD GPU will be detected run:
5050
51- ``` bash
51+ ``` shell
5252lspci | grep -i vga | grep -i amd
5353```
5454
5555Example output:
5656
57- ``` bash
57+ ``` text
585803:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M] (rev ce)
595973:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Granite Ridge [Radeon Graphics] (rev c5)
6060```
@@ -65,13 +65,13 @@ In systems with multiple GPUs, the GPU metrics plugin will detect all AMD cards
6565
6666To list the GPUs running in your system run the following command:
6767
68- ``` bash
68+ ``` shell
6969ls /sys/class/drm/card* /device/vendor
7070```
7171
7272Example output:
7373
74- ``` bash
74+ ``` text
7575/sys/class/drm/card0/device/vendor
7676/sys/class/drm/card1/device/vendor
7777```
@@ -84,13 +84,13 @@ To get GPU metrics from your system, you can run the plugin from either the comm
8484
8585Run the following command from the command line:
8686
87- ``` bash
87+ ``` shell
8888fluent-bit -i gpu_metrics -o stdout
8989```
9090
9191Example output:
9292
93- ``` json
93+ ``` text
94942025-10-25T20:36:55.236905093Z gpu_utilization_percent{card="1",vendor="amd"} = 2
95952025-10-25T20:36:55.237853918Z gpu_utilization_percent{card="0",vendor="amd"} = 0
96962025-10-25T20:36:55.236905093Z gpu_memory_used_bytes{card="1",vendor="amd"} = 1580118016
@@ -119,36 +119,36 @@ In your main configuration file append the following:
119119
120120``` yaml
121121pipeline :
122- inputs :
123- - name : gpu_metrics
124- scrape_interval : 2
125- path_sysfs : /sys
126- cards_include : " 1"
127- cards_exclude : " 0"
128- enable_power : true
129- enable_temperature : true
130-
131- outputs :
132- - name : stdout
133- match : ' *'
122+ inputs :
123+ - name : gpu_metrics
124+ scrape_interval : 2
125+ path_sysfs : /sys
126+ cards_include : " 1"
127+ cards_exclude : " 0"
128+ enable_power : true
129+ enable_temperature : true
130+
131+ outputs :
132+ - name : stdout
133+ match : ' *'
134134` ` `
135135
136136{% endtab %}
137137{% tab title="fluent-bit.conf" %}
138138
139139` ` ` text
140140[INPUT]
141- Name gpu_metrics
142- scrape_interval 2
143- path_sysfs /sys
144- cards_include 1
145- cards_exclude 0
146- enable_power true
147- enable_temperature true
141+ Name gpu_metrics
142+ scrape_interval 2
143+ path_sysfs /sys
144+ cards_include 1
145+ cards_exclude 0
146+ enable_power true
147+ enable_temperature true
148148
149149[OUTPUT]
150- Name stdout
151- Match *
150+ Name stdout
151+ Match *
152152```
153153
154154{% endtab %}
0 commit comments