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

about: added to show disks

parent ba584320
Branches
No related tags found
1 merge request!202about: added to show disks
...@@ -5,13 +5,19 @@ ...@@ -5,13 +5,19 @@
# ABOUT # 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 . $( dirname $0 )/inc_pluginfunctions
. /etc/icingaclient/client.cfg 2>/dev/null . /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 # FUNCTIONS
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
...@@ -42,12 +48,19 @@ echo ...@@ -42,12 +48,19 @@ echo
_section "CPU: $_iCpu" _section "CPU: $_iCpu"
echo "${_sCpuModel}" echo "${_sCpuModel}"
echo echo
echo
_section "Memory" _section "Memory"
echo "RAM total ${_sMem}" echo "RAM total ${_sMem}"
echo "Swap ${_sSwap}" echo "Swap ${_sSwap}"
echo 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 echo
if [ -d "${dir_checks}" ]; then if [ -d "${dir_checks}" ]; then
...@@ -56,12 +69,26 @@ if [ -d "${dir_checks}" ]; then ...@@ -56,12 +69,26 @@ if [ -d "${dir_checks}" ]; then
ls -1 Service-* | cut -f 2- -d "-" ls -1 Service-* | cut -f 2- -d "-"
cd - >/dev/null 2>&1 cd - >/dev/null 2>&1
echo echo
echo
fi fi
# _section "Disk" # hmmmm - too complicated...
# df -h # _section "Tools"
# echo # (
# 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 # echo
# _section "network" # _section "network"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment