Projet

Général

Profil

Révision 6d1acea4

ID6d1acea4dc1031c52afb24ce609f079f40cb39f2
Parent b096ad6d
Enfant a08b091c

Ajouté par Jens Schanz il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/cpu_entitlemens
1
#!/bin/sh
2
#
3
# Copyright (C) 2006 Jens Schanz
4
#
5
# Plugin to monitor the capacity entitlement
6
# of the system in units of physical CPUs
7
# on a power5 system for linux
8
#
9
# Parameters:
10
#
11
#       config   (required)
12
#       autoconf (optional - used by munin-config)
13
#
14
# $Log: lop5-cpu_entitlement.sh,v $
15
# Revision 1.1  2006/12/08 10:08:33  schanz
16
# *** empty log message ***
17
#
18
#
19
# Revision 1.0  20.11.2006 - first build
20
#
21
# If you have any suggestions, questions, or enhancements, feel free to email
22
# me at mail@jensschanz.de
23
#
24
# Let's go ...
25
#
26
# Magick markers (optional - used by munin-config and some installation
27
# scripts):
28
#%# family=auto
29
#%# capabilities=autoconf
30

  
31
LPARCFG=/proc/ppc64/lparcfg
32

  
33
# check input parameters
34
if [ "$1" = "autoconf" ]; then
35
	echo yes
36
	exit 0
37
fi
38

  
39
if [ "$1" = "config" ]; then
40
	echo 'graph_title CPU entitlements'
41
	echo 'graph_args -l 0'
42
	echo 'graph_category Power5'
43
	echo 'graph_vlabel entitlements'
44
	echo 'graph_info This graph shows the actual and max entitlements for a LPAR'
45

  
46
	echo 'entitlements.label entitlements'
47
	echo 'entitlementsMax.label max entitlements'
48
	exit 0
49
fi
50

  
51
# let's do the main job
52

  
53
unset LANG
54

  
55
# get partition_entitled_capacity
56
echo -n "entitlements.value "
57
cat $LPARCFG | grep partition_entitled_capacity | awk -F = '{print $2}'
58

  
59
echo -n "entitlementsMax.value "
60
cat $LPARCFG | grep partition_max_entitled_capacity | awk -F = '{print $2}'

Formats disponibles : Unified diff