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

netstat: update help; small fixes

parent 866c5178
No related branches found
No related tags found
1 merge request!1336468 docs and harmonize
...@@ -9,46 +9,42 @@ ...@@ -9,46 +9,42 @@
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# 2020-07-08 v1.0 <axel.hahn@iml.unibe.ch> # 2020-07-08 v1.0 <axel.hahn@iml.unibe.ch>
# 2022-10-25 v1.1 <axel.hahn@unibe.ch> shell fixes; no tmpfiles; IML look # 2022-10-25 v1.1 <axel.hahn@unibe.ch> shell fixes; no tmpfiles; IML look
# 2023-08-22 v1.2 <axel.hahn@unibe.ch> update help; small shell fixes
# ====================================================================== # ======================================================================
. $( dirname $0 )/inc_pluginfunctions . $( dirname $0 )/inc_pluginfunctions
self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) export self_APPVERSION=1.2
self_APPVERSION=1.1
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# functions # functions
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
function showHelp(){ function showHelp(){
local _self; _self=$(basename $0)
cat <<EOF cat <<EOF
______________________________________________________________________ $( ph.showImlHelpHeader )
$self_APPNAME
v$self_APPVERSION
(c) Institute for Medical Education - University of Bern
Licence: GNU GPL 3
______________________________________________________________________
Count number of network connections. Count number of network connections.
SYNTAX: SYNTAX:
$(basename $0) [ -w value -c value -h ] $_self [ -w value -c value -h ]
-w VALUE cpu usage warning level (default: 75) -w VALUE warning level for connectios total
-c VALUE cpu usage critical level (default: 90) -c VALUE critical level
-h or --help show this help. -h or --help show this help.
PARAMETERS: PARAMETERS:
None. None.
EXAMPLE: EXAMPLES:
$(basename $0) -w 60 -c 80 -p 40 $_self Show count of current connections
If there is no -w and -c then the result is always OK. If there is no -w and -c then the result is always OK.
$_self -w 400 -c 500
Show count of connections incl. limits for warning
and critical.
EOF EOF
} }
...@@ -69,8 +65,8 @@ case "$1" in ...@@ -69,8 +65,8 @@ case "$1" in
esac esac
# --- set optional limits # --- set optional limits
typeset -i iWarnLimit=$( ph.getValueWithParam 0 w "$@") typeset -i iWarnLimit; iWarnLimit=$( ph.getValueWithParam 0 w "$@")
typeset -i iCriticalLimit=$( ph.getValueWithParam 0 c "$@") typeset -i iCriticalLimit; iCriticalLimit=$( ph.getValueWithParam 0 c "$@")
# --- count all connections # --- count all connections
typeset -i iTotal=0 typeset -i iTotal=0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment