Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IML Open Source
icinga-checks
Commits
b5886cbc
Commit
b5886cbc
authored
Sep 01, 2022
by
Hahn Axel (hahn)
Browse files
cpu: allow help before check of requirements
parent
082bc8a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
check_cpu
View file @
b5886cbc
...
...
@@ -20,13 +20,14 @@
# 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-30 v1.12 <axel.hahn@iml.unibe.ch> allow help before check of requirements
# ======================================================================
.
$(
dirname
$0
)
/inc_pluginfunctions
self_APPNAME
=
$(
basename
$0
|
tr
[
:lower:]
[
:upper:]
)
self_APPVERSION
=
1.1
1
self_APPVERSION
=
1.1
2
# ----------------------------------------------------------------------
# functions
...
...
@@ -77,10 +78,6 @@ EOF
# MAIN
# ----------------------------------------------------------------------
# --- check required tools
ph.require bc top
# --- check param -h
case
"
$1
"
in
"--help"
|
"-h"
)
...
...
@@ -90,6 +87,9 @@ case "$1" in
*
)
esac
# --- check required tools
ph.require bc top
# ----------------------------------------------------------------------
# set default / override from command line params
typeset
-i
iWarnLimit
=
$(
ph.getValueWithParam 75 w
"
$@
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment