From fb80912066705257a4f8c5732ee6b6aa406e3478 Mon Sep 17 00:00:00 2001 From: pimlie Date: Wed, 8 Jan 2025 16:31:26 +0100 Subject: [PATCH] chore: remove unused fn & only suggest graphs when turbostat exists --- plugins/sensors/turbostat_ | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/plugins/sensors/turbostat_ b/plugins/sensors/turbostat_ index 45da9060..fe368476 100755 --- a/plugins/sensors/turbostat_ +++ b/plugins/sensors/turbostat_ @@ -98,14 +98,6 @@ function turbostat_exists { return 0 } -# Left trim white spaces -function ltrim { - local var="$*" - # remove leading whitespace characters - var="${var#"${var%%[![:space:]]*}"}" - echo "$var" -} - # Emit config for package watt graph function emit_watt_graph { local col label @@ -198,7 +190,9 @@ case $1 in fi ;; suggest) - echo "watt" + if turbostat_exists; then + echo "watt" + fi ;; *) GRAPH_TYPE=${0##*turbostat_}