From ccdd02bfe137be9ba0401dc7e1efcd02cb0da332 Mon Sep 17 00:00:00 2001 From: Graeme Stewart Date: Fri, 3 May 2024 12:46:09 +0200 Subject: [PATCH] Parse ccpm field as string This can be a "-" instead of 0 --- package/src/nvidiamon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/src/nvidiamon.cpp b/package/src/nvidiamon.cpp index 828a681..947c65c 100644 --- a/package/src/nvidiamon.cpp +++ b/package/src/nvidiamon.cpp @@ -74,9 +74,9 @@ void nvidiamon::update_stats(const std::vector& pids, } // Loop over output - unsigned int gpu_idx{}, sm{}, mem{}, fb_mem{}, ccpm{}; + unsigned int gpu_idx{}, sm{}, mem{}, fb_mem{}; pid_t pid{}; - std::string enc{}, dec{}, jpg{}, ofa{}, cg_type{}, cmd_name{}; + std::string enc{}, dec{}, jpg{}, ofa{}, cg_type{}, ccpm{}, cmd_name{}; std::unordered_map activegpus{}; // Avoid double counting active GPUs for (const auto& s : cmd_result.second) {