Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
icinga-checks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
icinga-checks
Commits
32355b01
Commit
32355b01
authored
3 years ago
by
Hahn Axel (hahn)
Browse files
Options
Downloads
Patches
Plain Diff
check_cpu: show processes with status D to find cpu waits
parent
48c29f08
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_cpu
+9
-1
9 additions, 1 deletion
check_cpu
with
9 additions
and
1 deletion
check_cpu
+
9
−
1
View file @
32355b01
...
...
@@ -14,6 +14,7 @@
# 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
# ======================================================================
...
...
@@ -28,7 +29,7 @@ function showHelp(){
cat
<<
EOF
______________________________________________________________________
CHECK_CPU check cpu usage and cpu wait v1.
5
CHECK_CPU check cpu usage and cpu wait v1.
6
(c) Institute for Medical Education - Univerity of Bern
Licence: GNU GPL 3
...
...
@@ -127,6 +128,13 @@ fi
# --- status output
ph.status
"CPU-USAGE [%]
${
cpuNonIdle
}
... user:
${
cpuUser
}
- system:
${
cpuSystem
}
- idle:
${
cpuIdle
}
- wait:
${
cpuWait
}
"
# v1.6: show processes of cpu wait (status D in proces list)
plist
=
$(
ps aux |
awk
'$8 ~ /(D|STAT)/ { print $0 }'
)
echo
"
$plist
"
|
grep
"[0-9]"
>
/dev/null
\
&&
echo
\
&&
echo
"For analysis of cpu waits - processes with status D:"
\
&&
echo
"
$plist
"
echo
"
Limits: usage warn at
${
iWarnLimit
}
.. critical at
${
iCriticalLimit
}
.. io wait limit
${
iCriticalWait
}
$sInfo
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment