From 700ebf8421b78add9c5331b7acd012ea9bb3c5f9 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Fri, 14 Oct 2022 16:15:57 +0200 Subject: [PATCH] add docs --- check_cpu | 2 +- check_reboot_required | 4 +-- docs/20_Checks/check_reboot_required.md | 35 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 docs/20_Checks/check_reboot_required.md diff --git a/check_cpu b/check_cpu index 0f34408..d82a219 100755 --- a/check_cpu +++ b/check_cpu @@ -47,7 +47,7 @@ ______________________________________________________________________ check cpu usage and cpu wait Cpu infos are taken from output of top command. -Oh higher cpu usage it can show processes that cause cpu waits and +On higher cpu usage it can show processes that cause cpu waits and with most cpu consumption. SYNTAX: diff --git a/check_reboot_required b/check_reboot_required index 79609f7..327f0cc 100755 --- a/check_reboot_required +++ b/check_reboot_required @@ -43,7 +43,7 @@ It works for Centos and Debian/ Ubuntu. If the reboot is required: * On Centos it shows the kernel number that will be installed, -* On Debian7 Ubuntu it shows the packages that require the reboot, +* On Debian/ Ubuntu it shows the packages that require the reboot, SYNTAX: $(basename $0) @@ -76,7 +76,7 @@ case $distro in "centos") currentkernel=$(uname -r) - out=$(rpm -q --last kernel | head -1 | fgrep $currentkernel) + out=$(rpm -q --last kernel | head -1 | grep -F $currentkernel) if [ -z "$out" ]; then ph.setStatus "warning" ph.status "[$distro] need to reboot for kernel $(rpm -q --last kernel | head -1) (current: $currentkernel)" diff --git a/docs/20_Checks/check_reboot_required.md b/docs/20_Checks/check_reboot_required.md new file mode 100644 index 0000000..0acd157 --- /dev/null +++ b/docs/20_Checks/check_reboot_required.md @@ -0,0 +1,35 @@ +# Check Reboot required + +## Introduction + +Check if a reboot is required. +It works for Centos and Debian/ Ubuntu. + +If the reboot is required: + +* On Centos it shows the kernel number that will be installed, +* On Debian/ Ubuntu it shows the packages that require the reboot, + +## Syntax + +`$ check_reboot_required [-h]` + +### Parameters + +```text +OPTIONS: + + -h or --help show this help. + +PARAMETERS: + + None +``` + +## Examples + +`check_cronstatus` + The Check of cronjobs with the default loction does not require any parameter + +`check_cronstatus /usr/share/cronwrapper/cronstatus.sh` + The Check of cronjobs with custom loction. -- GitLab