Initial commit
This commit is contained in:
commit
33882d5455
13 files changed
+543
No files matched your search
Executable
+25
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
for res in /proc/pressure/*; do
|
||||
res_name=$(basename $res)
|
||||
res_name_nice=${res_name@U}
|
||||
res_name_nice=${res_name_nice/MEMORY/Memory}
|
||||
while read line; do
|
||||
for v in $line; do
|
||||
if [[ $v == "some" || $v == "full" ]]; then
|
||||
somefull=$v
|
||||
elif [[ $v == avg* || $v == total* ]]; then
|
||||
timespan=${v%%=*}
|
||||
timespan=${timespan#avg}
|
||||
val=${v#*=}
|
||||
if [[ $timespan == "total" ]]; then
|
||||
timespan_nice="Total"
|
||||
units="usec"
|
||||
else
|
||||
timespan_nice="$timespan Second Average"
|
||||
units="%"
|
||||
fi
|
||||
gmetric --name="psi_${somefull}_${res_name}_${timespan}" --title="PSI ${somefull@u} ${res_name_nice} ${timespan_nice}" --value="$val" --type="float" --group="load" --units="$units"
|
||||
fi
|
||||
done
|
||||
done < "$res"
|
||||
done
|
||||
Reference in new issue
Block a user