mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
- have some dirs
This commit is contained in:
parent
0b089ea777
commit
08346aac58
687 changed files with 0 additions and 0 deletions
89
plugins/power5/consumed_cpu_cycles
Executable file
89
plugins/power5/consumed_cpu_cycles
Executable file
|
@ -0,0 +1,89 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2006 Jens Schanz
|
||||
#
|
||||
# Plugin to monitor the consumed CPU cycles of an uncapped LPAR
|
||||
# on a power5 system for linux
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
# $Log: lop5-consumed_cpu_cycles.sh,v $
|
||||
# Revision 1.1 2006/12/08 10:08:33 schanz
|
||||
# *** empty log message ***
|
||||
#
|
||||
#
|
||||
# Revision 1.0 20.11.2006 - first build
|
||||
#
|
||||
# If you have any suggestions, questions, or enhancements, feel free to email
|
||||
# me at mail@jensschanz.de
|
||||
#
|
||||
# Let's go ...
|
||||
#
|
||||
# Magick markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
LPARCFG=/proc/ppc64/lparcfg
|
||||
|
||||
# STATEFILE=/var/lib/munin/plugin-state/power5-consumed_cpu_cycles.state
|
||||
STATEFILE=/tmp/power5-consumed_cpu_cycles.state
|
||||
# check input parameters
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Consumed CPU cycles'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_category Power5'
|
||||
echo 'graph_vlabel CPU cycles'
|
||||
echo 'graph_info This graph shows the CPU cycles on an uncapped LPAR'
|
||||
|
||||
echo 'cpuCycles.label used CPU cycles'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# let's do the main job
|
||||
|
||||
# get cpus in partition
|
||||
unset LANG
|
||||
|
||||
# get actual time
|
||||
ACTUALTIME=`date +%s`;
|
||||
|
||||
# get old time
|
||||
if [ -f $STATEFILE ]; then
|
||||
OLDTIME=`cat $STATEFILE | grep OLDTIME | awk -F = '{print $2}'`;
|
||||
else
|
||||
echo "OLDTIME = $ACTUALTIME" > $STATEFILE;
|
||||
OLDTIME=$ACTUALTIME;
|
||||
fi
|
||||
|
||||
# get timebase
|
||||
TIMEBASE=`cat /proc/cpuinfo | grep timebase | awk -F : '{print $2}'`;
|
||||
|
||||
# get actual purr
|
||||
ACTUALPURR=`cat $LPARCFG| grep purr | awk -F = '{print $2}'`;
|
||||
|
||||
# get old purr
|
||||
if [ -f $STATEFILE ]; then
|
||||
OLDPURR=`cat $STATEFILE | grep OLDPURR | awk -F = '{print $2}'`;
|
||||
else
|
||||
echo "OLDPURR = $ACTUALPURR" >> $STATEFILE;
|
||||
OLDPURR=$ACTUALPURR;
|
||||
fi
|
||||
|
||||
# calcualte CPU cycles
|
||||
CPUCYCLES=$(echo $OLDPURR $ACTUALPURR $TIMEBASE $OLDTIME $ACTUALTIME | awk '{printf ("%.1f", (($1-$2)/$3)/($4-$5));}');
|
||||
|
||||
# write data to state file
|
||||
echo "OLDTIME = $ACTUALTIME" > $STATEFILE;
|
||||
echo "OLDPURR = $ACTUALPURR" >> $STATEFILE;
|
||||
|
||||
echo "cpuCycles.value $CPUCYCLES"
|
60
plugins/power5/cpu_entitlemens
Executable file
60
plugins/power5/cpu_entitlemens
Executable file
|
@ -0,0 +1,60 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2006 Jens Schanz
|
||||
#
|
||||
# Plugin to monitor the capacity entitlement
|
||||
# of the system in units of physical CPUs
|
||||
# on a power5 system for linux
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
# $Log: lop5-cpu_entitlement.sh,v $
|
||||
# Revision 1.1 2006/12/08 10:08:33 schanz
|
||||
# *** empty log message ***
|
||||
#
|
||||
#
|
||||
# Revision 1.0 20.11.2006 - first build
|
||||
#
|
||||
# If you have any suggestions, questions, or enhancements, feel free to email
|
||||
# me at mail@jensschanz.de
|
||||
#
|
||||
# Let's go ...
|
||||
#
|
||||
# Magick markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
LPARCFG=/proc/ppc64/lparcfg
|
||||
|
||||
# check input parameters
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title CPU entitlements'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_category Power5'
|
||||
echo 'graph_vlabel entitlements'
|
||||
echo 'graph_info This graph shows the actual and max entitlements for a LPAR'
|
||||
|
||||
echo 'entitlements.label entitlements'
|
||||
echo 'entitlementsMax.label max entitlements'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# let's do the main job
|
||||
|
||||
unset LANG
|
||||
|
||||
# get partition_entitled_capacity
|
||||
echo -n "entitlements.value "
|
||||
cat $LPARCFG | grep partition_entitled_capacity | awk -F = '{print $2}'
|
||||
|
||||
echo -n "entitlementsMax.value "
|
||||
cat $LPARCFG | grep partition_max_entitled_capacity | awk -F = '{print $2}'
|
57
plugins/power5/cpu_in_lpar
Executable file
57
plugins/power5/cpu_in_lpar
Executable file
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2006 Jens Schanz
|
||||
#
|
||||
# Plugin to monitor the potential and active processors for a LPAR
|
||||
# on a power5 system for linux
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
# $Log: lop5-cpu_in_lpar.sh,v $
|
||||
# Revision 1.1 2006/12/08 10:08:33 schanz
|
||||
# *** empty log message ***
|
||||
#
|
||||
#
|
||||
# Revision 1.0 20.11.2006 - first build
|
||||
#
|
||||
# If you have any suggestions, questions, or enhancements, feel free to email
|
||||
# me at mail@jensschanz.de
|
||||
#
|
||||
# Let's go ...
|
||||
#
|
||||
# Magick markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
LPARCFG=/proc/ppc64/lparcfg
|
||||
|
||||
# check input parameters
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title CPU in LPAR'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_category Power5'
|
||||
echo 'graph_vlabel CPUs in LPAR'
|
||||
echo 'graph_info This graph shows potential and active processors for a LPAR.'
|
||||
|
||||
echo 'potentialLparCpu.label partition potential processors'
|
||||
echo 'activeLparCpu.label partition active processors'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# let's do the main job
|
||||
|
||||
# get cpus in partition
|
||||
echo -n "activeLparCpu.value "
|
||||
cat $LPARCFG | grep partition_active_processors | awk -F = '{print $2}'
|
||||
echo -n "potentialLparCpu.value "
|
||||
cat $LPARCFG | grep partition_potential_processors | awk -F = '{print $2}'
|
56
plugins/power5/weight_of_a_lpar
Executable file
56
plugins/power5/weight_of_a_lpar
Executable file
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2006 Jens Schanz
|
||||
#
|
||||
# Plugin to monitor the weight of an uncapped LPAR
|
||||
# on a power5 system for linux
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# config (required)
|
||||
# autoconf (optional - used by munin-config)
|
||||
#
|
||||
# $Log: lop5-weight.sh,v $
|
||||
# Revision 1.1 2006/12/08 10:08:33 schanz
|
||||
# *** empty log message ***
|
||||
#
|
||||
#
|
||||
# Revision 1.0 20.11.2006 - first build
|
||||
#
|
||||
# If you have any suggestions, questions, or enhancements, feel free to email
|
||||
# me at mail@jensschanz.de
|
||||
#
|
||||
# Let's go ...
|
||||
#
|
||||
# Magick markers (optional - used by munin-config and some installation
|
||||
# scripts):
|
||||
#%# family=auto
|
||||
#%# capabilities=autoconf
|
||||
|
||||
LPARCFG=/proc/ppc64/lparcfg
|
||||
|
||||
# check input parameters
|
||||
if [ "$1" = "autoconf" ]; then
|
||||
echo yes
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo 'graph_title Weight of an uncapped LPAR'
|
||||
echo 'graph_args -l 0'
|
||||
echo 'graph_category Power5'
|
||||
echo 'graph_vlabel Weight of LPAR'
|
||||
echo 'graph_info This graph shows the weight of an uncapped LPAR'
|
||||
echo 'weight.min 0'
|
||||
echo 'weight.max 255'
|
||||
|
||||
echo 'LparWeight.label weight'
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# let's do the main job
|
||||
|
||||
# get cpus in partition
|
||||
echo -n "LparWeight.value "
|
||||
cat $LPARCFG | grep capacity_weight | grep -v unallocated_capacity_weight | awk -F = '{print $2}'
|
Loading…
Add table
Add a link
Reference in a new issue