Révision 1e85a671
Initial version
| plugins/other/weight_of_a_lpar | ||
|---|---|---|
| 1 |
#!/bin/sh |
|
| 2 |
# |
|
| 3 |
# Copyright (C) 2006 Jens Schanz |
|
| 4 |
# |
|
| 5 |
# Plugin to monitor the weight of an uncapped LPAR |
|
| 6 |
# on a power5 system for linux |
|
| 7 |
# |
|
| 8 |
# Parameters: |
|
| 9 |
# |
|
| 10 |
# config (required) |
|
| 11 |
# autoconf (optional - used by munin-config) |
|
| 12 |
# |
|
| 13 |
# $Log: lop5-weight.sh,v $ |
|
| 14 |
# Revision 1.1 2006/12/08 10:08:33 schanz |
|
| 15 |
# *** empty log message *** |
|
| 16 |
# |
|
| 17 |
# |
|
| 18 |
# Revision 1.0 20.11.2006 - first build |
|
| 19 |
# |
|
| 20 |
# If you have any suggestions, questions, or enhancements, feel free to email |
|
| 21 |
# me at mail@jensschanz.de |
|
| 22 |
# |
|
| 23 |
# Let's go ... |
|
| 24 |
# |
|
| 25 |
# Magick markers (optional - used by munin-config and some installation |
|
| 26 |
# scripts): |
|
| 27 |
#%# family=auto |
|
| 28 |
#%# capabilities=autoconf |
|
| 29 |
|
|
| 30 |
LPARCFG=/proc/ppc64/lparcfg |
|
| 31 |
|
|
| 32 |
# check input parameters |
|
| 33 |
if [ "$1" = "autoconf" ]; then |
|
| 34 |
echo yes |
|
| 35 |
exit 0 |
|
| 36 |
fi |
|
| 37 |
|
|
| 38 |
if [ "$1" = "config" ]; then |
|
| 39 |
echo 'graph_title Weight of an uncapped LPAR' |
|
| 40 |
echo 'graph_args -l 0' |
|
| 41 |
echo 'graph_category Power5' |
|
| 42 |
echo 'graph_vlabel Weight of LPAR' |
|
| 43 |
echo 'graph_info This graph shows the weight of an uncapped LPAR' |
|
| 44 |
echo 'weight.min 0' |
|
| 45 |
echo 'weight.max 255' |
|
| 46 |
|
|
| 47 |
echo 'LparWeight.label weight' |
|
| 48 |
|
|
| 49 |
exit 0 |
|
| 50 |
fi |
|
| 51 |
|
|
| 52 |
# let's do the main job |
|
| 53 |
|
|
| 54 |
# get cpus in partition |
|
| 55 |
echo -n "LparWeight.value " |
|
| 56 |
cat $LPARCFG | grep capacity_weight | grep -v unallocated_capacity_weight | awk -F = '{print $2}'
|
|
Formats disponibles : Unified diff