Skip to content
Snippets Groups Projects
Commit d8095220 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch '6745-extend-unit-check' into 'master'

about: added to show disks

See merge request !202
parents fa889312 7dc5d2b9
No related branches found
No related tags found
1 merge request!202about: added to show disks
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment