aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
diff options
context:
space:
mode:
Diffstat (limited to 'coin/provisioning/common/shared/telegraf/telegraf-ioping.sh')
-rwxr-xr-x[-rw-r--r--]coin/provisioning/common/shared/telegraf/telegraf-ioping.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/coin/provisioning/common/shared/telegraf/telegraf-ioping.sh b/coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
index ad95eadc..528047ce 100644..100755
--- a/coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
+++ b/coin/provisioning/common/shared/telegraf/telegraf-ioping.sh
@@ -1,4 +1,6 @@
#!/bin/sh
+#Copyright (C) 2023 The Qt Company Ltd
+#SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
# Measure I/O latency once, return data in InfluxDB format
#
@@ -12,7 +14,7 @@
set -e
-[ x"$1" = x ] && echo "$0 takes a path as a first argument" && exit 1
+[ -z "$1" ] && echo "$0 takes a path as a first argument" && exit 1
# Try to run in high priority to avoid slow-downs because of
# factors other than I/O.
@@ -23,4 +25,4 @@ rlatency="$(ioping -B -k -c 3 -i 0.1 "$1" | cut -d " " -f 5)"
wlatency="$(ioping -B -k -c 3 -i 0.1 -W "$1" | cut -d " " -f 5)"
printf "ioping,path=$1 read_latency_ns=%u,write_latency_ns=%u\n" \
- $rlatency $wlatency
+ "$rlatency" "$wlatency"