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

add shell docs

parent af82ede5
No related branches found
No related tags found
1 merge request!146update doc page for ph.* functions
......@@ -393,9 +393,12 @@ function ph._perfinit(){
function ph._getperflabel(){
echo "$1" | tr [:upper:] [:lower:] | sed "s#[^a-z0-9\-]##g"
}
# get speed of change of a counter value
# param1: string variable name
# param2: integer value
# param string variable name
# param integer value
# param string unit to calculate a speed value per min or per sec; one of s|sec or m|min; default: "s"
# param string optional: flag to return a float value
function ph.perfdeltaspeed(){
local varName=$1
local value=$2
......@@ -453,6 +456,13 @@ function ph.perfdeltaspeed(){
#
# example
# ph.perfadd
#
# param string label
# param int|float your value
# param integer optional: warning level
# param integer optional: critical level
# param integer optional: min graph value
# param integer optional: max graph value
function ph.perfadd(){
if [ -z "$ph_perfdatafile" ]; then
ph._perfinit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment