Skip to content

Commit 505af8a

Browse files
committed
in_gpu_metrics: Add debug output on failure for NVIDIA GPU detection
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent ea52727 commit 505af8a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plugins/in_gpu_metrics/gpu_metrics.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ static int in_gpu_init(struct flb_input_instance *ins,
126126

127127
amd_gpu_detect_cards(ctx);
128128
if (nvml_gpu_initialize(ctx) == 0) {
129-
nvml_gpu_detect_cards(ctx);
129+
if (nvml_gpu_detect_cards(ctx) != 0) {
130+
flb_plg_debug(ctx->ins, "NVML card detection encountered errors");
131+
}
130132
}
131133
flb_input_set_context(ins, ctx);
132134

0 commit comments

Comments
 (0)