diff --git a/about b/about index 51a81c00772da05811d1117a9354935ddabbe37d..60d103e957d4f27cbe0588692af9979bbe1be61a 100755 --- a/about +++ b/about @@ -5,13 +5,19 @@ # ABOUT # # ---------------------------------------------------------------------- -# 2020-10-23 v1.0 <axel.hahn@iml.unibe.ch> +# 2020-10-23 v1.0 <axel.hahn@iml.unibe.ch> initial version +# 2020-10-25 v1.1 <axel.hahn@iml.unibe.ch> show disks, show installed versions (WIP) # ====================================================================== . $( dirname $0 )/inc_pluginfunctions . /etc/icingaclient/client.cfg 2>/dev/null +# show versions of these tools. +# number 2 or 3 stands for position of version in the output +# tools2="curl restic php python" +# tools3="rsync" + # ---------------------------------------------------------------------- # FUNCTIONS # ---------------------------------------------------------------------- @@ -42,12 +48,19 @@ echo _section "CPU: $_iCpu" echo "${_sCpuModel}" echo -echo _section "Memory" echo "RAM total ${_sMem}" echo "Swap ${_sSwap}" echo + +_section "Disks" +out=$(df -h ) +echo "$out" | head -1 +for mydev in $( echo "$out" | grep "^/" | cut -f 1 -d " " | sort -u ) +do + echo "$out" | grep "^$mydev" | head -1 +done echo if [ -d "${dir_checks}" ]; then @@ -56,12 +69,26 @@ if [ -d "${dir_checks}" ]; then ls -1 Service-* | cut -f 2- -d "-" cd - >/dev/null 2>&1 echo - echo fi -# _section "Disk" -# df -h -# echo +# hmmmm - too complicated... +# _section "Tools" +# ( +# for mytool in $tools2 +# do +# ( +# $mytool --version 2>/dev/null \ +# || $mytool version 2>/dev/null +# ) | head -1 | awk '{ print $1 " " $2 }' +# done +# for mytool in $tools3 +# do +# ( +# $mytool --version 2>/dev/null \ +# || $mytool version 2>/dev/null +# ) | head -1 | awk '{ print $1 " " $3 }' +# done +# ) | sort # echo # _section "network"