Skip to content
Snippets Groups Projects

6908 check rearbackup

Merged Hahn Axel (hahn) requested to merge 6908_check_rearbackup into master
1 file
+ 39
3
Compare changes
  • Side-by-side
  • Inline
+ 39
3
@@ -5,11 +5,14 @@
# ABOUT
#
# ----------------------------------------------------------------------
# 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)
# 2023-10-23 v1.0 <axel.hahn@unibe.ch> initial version
# 2023-10-25 v1.1 <axel.hahn@unibe.ch> show disks, show installed versions (WIP)
# 2023-12-22 v1.2 <axel.hahn@unibe.ch> show help
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
. $(dirname $0)/inc_pluginfunctions
export self_APPVERSION=1.2
. /etc/icingaclient/client.cfg 2>/dev/null
@@ -22,6 +25,32 @@
# FUNCTIONS
# ----------------------------------------------------------------------
# show help text
function showHelp(){
local _self; _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
About ... shows a short summary for the system:
* operating system
* cpu
* ram
* diskspace
* checked services
SYNTAX:
$_self [-h]
OPTIONS:
-h, --help
this help
EOF
}
function _section(){
echo ">>>>>>>>>> $*"
}
@@ -30,6 +59,13 @@ function _section(){
# MAIN
# ----------------------------------------------------------------------
# --- check param -h
while [[ "$#" -gt 0 ]]; do case $1 in
-h|--help) showHelp; exit 0;;
*) echo "ERROR: Unknown parameter: $1"; showHelp; exit 1;
esac; done
_iCpu=$( grep -c "processor" /proc/cpuinfo )
_sCpuModel=$(grep "model name" /proc/cpuinfo | sort -u )
_iMem=$( grep "MemTotal:" /proc/meminfo | awk '{ print $2 }' )
Loading