Projet

Général

Profil

Révision e9f00b9d

IDe9f00b9ddd7dff936e0e605c089efa88934e8221
Parent f7d3bb25
Enfant a4fcd759

Ajouté par Paul M il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/hplog_t-a-hp-proliant-server-temperatures
1
#!/bin/bash
2

  
3
if [ "$1" == "config" ] ; then
4
	echo "graph_title HP server temperatures"
5
	echo "graph_vlabel celsius"
6
	echo "graph_category environment"
7
	echo "graph_info temperatures read using hpscan"
8
	echo "processor_zone.label Processor zone temperature"
9
	echo "io_zone.label I/O zone temperature"
10
	echo "processor0.label Processor 0 temperature"
11
	echo "processor1.label Processor 1 temperature"
12
	echo "psu_bay.label PSU bay temperature"
13
	exit 0
14
fi
15

  
16
#ID     TYPE        LOCATION      STATUS    CURRENT  THRESHOLD 
17
#1  ADM1022      Processor Zone  Normal   104F/ 40C 143F/ 62C 
18
#2  ADM1022      CPU (1)         Normal    96F/ 36C 163F/ 73C 
19
#3  ADM1022      I/O Zone        Normal   118F/ 48C 154F/ 68C 
20
#4  ADM1022      CPU (2)         Normal   127F/ 53C 163F/ 73C 
21
#5  ADM1022      Pwr. Supply Bay Normal    95F/ 35C 127F/ 53C 
22

  
23
CPUNUMBER=0
24

  
25
/sbin/hplog -t | ( while read a b c d e f g h i j k l m
26
do
27
	if [ "$c" == "Processor" ] ; then
28
		echo -n "processor_zone.value "
29
		echo $g | sed 's/C//'
30
	elif [ "$c" == "I/O" ] ; then
31
		echo -n "io_zone.value "
32
		echo $g | sed 's/C//'
33
	elif [ "$c" == "CPU" ] ; then
34
		echo -n "processor$CPUNUMBER.value "
35
		echo $g | sed 's/C//'
36
		CPUNUMBER=`expr $CPUNUMBER + 1`
37
	elif [ "$c" == "Pwr." ] ; then
38
		echo -n "psu_bay.value "
39
		echo $h | sed 's/C//'
40
	fi
41
	
42
done
43
)

Formats disponibles : Unified diff