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_}