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

implement ph.showImlHelpHeader

parent 723fb049
Branches
No related tags found
1 merge request!1286468 docs and harmonize
......@@ -12,11 +12,11 @@
# 2022-08-31 v1.3 <axel.hahn@iml.unibe.ch> add help; shellfix corrections
# 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> add help; shellfix corrections
# 2023-06-19 v1.5 <axel.hahn@unibe.ch> no more tmpfile
# 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.5
self_APPVERSION=1.6
# url=`hostname -f`/server-status
url=localhost/server-status
......@@ -41,15 +41,9 @@ paramsWget="-T 5 -t 1 --no-check-certificate"
# ----------------------------------------------------------------------
function showHelp(){
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Get Apache httpd server-status page $url.
You get output with the server status and values for each slot type.
......@@ -80,7 +74,7 @@ Slot types of apache httpd:
SYNTAX:
$(basename $0) [-w WARN_LIMIT] [-c CRITICAL_LIMIT]
$_self [-w WARN_LIMIT] [-c CRITICAL_LIMIT]
OPTIONS:
......@@ -95,7 +89,7 @@ PARAMETERS:
EXAMPLE:
$(basename $0) -w 60 -c 80
$_self -w 60 -c 80
EOF
}
......
......@@ -16,10 +16,11 @@
#
# ----------------------------------------------------------------------
# 2020-03-04 v1.0 <axel.hahn@iml.unibe.ch>
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2023-04-24 v1.2 <axel.hahn@unibe.ch> update for newer ceph versions
# 2023-05-09 v1.3 <axel.hahn@unibe.ch> add help
# 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile
# 2020-03-05 v1.1 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2023-04-24 v1.2 <axel.hahn@unibe.ch> update for newer ceph versions
# 2023-05-09 v1.3 <axel.hahn@unibe.ch> add help
# 2023-06-19 v1.4 <axel.hahn@unibe.ch> no more tmpfile
# 2023-07-27 v1.5 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $(dirname $0)/inc_pluginfunctions
......@@ -27,20 +28,12 @@
typeset -i iWarning=0
typeset -i iCritical=0
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.4
self_APPVERSION=1.5
function showHelp(){
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Show available and free space on a ceph cluster.
This check sends performance data.
......
......@@ -18,24 +18,17 @@
# 2023-05-10 v1.1 <axel.hahn@unibe.ch> fix for small transfer rates in B/s
# 2023-05-10 v1.2 <axel.hahn@unibe.ch> add tests
# 2023-05-11 v1.3 <axel.hahn@unibe.ch> handle ceph status without io data in output
# 2023-07-27 v1.4 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.3
self_APPVERSION=1.4
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Show cheph IO as read and written bytes per second.
This check sends performance data.
......
......@@ -31,7 +31,6 @@
. $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.6
# column number in output where to find the up/ down info
......@@ -42,16 +41,9 @@ iColUpDown=5
# ----------------------------------------------------------------------
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Show cheph osd status: how many OSDs exist and how many are up/ down.
This check sends performance data.
......
......@@ -20,14 +20,14 @@
# 2021-04-12 v1.3 <axel.hahn@iml.unibe.ch> if degraded items are 0 delete init file too
# 2023-04-24 v1.4 <axel.hahn@unibe.ch> update for newer ceph versions
# 2023-06-19 v1.5 <axel.hahn@unibe.ch> add help and param support; no more tmpfile
# 2023-07-27 v1.6 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $(dirname $0)/inc_pluginfunctions
initfile="/tmp/ceph-status-not-ok-start-$USER"
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.5
self_APPVERSION=1.6
iSleep=3
doLoop=1
......
......@@ -17,13 +17,12 @@
# 2022-10-21 v1.10 <axel.hahn@unibe.ch> remove grep: warning: stray \ before white space
# show last backup, prune, verify
# 2023-06-22 v1.11 <axel.hahn@unibe.ch> add help and param support; add parameter for install directory
# 2023-06-22 v1.12 <axel.hahn@unibe.ch> add docs url of IML backup
# 2023-07-27 v1.12 <axel.hahn@unibe.ch> add docs url of IML backup
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.11
self_APPVERSION=1.12
sInstalldir=/opt/imlbackup/client/
......@@ -32,16 +31,9 @@ sInstalldir=/opt/imlbackup/client/
# ----------------------------------------------------------------------
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Show status of IML backup.
See https://os-docs.iml.unibe.ch/iml-backup/
......
#
tcp/www.axel-hahn.de/80
tcp/www.axel-hahn.de/443
tcp/localhost/8002
......@@ -9,41 +9,35 @@
#
# ----------------------------------------------------------------------
# 2020-03-10 v1.0 <axel.hahn@iml.unibe.ch>
# 2020-03-23 v1.1 <axel.hahn@iml.unibe.ch> added more data
# 2020-07-08 v1.2 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps."
# 2020-07-17 v1.3 <axel.hahn@iml.unibe.ch> use ph.require to check binaries
# 2021-02-10 v1.4 <axel.hahn@iml.unibe.ch> added critical io wait
# 2021-10-28 v1.5 <axel.hahn@iml.unibe.ch> Use 2nd update of top
# 2021-12-10 v1.6 <axel.hahn@iml.unibe.ch> show processes with status D to find cpu waits
# 2022-03-09 v1.7 <axel.hahn@iml.unibe.ch> show most cpu intensive processes
# 2022-03-10 v1.8 <axel.hahn@iml.unibe.ch> add cli param -p; update help
# 2022-03-22 v1.9 <axel.hahn@iml.unibe.ch> fix syntax error on 100% idle
# 2022-04-14 v1.10 <axel.hahn@iml.unibe.ch> show consuming cpu processes with top and ps
# 2022-08-29 v1.11 <axel.hahn@iml.unibe.ch> replace pipe to prevent start of metrics section
# 2022-08-29 v1.12 <axel.hahn@iml.unibe.ch> fix: replace pipe
# 2023-02-13 v1.13 <axel.hahn@iml.unibe.ch> small shell fixes
# 2020-03-23 v1.1 <axel.hahn@iml.unibe.ch> added more data
# 2020-07-08 v1.2 <axel.hahn@iml.unibe.ch> FIX: set "ph." instead "ps."
# 2020-07-17 v1.3 <axel.hahn@iml.unibe.ch> use ph.require to check binaries
# 2021-02-10 v1.4 <axel.hahn@iml.unibe.ch> added critical io wait
# 2021-10-28 v1.5 <axel.hahn@iml.unibe.ch> Use 2nd update of top
# 2021-12-10 v1.6 <axel.hahn@iml.unibe.ch> show processes with status D to find cpu waits
# 2022-03-09 v1.7 <axel.hahn@iml.unibe.ch> show most cpu intensive processes
# 2022-03-10 v1.8 <axel.hahn@iml.unibe.ch> add cli param -p; update help
# 2022-03-22 v1.9 <axel.hahn@iml.unibe.ch> fix syntax error on 100% idle
# 2022-04-14 v1.10 <axel.hahn@iml.unibe.ch> show consuming cpu processes with top and ps
# 2022-08-29 v1.11 <axel.hahn@iml.unibe.ch> replace pipe to prevent start of metrics section
# 2022-08-29 v1.12 <axel.hahn@iml.unibe.ch> fix: replace pipe
# 2023-02-13 v1.13 <axel.hahn@iml.unibe.ch> small shell fixes
# 2023-07-27 v1.14 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $(dirname $0)/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.13
self_APPVERSION=1.14
# ----------------------------------------------------------------------
# functions
# ----------------------------------------------------------------------
function showHelp(){
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
check cpu usage and cpu wait
Cpu infos are taken from output of top command.
......
......@@ -17,19 +17,19 @@
# ds=daniel.schueler@iml.unibe.ch
#
# 2017-10-13 v1.0 ah,ds
# 2017-10-17 v1.1 ah,ds remove PIPESTATUS for Debian8 compatibility
# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line
# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs
# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter
# 2022-08-23 v2.0 <axel.hahn@iml.unibe.ch> simplify it: use cronstatus.sh (it has exitcode >0 on errors now)
# 2017-10-17 v1.1 ah,ds remove PIPESTATUS for Debian8 compatibility
# 2019-04-30 v1.2 ah,ds show scriptlabel of failed jobs in 1st line
# 2020-02-28 v1.3 ah,ds ouput with separated error jobs and OK jobs
# 2020-03-05 v1.4 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2022-02-28 v1.5 <axel.hahn@iml.unibe.ch> fix output of error counter
# 2022-08-23 v2.0 <axel.hahn@iml.unibe.ch> simplify it: use cronstatus.sh (it has exitcode >0 on errors now)
# 2023-07-27 v2.1 <axel.hahn@unibe.ch> update help page
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=2.0
self_APPVERSION=2.1
statusScript=/opt/cronwrapper/cronstatus.sh
# ----------------------------------------------------------------------
......@@ -37,15 +37,9 @@ statusScript=/opt/cronwrapper/cronstatus.sh
# ----------------------------------------------------------------------
function showHelp(){
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Show status of all Cronjobs using Axels Cronwrapper
https://github.com/axelhahn/cronwrapper
......
......@@ -13,13 +13,12 @@
#
# ----------------------------------------------------------------------
# 2020-07-17 v1.0 <axel.hahn@iml.unibe.ch>
# 2023-07-27 v1.1 <axel.hahn@iml.unibe.ch> shell fixes; remove unsupported warn and critical
# 2023-07-27 v1.1 <axel.hahn@unibe.ch> shell fixes; remove unsupported warn and critical
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.1
# ----------------------------------------------------------------------
......@@ -46,18 +45,9 @@ function getDisks(){
# show help
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
Check dis io and latency
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Disk infos based on /sys/block/[NAME]/stat
See https://www.kernel.org/doc/Documentation/block/stat.txt
......
......@@ -11,13 +11,12 @@
# test tcp 53 first
# check result depends on 1st nameserver only
# 2022-10-24 v1.2 <axel.hahn@unibe.ch> shell fixes; remove pipe char in output
# 2023-07-27 v1.3 <axel.hahn@iml.unibe.ch> shell fixes; add help page
# 2023-07-27 v1.3 <axel.hahn@unibe.ch> shell fixes; add help page
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.3
tmpfile=/tmp/check_netstat_out_$$
......@@ -38,16 +37,9 @@ typeset -i iNotReachable=0
# show help
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Loop over all defined dns servers (in /etc/resolv.conf) and check
each:
......
......@@ -10,13 +10,12 @@
# ----------------------------------------------------------------------
# 2021-03-23 v1.0 <axel.hahn@iml.unibe.ch>
# 2021-03-30 v1.1 <axel.hahn@iml.unibe.ch> max age of detected errors: since yesterday (commented)
# 2023-07-27 v1.2 <axel.hahn@iml.unibe.ch> shell fixes; update help page
# 2023-07-27 v1.2 <axel.hahn@unibe.ch> shell fixes; update help page
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.2
......@@ -25,16 +24,9 @@ self_APPVERSION=1.2
# ----------------------------------------------------------------------
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
local _self=$(basename $0)
cat <<EOF
$( ph.showImlHelpHeader )
Check if kernel logs inconsistency messages in the journallog.
It requires sudo permission on /bin/journalctl
......
......@@ -8,13 +8,12 @@
#
# ----------------------------------------------------------------------
# 2021-03-23 v0.0 <axel.hahn@iml.unibe.ch>
# 2023-07-27 v1.2 <axel.hahn@iml.unibe.ch> shell fixes; update help page
# 2023-07-27 v1.2 <axel.hahn@unibe.ch> shell fixes; update help page
# ======================================================================
. $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] )
self_APPVERSION=1.2
dirs2test="/tmp /var/tmp"
......@@ -27,14 +26,7 @@ out=""
function showHelp(){
_self=$(basename $0)
cat <<EOF
______________________________________________________________________
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
$( ph.showImlHelpHeader )
Check if a filesystem is readonly in given directories.
In each of the given directories a random file will be touched.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment