Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / power5 / cpu_in_lpar @ 17f78427

Historique | Voir | Annoter | Télécharger (1,34 ko)

1
#!/bin/sh
2
#
3
# Copyright (C) 2006 Jens Schanz
4
#
5
# Plugin to monitor the potential and active processors for a 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-cpu_in_lpar.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 CPU in LPAR'
40
	echo 'graph_args -l 0'
41
	echo 'graph_category cpu'
42
	echo 'graph_vlabel CPUs in LPAR'
43
	echo 'graph_info This graph shows potential and active processors for a LPAR.'
44

    
45
	echo 'potentialLparCpu.label partition potential processors'
46
	echo 'activeLparCpu.label partition active processors'
47

    
48
	exit 0
49
fi
50

    
51
# let's do the main job
52

    
53
# get cpus in partition
54
echo -n "activeLparCpu.value "
55
cat $LPARCFG | grep partition_active_processors | awk -F = '{print $2}'
56
echo -n "potentialLparCpu.value "
57
cat $LPARCFG | grep partition_potential_processors | awk -F = '{print $2}'