Shift X2 status from legacy to archived
[khatus.git] / x4 / bin / khatus_x4_sensor_disk
CommitLineData
8c587a02
SK
1#! /bin/sh
2
3set -e
4
5bin_dir="$(dirname $(realpath $0))"
6
7. "$bin_dir/khatus_x4_lib_common_sensor.sh"
8
9while :
10do
11 case "$1"
12 in '')
13 break
14 ;; -f|--file)
15 case "$2"
16 in '')
17 printf "Option $1 requires and argument\n" >&2
18 exit 1
19 ;; *)
20 file="$2"
21 shift 2
22 esac
23 ;; *)
24 shift 1
25 esac
26done
27
28sensor() {
29 df --output=pcent "$file" | awk '
30 NR == 2 {
31 sub("%$", "", $1)
32 print("disk_usage_percentage", $1)
33 }
34 '
35}
36
37run_as_poller
This page took 0.022439 seconds and 4 git commands to generate.