Révision 4e3ef5b9
ipmi: remove the multiple IPMI plugins and simply introduce my FreeIPMI plugin.
This is a catch-all that will work with any recent FreeIPMI and
actually supports all the features of the others.
| plugins/ipmi/freeipmi_ | ||
|---|---|---|
| 1 |
#!/usr/bin/python |
|
| 2 |
# |
|
| 3 |
# Copyright (C) 2011,2012 Andreas Thienemann <andreas@bawue.net> |
|
| 4 |
# |
|
| 5 |
# This program is free software: you can redistribute it and/or modify |
|
| 6 |
# it under the terms of the GNU General Public License as published by |
|
| 7 |
# the Free Software Foundation, either version 3 of the License, or |
|
| 8 |
# (at your option) any later version. |
|
| 9 |
# |
|
| 10 |
# This program is distributed in the hope that it will be useful, |
|
| 11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 13 |
# GNU General Public License for more details. |
|
| 14 |
# |
|
| 15 |
# You should have received a copy of the GNU General Public License |
|
| 16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
| 17 |
# |
|
| 18 |
|
|
| 19 |
""" |
|
| 20 |
=head1 NAME |
|
| 1 |
#!/bin/sh |
|
| 2 |
# -*- sh -*- |
|
| 21 | 3 |
|
| 22 |
freeipmi_ - Munin plugin to retreive temperature and fan speed measurements |
|
| 23 |
from a local machine via IPMI. |
|
| 4 |
: << =cut |
|
| 24 | 5 |
|
| 25 |
=head1 APPLICABLE SYSTEMS
|
|
| 6 |
=head1 NAME
|
|
| 26 | 7 |
|
| 27 |
All machines with an IPMI capable baseboard management controller.
|
|
| 8 |
freeipmi_ - Plugin to monitor temperature or fan speed using FreeIPMI
|
|
| 28 | 9 |
|
| 29 | 10 |
=head1 CONFIGURATION |
| 30 | 11 |
|
| 31 |
On most supported systems this plugin works nearly out of the box as long as |
|
| 32 |
both Python and the freeipmi binaries in a semi-recent version are installed. |
|
| 33 |
|
|
| 34 |
If the machine works out of the box can be tested by calling bmc-info. |
|
| 35 |
If there's text output, a bmc card was detected. If there's an entry for |
|
| 36 |
"Sensor Device" visible in the "Additional Device Support" entry you're good. |
|
| 37 |
|
|
| 38 |
If you get a "ipmi_cmd_get_device_id: driver timeout" message you have most |
|
| 39 |
likely no bmc to query. |
|
| 40 |
|
|
| 41 |
In certain cases however bmc-info will just seem to hang for quite some time. |
|
| 42 |
In this case, autodetection does not work because the smbios table has |
|
| 43 |
incorrect information. One system known to experience this problem is the |
|
| 44 |
HP Proliant Microserver. |
|
| 45 |
|
|
| 46 |
Adding env.freeipmi_args "--no-probing --driver-type=KCS --driver-address=0xca2 --register-spacing=1" |
|
| 47 |
to the munin plugin configuration will make the plugin work. This is the |
|
| 48 |
specific line for the HP Proliant Microserver mentioned above. Your mileage |
|
| 49 |
may vary. |
|
| 50 |
|
|
| 51 |
Basic configuration for every system is that the plugin needs to be called as root. |
|
| 52 |
|
|
| 53 |
Add the following to your /etc/munin/plugin-conf.d/freeipmi: |
|
| 12 |
=head2 ENVIRONMENT VARIABLES |
|
| 54 | 13 |
|
| 55 |
[freeipmi_*]
|
|
| 56 |
user root
|
|
| 14 |
When used to monitor a foreign host, this plugins use the variables
|
|
| 15 |
IPMI_USERNAME and IPMI_PASSWORD to log in on the remote system.
|
|
| 57 | 16 |
|
| 58 |
=head1 INTERPRETATION
|
|
| 17 |
=head2 WILDCARD PLUGIN
|
|
| 59 | 18 |
|
| 60 |
The plugin shows the temperature in Celsius or the fanspeed in rotations per minute. |
|
| 19 |
You can monitor either the current system (via /dev/ipmi0 and the |
|
| 20 |
like) or a remote system (via the LAN protocols), and for each of the |
|
| 21 |
two options you can select your sensors: |
|
| 61 | 22 |
|
| 62 |
=head1 MAGIC MARKERS |
|
| 63 |
|
|
| 64 |
#%# family=contrib |
|
| 65 |
#%# capabilities=autoconf suggest |
|
| 66 |
|
|
| 67 |
=head1 VERSION |
|
| 68 |
|
|
| 69 |
0.0.1 |
|
| 23 |
- fans; |
|
| 24 |
- temp; |
|
| 25 |
- power; |
|
| 26 |
- current; |
|
| 27 |
- voltage. |
|
| 70 | 28 |
|
| 71 |
=head1 BUGS |
|
| 29 |
When used for the local host, the plugin should be linked as, e.g., |
|
| 30 |
'ipmi_temp', whereas when used to monitor a foreign host it should be, |
|
| 31 |
e.g., 'ipmi_192.168.0.253_temp'. |
|
| 72 | 32 |
|
| 73 |
Only local support for now. Remote could be hacked in via freeipmi_args for now.
|
|
| 33 |
=head1 NOTE
|
|
| 74 | 34 |
|
| 75 | 35 |
=head1 AUTHOR |
| 76 | 36 |
|
| 77 |
Andreas Thienemann <andreas@bawue.net> |
|
| 37 |
Rewritten by Diego Elio Pettenò <flameeyes@flameeyes.eu>. |
|
| 38 |
Based on the work of Nicolai Langfeldt <janl@linpro.no>, Logilab and |
|
| 39 |
Peter Palfrader. |
|
| 78 | 40 |
|
| 79 | 41 |
=head1 LICENSE |
| 80 | 42 |
|
| 81 |
GPLv3+ |
|
| 43 |
GPLv2 |
|
| 44 |
|
|
| 45 |
=head1 MAGIC MARKERS |
|
| 46 |
|
|
| 47 |
#%# family=auto |
|
| 48 |
#%# capabilities=autoconf suggest |
|
| 82 | 49 |
|
| 83 | 50 |
=cut |
| 84 |
""" |
|
| 85 |
|
|
| 86 |
import subprocess |
|
| 87 |
import sys |
|
| 88 |
import os |
|
| 89 |
import re |
|
| 90 |
import pprint |
|
| 91 |
|
|
| 92 |
# Parse some environment variables |
|
| 93 |
if os.getenv("freeipmi_args") is not None:
|
|
| 94 |
freeipmi_args = " %s" % (os.getenv("freeipmi_args"))
|
|
| 95 |
else: |
|
| 96 |
freeipmi_args = "" |
|
| 97 |
|
|
| 98 |
# We are a wildcard plugin, figure out whether we are called for temp or fan |
|
| 99 |
if sys.argv[0].split("_")[1] == "temp":
|
|
| 100 |
mode = "Temperature" |
|
| 101 |
elif sys.argv[0].split("_")[1] == "fan":
|
|
| 102 |
mode = "Fan" |
|
| 103 |
else: |
|
| 104 |
mode = None |
|
| 105 |
|
|
| 106 |
def whereis(prog): |
|
| 107 |
"""Check if prog can be found in the path and if yes, return the full pathname""" |
|
| 108 |
prog = os.path.basename(prog) |
|
| 109 |
for dir in os.getenv("PATH").split(":"):
|
|
| 110 |
for root, dirs, files in os.walk(dir): |
|
| 111 |
if prog in files: |
|
| 112 |
return os.path.join(dir, prog) |
|
| 113 |
return None |
|
| 114 |
|
|
| 115 |
def normalize_sensor(name): |
|
| 116 |
name = name.lower().replace("-","M").replace("+","P")
|
|
| 117 |
name = re.sub("[^a-z0-9A-Z]","_", name)
|
|
| 118 |
return name |
|
| 119 |
|
|
| 120 |
# Code sniplet from Philipp Keller |
|
| 121 |
# http://code.pui.ch/2007/02/19/set-timeout-for-a-shell-command-in-python/ |
|
| 122 |
def timeout_command(command, timeout): |
|
| 123 |
"""call shell-command and either return its output or kill it |
|
| 124 |
if it doesn't normally exit within timeout seconds and return None""" |
|
| 125 |
import subprocess, datetime, os, time, signal |
|
| 126 |
start = datetime.datetime.now() |
|
| 127 |
process = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
|
| 128 |
while process.poll() is None: |
|
| 129 |
time.sleep(0.1) |
|
| 130 |
now = datetime.datetime.now() |
|
| 131 |
if (now - start).seconds> timeout: |
|
| 132 |
os.kill(process.pid, signal.SIGKILL) |
|
| 133 |
os.waitpid(-1, os.WNOHANG) |
|
| 134 |
return None |
|
| 135 |
return process.stdout.read() |
|
| 136 |
|
|
| 137 |
def bmc_detect(): |
|
| 138 |
"""Check whether there's a baseboard management controller we can query.""" |
|
| 139 |
if whereis("bmc-info") is None:
|
|
| 140 |
print "no (bmc-info not found in path. Please install FreeIPMI.)" |
|
| 141 |
sys.exit(0) |
|
| 142 |
else: |
|
| 143 |
out = timeout_command("bmc-info%s" % (freeipmi_args), 2)
|
|
| 144 |
if out is not None and "[Sensor Device]" in out: |
|
| 145 |
print "yes" |
|
| 146 |
sys.exit(0) |
|
| 147 |
else: |
|
| 148 |
print "no (no supported bmc found)" |
|
| 149 |
sys.exit(0) |
|
| 150 |
|
|
| 151 |
def read_sensors(): |
|
| 152 |
"""Return all sensor data as a dict""" |
|
| 153 |
out = timeout_command("ipmi-sensors --verbose%s" % (freeipmi_args), 2)
|
|
| 154 |
sensors = dict() |
|
| 155 |
sensor = dict() |
|
| 156 |
sensor_id = None |
|
| 157 |
for line in out.split("\n"):
|
|
| 158 |
if ":" in line: |
|
| 159 |
k,v = line.split(": ")
|
|
| 160 |
if k == "Record ID": |
|
| 161 |
sensor = dict() |
|
| 162 |
sensor_id = int(v) |
|
| 163 |
sensor[k] = v |
|
| 164 |
else: |
|
| 165 |
sensor[k] = v |
|
| 166 |
else: |
|
| 167 |
sensors[sensor_id] = sensor |
|
| 168 |
return sensors |
|
| 169 |
|
|
| 170 |
def print_config(): |
|
| 171 |
"""Return configuration arguments for munin""" |
|
| 172 |
print "graph_title FreeIPMI Sensors: %s" % (mode) |
|
| 173 |
if mode == "Fan": |
|
| 174 |
print "graph_vlabel RPM" |
|
| 175 |
print "graph_info This graph shows the RPMs of the fans as reported by IPMI" |
|
| 176 |
elif mode == "Temperature": |
|
| 177 |
print "graph_vlabel Degrees C" |
|
| 178 |
print "graph_info This graph shows the temperatures as reported by IPMI" |
|
| 179 |
print "graph_category sensors" |
|
| 180 |
sensors = read_sensors() |
|
| 181 |
|
|
| 182 |
for id in sorted(sensors): |
|
| 183 |
if sensors[id]["Group Name"] == mode: |
|
| 184 |
label = normalize_sensor(sensors[id]["Sensor Name"]) |
|
| 185 |
for n in ["Normal Max.", "Normal Min.", "Sensor Reading", "Lower Critical Threshold", "Upper Critical Threshold", "Lower Non-Critical Threshold", "Upper Non-Critical Threshold"]: |
|
| 186 |
sensors[id][n] = sensors[id][n].replace("NA","")
|
|
| 187 |
sensors[id][n] = sensors[id][n].split('.')[0]
|
|
| 188 |
|
|
| 189 |
print "%s.label %s" % (label, label) |
|
| 190 |
print "%s.warning %s:%s" % (label, sensors[id]["Lower Non-Critical Threshold"], sensors[id]["Upper Non-Critical Threshold"]) |
|
| 191 |
print "%s.critical %s:%s" % (label, sensors[id]["Lower Critical Threshold"], sensors[id]["Upper Critical Threshold"]) |
|
| 192 |
print "%s.graph_args --base 1000 -l 0" % (label) |
|
| 193 |
print "%s.graph_scale no" % (label) |
|
| 194 |
# pprint.pprint(sensors[id]) |
|
| 195 |
sys.exit(0) |
|
| 196 |
|
|
| 197 |
def fetch(): |
|
| 198 |
sensors = read_sensors() |
|
| 199 |
|
|
| 200 |
for id in sorted(sensors): |
|
| 201 |
if sensors[id]["Group Name"] == mode: |
|
| 202 |
label = normalize_sensor(sensors[id]["Sensor Name"]) |
|
| 203 |
print "%s.value %s" % (label, sensors[id]["Sensor Reading"].split(".")[0])
|
|
| 204 |
sys.exit(0) |
|
| 205 |
|
|
| 206 |
|
|
| 207 |
if "config" in sys.argv[1:]: |
|
| 208 |
print_config() |
|
| 209 |
|
|
| 210 |
elif "autoconf" in sys.argv[1:]: |
|
| 211 |
bmc_detect() |
|
| 212 |
|
|
| 213 |
elif "suggest" in sys.argv[1:]: |
|
| 214 |
sensors = read_sensors() |
|
| 215 |
fan, temperature = [0, 0] |
|
| 216 |
for id in sensors: |
|
| 217 |
if sensors[id]["Group Name"] == "Fan": |
|
| 218 |
fan += 1 |
|
| 219 |
elif sensors[id]["Group Name"] == "Temperature": |
|
| 220 |
temperature += 1 |
|
| 221 |
if fan > 0: |
|
| 222 |
print "fan" |
|
| 223 |
if temperature > 0: |
|
| 224 |
print "temp" |
|
| 225 |
sys.exit(0) |
|
| 226 |
|
|
| 227 |
else: |
|
| 228 |
fetch() |
|
| 51 |
|
|
| 52 |
#### Parse commandline to determine what the job is |
|
| 53 |
|
|
| 54 |
_ipmisensors() {
|
|
| 55 |
params="--quiet-cache --comma-separated-output --no-header-output --ignore-not-available-sensors" |
|
| 56 |
if [ "x${hostname}" != "x" ]; then
|
|
| 57 |
params="${params} --hostname=${hostname}"
|
|
| 58 |
[ "x${IPMI_USERNAME}" != "x" ] && params="${params} --username=${IPMI_USERNAME}"
|
|
| 59 |
[ "x${IPMI_PASSWORD}" != "x" ] && params="${params} --password=${IPMI_PASSWORD}"
|
|
| 60 |
fi |
|
| 61 |
|
|
| 62 |
if ! ipmi-sensors ${params} --output-sensor-thresholds "$@"; then
|
|
| 63 |
ipmi-sensors ${params} "$@"
|
|
| 64 |
fi |
|
| 65 |
} |
|
| 66 |
|
|
| 67 |
# extract and eventual hostname out of the called name; we |
|
| 68 |
# have to check whether it's set to "u" as that's what happens |
|
| 69 |
# when the compatibility with ipmi_sensor_ is used. |
|
| 70 |
hostname1=${0#*_}
|
|
| 71 |
hostname=${hostname1%%_*}
|
|
| 72 |
if [ "x${hostname}" = "xu" -o "x${hostname}" = "x${hostname1}" ]; then
|
|
| 73 |
hostname="" |
|
| 74 |
fi |
|
| 75 |
|
|
| 76 |
case $0 in |
|
| 77 |
*_temp|*_u_degrees_c) |
|
| 78 |
title="Temperatures" |
|
| 79 |
vlabel="degrees Celsius" |
|
| 80 |
type=Temperature |
|
| 81 |
unit=C |
|
| 82 |
;; |
|
| 83 |
*_fans|*_u_rpm) |
|
| 84 |
title="Fan speeds" |
|
| 85 |
vlabel="Rotations per Minute (RPM)" |
|
| 86 |
type=Fan |
|
| 87 |
unit=RPM |
|
| 88 |
;; |
|
| 89 |
*_power|*_u_watts) |
|
| 90 |
title="Power consumption" |
|
| 91 |
vlabel="Watts" |
|
| 92 |
type=Current |
|
| 93 |
unit=W |
|
| 94 |
;; |
|
| 95 |
*_current|*_u_amps) |
|
| 96 |
title="Current drain" |
|
| 97 |
vlabel="Amperes" |
|
| 98 |
type=Current |
|
| 99 |
unit=A |
|
| 100 |
;; |
|
| 101 |
*_voltage|*_u_volts) |
|
| 102 |
title="Voltages" |
|
| 103 |
vlabel="Volts" |
|
| 104 |
type=Voltage |
|
| 105 |
unit=V |
|
| 106 |
;; |
|
| 107 |
*) |
|
| 108 |
if [ x"$1" != x"autoconf" -a x"$1" != x"suggest" ]; then |
|
| 109 |
echo "Please invoke as one of the supported sensors types:" >&2 |
|
| 110 |
echo freeipmi_{temp,fans,power,current} >&2
|
|
| 111 |
exit 1 |
|
| 112 |
fi |
|
| 113 |
esac |
|
| 114 |
|
|
| 115 |
case $1 in |
|
| 116 |
autoconf) |
|
| 117 |
if ! command -v ipmi-sensors >/dev/null 2>&1 ; then |
|
| 118 |
echo 'no (missing ipmi-sensors command)' |
|
| 119 |
exit 0 |
|
| 120 |
fi |
|
| 121 |
|
|
| 122 |
if ! _ipmisensors -t OS_Boot >/dev/null 2>&1 ; then |
|
| 123 |
echo 'no (unable to access IPMI device)' |
|
| 124 |
exit 0 |
|
| 125 |
fi |
|
| 126 |
|
|
| 127 |
echo yes |
|
| 128 |
exit 0 |
|
| 129 |
;; |
|
| 130 |
suggest) |
|
| 131 |
_ipmisensors | awk -F, ' |
|
| 132 |
$3 == "Temperature" { print "temp"; }
|
|
| 133 |
$3 == "Fan" { print "fans"; }
|
|
| 134 |
$3 == "Current" && $5 == "W" { print "power"; }
|
|
| 135 |
$3 == "Current" && $5 == "A" { print "current"; }
|
|
| 136 |
$3 == "Voltage" { print "voltage"; }
|
|
| 137 |
' |
|
| 138 |
exit 0;; |
|
| 139 |
config) |
|
| 140 |
cat - <<EOF |
|
| 141 |
graph_title ${title} based on IPMI sensors
|
|
| 142 |
graph_vlabel ${vlabel}
|
|
| 143 |
graph_category Sensors |
|
| 144 |
EOF |
|
| 145 |
|
|
| 146 |
if [ "x${hostname}" != "x" ]; then
|
|
| 147 |
echo "host_name ${hostname}"
|
|
| 148 |
fi |
|
| 149 |
;; |
|
| 150 |
esac |
|
| 151 |
|
|
| 152 |
_ipmisensors -t ${type} | awk -F, -v CONFIG=$1 -v UNIT=$unit '
|
|
| 153 |
$5 == UNIT {
|
|
| 154 |
if ( CONFIG != "config" ) {
|
|
| 155 |
printf("ipmi%s.value %s\n", $1, $4);
|
|
| 156 |
} else {
|
|
| 157 |
printf("ipmi%s.label %s\n", $1, $2);
|
|
| 158 |
|
|
| 159 |
# This can only happen if FreeIPMI is new enough |
|
| 160 |
if ( NF == 12 ) {
|
|
| 161 |
if ( $8 != "N/A" && $10 != "N/A" ) |
|
| 162 |
printf("ipmi%s.warning %s:%s\n", $1, $8, $10);
|
|
| 163 |
else if ( $8 == "N/A" && $10 != "N/A" ) |
|
| 164 |
printf("ipmi%s.warning :%s\n", $1, $10);
|
|
| 165 |
else if ( $8 != "N/A" && $10 == "N/A" ) |
|
| 166 |
printf("ipmi%s.warning %s:\n", $1, $8);
|
|
| 167 |
|
|
| 168 |
if ( $7 != "N/A" && $11 != "N/A" ) |
|
| 169 |
printf("ipmi%s.critical %s:%s\n", $1, $7, $11);
|
|
| 170 |
else if ( $7 == "N/A" && $11 != "N/A" ) |
|
| 171 |
printf("ipmi%s.critical :%s\n", $1, $11);
|
|
| 172 |
else if ( $7 != "N/A" && $11 == "N/A" ) |
|
| 173 |
printf("ipmi%s.critical %s:\n", $1, $7);
|
|
| 174 |
} |
|
| 175 |
} |
|
| 176 |
} |
|
| 177 |
' |
|
| 178 |
|
|
| 179 |
# vim: syntax=sh ts=4 et |
|
| plugins/ipmi/ipmi_ | ||
|---|---|---|
| 1 |
#!/usr/bin/env python |
|
| 2 |
from commands import getstatusoutput as gso |
|
| 3 |
|
|
| 4 |
def safe(s): |
|
| 5 |
s=s.replace("-", "_")
|
|
| 6 |
s=s.replace(" ", "_")
|
|
| 7 |
s=s.replace(".", "_")
|
|
| 8 |
return s |
|
| 9 |
|
|
| 10 |
def config(data,title): |
|
| 11 |
for i in data: |
|
| 12 |
print "%s.label %s"%(safe(i[0]), i[0]) |
|
| 13 |
|
|
| 14 |
# check for non-critical thresholds |
|
| 15 |
if i[6] != 'na': |
|
| 16 |
if i[7] != 'na': |
|
| 17 |
warning = "%s:%s"%(i[6],i[7]) |
|
| 18 |
else: |
|
| 19 |
warning = "%s:"%i[6] |
|
| 20 |
else: |
|
| 21 |
if i[7] != 'na': |
|
| 22 |
warning = "%s"%i[7] |
|
| 23 |
else: |
|
| 24 |
warning = "" |
|
| 25 |
if warning: |
|
| 26 |
print "%s.warning %s"%(safe(i[0]),warning) |
|
| 27 |
|
|
| 28 |
# check for critical thresholds |
|
| 29 |
if i[5] == 'na': |
|
| 30 |
i[5] == i[4] # N/A, so see if there is a non-recoverable threshold |
|
| 31 |
if i[8] == 'na': |
|
| 32 |
i[8] == i[9] # N/A, so see if there is a non-recoverable threshold |
|
| 33 |
if i[5] != 'na': |
|
| 34 |
if i[8] != 'na': |
|
| 35 |
critical = "%s:%s"%(i[5],i[8]) |
|
| 36 |
else: |
|
| 37 |
critical = "%s:"%i[5] |
|
| 38 |
else: |
|
| 39 |
if i[8] != 'na': |
|
| 40 |
critical = "%s"%i[8] |
|
| 41 |
else: |
|
| 42 |
critical = "" |
|
| 43 |
if critical: |
|
| 44 |
print "%s.critical %s"%(safe(i[0]),critical) |
|
| 45 |
|
|
| 46 |
print "graph_title %s"%title |
|
| 47 |
if title == "Voltages": |
|
| 48 |
print "graph_args -X 0 --logarithmic -l 1 -u 15" |
|
| 49 |
#print "graph_args --base 1000 --logarithmic" |
|
| 50 |
else: |
|
| 51 |
print "graph_args -l 0" |
|
| 52 |
print "graph_vlabel %s"%i[2] |
|
| 53 |
print "graph_period minute" |
|
| 54 |
print "graph_category IPMI" |
|
| 55 |
|
|
| 56 |
def get_data(): |
|
| 57 |
import sys |
|
| 58 |
category = sys.argv[0].split("_",1)[1]
|
|
| 59 |
data = [] |
|
| 60 |
if category =="Fans": |
|
| 61 |
ids = ("Fan 1 Tach", "Fan 2 Tach", "Fan 3 Tach",
|
|
| 62 |
"Fan 4 Tach", "Fan 5 Tach", "Fan 6 Tach",) |
|
| 63 |
title = "Fan Speed" |
|
| 64 |
elif category == "Temperature": |
|
| 65 |
ids = ("Ambient Temp", "Memory Temp",)
|
|
| 66 |
title = "Temperatures" |
|
| 67 |
elif category == "Voltage": |
|
| 68 |
ids = ("Planar 1.5V", "Planar 1.8V",
|
|
| 69 |
"Planar 3.3V", "Planar 5V", "Planar 12V", |
|
| 70 |
"Planar VBAT", "CPU 1 VCore", "CPU 2 VCore",) |
|
| 71 |
title = "Voltages" |
|
| 72 |
|
|
| 73 |
status, output = gso("ipmitool sensor")
|
|
| 74 |
for row in output.split("\n"):
|
|
| 75 |
items = map(str.strip,row.split("|"))
|
|
| 76 |
field,value,units,status,lower_nonrecoverable,lower_critical,lower_non_critical,upper_non_critical,upper_critical,upper_nonrecoverable=items |
|
| 77 |
if field in ids: |
|
| 78 |
if value == 'na': continue |
|
| 79 |
data.append(items) |
|
| 80 |
return data,title |
|
| 81 |
|
|
| 82 |
def sample(data): |
|
| 83 |
for i in data: |
|
| 84 |
print "%s.value %s"%(safe(i[0]),i[1]) |
|
| 85 |
|
|
| 86 |
def main(): |
|
| 87 |
import sys |
|
| 88 |
data,title = get_data() |
|
| 89 |
if 'config' in sys.argv: |
|
| 90 |
return config(data,title) |
|
| 91 |
sample(data) |
|
| 92 |
|
|
| 93 |
if __name__ == '__main__': |
|
| 94 |
main() |
|
| 95 |
|
|
| plugins/ipmi/ipmi_fans | ||
|---|---|---|
| 1 |
#! /usr/bin/perl -w |
|
| 2 |
# |
|
| 3 |
# This plugin will graph the chassis fan speed on a Dell PowerEdge Server |
|
| 4 |
# via the ipmi-sensors tool. It has been tested on the following chassis: |
|
| 5 |
# |
|
| 6 |
# PE1850 |
|
| 7 |
# |
|
| 8 |
# To enable: |
|
| 9 |
# |
|
| 10 |
# ln -s /usr/share/munin/plugins/ipmi-fans /etc/munin/plugins/ipmi-fans |
|
| 11 |
# |
|
| 12 |
# Configuration parameters for /etc/munin/plugin-conf.d/munin-node |
|
| 13 |
# |
|
| 14 |
# [ipmi_fans] |
|
| 15 |
# user - User that has permissions to run the omreport binary |
|
| 16 |
# env.omreport - Path to the omreport binary |
|
| 17 |
# |
|
| 18 |
# Parameters: |
|
| 19 |
# |
|
| 20 |
# config |
|
| 21 |
# autoconf |
|
| 22 |
# |
|
| 23 |
# Author: Alexx Roche <munin-ipmi-plugin@alexx.net> |
|
| 24 |
# Built on the work of Justin Shepherd <galstrom21@gmail.com> |
|
| 25 |
# Revision: 2.1 2011/01/10 |
|
| 26 |
# |
|
| 27 |
#%# family=auto |
|
| 28 |
#%# capabilities=autoconf |
|
| 29 |
|
|
| 30 |
use strict; |
|
| 31 |
|
|
| 32 |
my $IPMI; |
|
| 33 |
if(-f "/usr/sbin/ipmi-sensors"){ $IPMI='/usr/sbin/ipmi-sensors'; }
|
|
| 34 |
unless($IPMI){
|
|
| 35 |
$IPMI = `which ipmi-sensors 2>/dev/null|sed 's/.*no ipmi-sensors//'`; |
|
| 36 |
#$IPMI = `echo -n \$(which ipmi-sensors)`; |
|
| 37 |
} |
|
| 38 |
chomp($IPMI); |
|
| 39 |
unless($IPMI){ exit 1; }
|
|
| 40 |
|
|
| 41 |
if ($ARGV[0] && $ARGV[0] eq "autoconf"){
|
|
| 42 |
if (-f $IPMI){
|
|
| 43 |
print "yes\n"; |
|
| 44 |
}else{
|
|
| 45 |
print "no ($IPMI does not exist)\n"; |
|
| 46 |
exit(1); |
|
| 47 |
} |
|
| 48 |
}else{
|
|
| 49 |
my $cmd = "$IPMI --verbose --sensors=\"\$(echo \$($IPMI |grep FAN|sed 's/:.*//'))\""; |
|
| 50 |
#if ($ARGV[0] eq 'cmd'){ print $cmd; exit;};
|
|
| 51 |
my @result = `$cmd`; |
|
| 52 |
my (%val, $index); |
|
| 53 |
$index=0; |
|
| 54 |
my $count=0; |
|
| 55 |
#Four of these seem to be unlabled, I'm going to guess that they are the CPU(s) and HDD(s) |
|
| 56 |
my @unknown = ('HDD0','HDD1','CPU0','CPU1');
|
|
| 57 |
foreach my $line (@result) {
|
|
| 58 |
$line =~ s/\s+/ /g; |
|
| 59 |
$line =~ s/\s$//g; |
|
| 60 |
if(!$line || $line eq ""){
|
|
| 61 |
$index++; |
|
| 62 |
next; |
|
| 63 |
} |
|
| 64 |
my ($key, $val) = split(/\: /, $line); |
|
| 65 |
unless($key){
|
|
| 66 |
# $index++; |
|
| 67 |
# next; |
|
| 68 |
} |
|
| 69 |
if($key eq 'Sensor Name'){
|
|
| 70 |
if($val eq 'Temp'){
|
|
| 71 |
$val = $unknown[$count]; |
|
| 72 |
$count++; |
|
| 73 |
} |
|
| 74 |
#my @data = split / /, $val; |
|
| 75 |
#$data[2]=~s/^\(//; |
|
| 76 |
#$data[2]=~s/\)$//; |
|
| 77 |
#my($warn,$crit) = split/\//, $data[2]; |
|
| 78 |
$val{$index}{'Probe Name'} = "$val";
|
|
| 79 |
}elsif($key eq 'Upper Critical Threshold'){
|
|
| 80 |
$val=~s/ .*$//; |
|
| 81 |
next unless $val=~m/^\d+\.\d+$/; |
|
| 82 |
$val{$index}{'Critical Threshold'} = "$val";
|
|
| 83 |
}elsif($key eq 'Normal Max.'){
|
|
| 84 |
$val=~s/ .*//; |
|
| 85 |
$val{$index}{'Warning Threshold'} = $val;
|
|
| 86 |
}elsif($key eq 'Sensor Reading'){
|
|
| 87 |
$val=~s/ .*//; |
|
| 88 |
$val{$index}{'Reading'} = $val;
|
|
| 89 |
}elsif($key eq 'Sensor Max. Reading' && !$val{$index}{'Critical Threshold'}){
|
|
| 90 |
$val=~s/ .*$//; |
|
| 91 |
$val{$index}{'Critical Threshold'} = "$val";
|
|
| 92 |
} |
|
| 93 |
} |
|
| 94 |
|
|
| 95 |
if ($ARGV[0] && $ARGV[0] eq "config") {
|
|
| 96 |
print "graph_title IPMI - Fan Speeds\n"; |
|
| 97 |
print "graph_args --base 1000 -l 0\n"; |
|
| 98 |
print "graph_vlabel Speed in RPM\n"; |
|
| 99 |
print "graph_category Sensors\n"; |
|
| 100 |
foreach my $j (sort keys %val) {
|
|
| 101 |
print "probe_$j\.label $val{$j}{'Probe Name'}\n";
|
|
| 102 |
print "probe_$j\.warning $val{$j}{'Warning Threshold'}\n";
|
|
| 103 |
print "probe_$j\.critical $val{$j}{'Critical Threshold'}\n";
|
|
| 104 |
} |
|
| 105 |
}else{
|
|
| 106 |
foreach my $j (sort keys %val) {
|
|
| 107 |
if($val{$j}{'Reading'}){
|
|
| 108 |
print "probe_$j.value $val{$j}{'Reading'}\n";
|
|
| 109 |
} |
|
| 110 |
} |
|
| 111 |
} |
|
| 112 |
} |
|
| 113 |
exit(0); |
|
| 114 |
|
|
| plugins/ipmi/ipmi_sdr_ | ||
|---|---|---|
| 1 |
#!/usr/bin/perl -w |
|
| 2 |
# |
|
| 3 |
# IPMI data gathering for munin. |
|
| 4 |
# |
|
| 5 |
# Author: 2008 Benjamin Pineau <ben.pineau@gmail.com> |
|
| 6 |
# This work is hereby released into the Public Domain. |
|
| 7 |
# To view a copy of the public domain dedication, visit |
|
| 8 |
# http://creativecommons.org/licenses/publicdomain/ |
|
| 9 |
# |
|
| 10 |
# Requirements : |
|
| 11 |
# |
|
| 12 |
# - ipmitool command line utility (and kernel drivers) |
|
| 13 |
# - access rights to /dev/ipmi0 device (ie, root privileges |
|
| 14 |
# can be configured in /etc/munin/plugin-conf.d/munin-node) |
|
| 15 |
# |
|
| 16 |
# Parameters supported: |
|
| 17 |
# |
|
| 18 |
# config |
|
| 19 |
# autoconf |
|
| 20 |
# |
|
| 21 |
# Setup : |
|
| 22 |
# |
|
| 23 |
# ipmitool sdr || echo "please load IPMI kernel modules" |
|
| 24 |
# cp ipmi_sdr_ /usr/share/munin/plugins/ |
|
| 25 |
# chmod +x /usr/share/munin/plugins/ipmi_sdr_ |
|
| 26 |
# ln -s /usr/share/munin/plugins/ipmi_sdr_ /etc/munin/plugins/ipmi_sdr_fan |
|
| 27 |
# ln -s /usr/share/munin/plugins/ipmi_sdr_ /etc/munin/plugins/ipmi_sdr_current |
|
| 28 |
# ln -s /usr/share/munin/plugins/ipmi_sdr_ /etc/munin/plugins/ipmi_sdr_voltage |
|
| 29 |
# ln -s /usr/share/munin/plugins/ipmi_sdr_ /etc/munin/plugins/ipmi_sdr_temperature |
|
| 30 |
# echo -e "\n[ipmi_sdr*]\nuser root\ntimeout 15\n" >> /etc/munin/plugin-conf.d/munin-node |
|
| 31 |
# /etc/init.d/munin-node restart |
|
| 32 |
# |
|
| 33 |
# Magic markers |
|
| 34 |
#%# family=auto |
|
| 35 |
#%# capabilities=autoconf |
|
| 36 |
|
|
| 37 |
use strict; |
|
| 38 |
use warnings; |
|
| 39 |
|
|
| 40 |
$ENV{'LANG'} = 'C';
|
|
| 41 |
$ENV{'LC_ALL'} = 'C';
|
|
| 42 |
|
|
| 43 |
my $ipmidump = $ENV{'ipmidump'} || '/var/lib/munin/plugin-state/ipmi_sdr';
|
|
| 44 |
my $ipmitool = $ENV{'ipmitool'} || 'ipmitool';
|
|
| 45 |
my $drefresh = $ENV{'drefresh'} || 86400;
|
|
| 46 |
|
|
| 47 |
my %sensors; |
|
| 48 |
|
|
| 49 |
my $desc = {
|
|
| 50 |
'fan' => {
|
|
| 51 |
'graph_title' => 'Fans rotations per minute', |
|
| 52 |
'graph_vlabel' => 'RPM', |
|
| 53 |
'graph_info' => 'Fans rotations per minute', |
|
| 54 |
}, |
|
| 55 |
'voltage' => {
|
|
| 56 |
'graph_title' => 'Electrical tensions', |
|
| 57 |
'graph_vlabel' => 'Volts', |
|
| 58 |
'graph_info' => 'Electrical tensions', |
|
| 59 |
}, |
|
| 60 |
'temperature' => {
|
|
| 61 |
'graph_title' => 'Hardware temperatures', |
|
| 62 |
'graph_vlabel' => 'Degrees Celsius', |
|
| 63 |
'graph_info' => 'Hardware temperature sensors output', |
|
| 64 |
}, |
|
| 65 |
'current' => {
|
|
| 66 |
'graph_title' => 'Hardware power consumption', |
|
| 67 |
'graph_vlabel' => 'Watts or Amperes', |
|
| 68 |
'graph_info' => 'Hardware power consumption', |
|
| 69 |
}, |
|
| 70 |
}; |
|
| 71 |
|
|
| 72 |
my $stype = $0 =~ /.*ipmi_sdr_(\w+)$/ ? lc($1) : 'temperature'; |
|
| 73 |
|
|
| 74 |
if (!defined($desc->{"$stype"})) {
|
|
| 75 |
printf STDERR "Unknown sensor type : '$stype'. Aborting.\n"; |
|
| 76 |
exit 1; |
|
| 77 |
} |
|
| 78 |
|
|
| 79 |
sub strip_spaces($) {
|
|
| 80 |
(my $s = shift) =~ s/^\s*(.*?)\s*\n?$/$1/; |
|
| 81 |
return $s; |
|
| 82 |
} |
|
| 83 |
|
|
| 84 |
sub normalize_name($) {
|
|
| 85 |
(my $l = lc(strip_spaces(shift))) =~ tr/\t ./_/; |
|
| 86 |
return $l; |
|
| 87 |
} |
|
| 88 |
|
|
| 89 |
sub sdrlist_parse(@) {
|
|
| 90 |
foreach(@_) {
|
|
| 91 |
next unless /^([^\|]+)\s*\|\s*(\w+)\s*\|[^\|]+\|[^\|]+\|\s*([\d\.]+)\s+/; |
|
| 92 |
$sensors{$_}{"name"} = strip_spaces($1);
|
|
| 93 |
$sensors{$_}{"value"} = strip_spaces($3);
|
|
| 94 |
$sensors{$_}{"label"} = normalize_name($1) . normalize_name($2);
|
|
| 95 |
} |
|
| 96 |
} |
|
| 97 |
|
|
| 98 |
if (defined $ARGV[0] and $ARGV[0] eq 'autoconf') {
|
|
| 99 |
`$ipmitool help 2> /dev/null`; |
|
| 100 |
if ($?) {
|
|
| 101 |
print "no ($ipmitool not found)"; |
|
| 102 |
exit 1; |
|
| 103 |
} |
|
| 104 |
|
|
| 105 |
`$ipmitool sdr dump $ipmidump`; |
|
| 106 |
if ($?) {
|
|
| 107 |
printf "no (ipmitool sdr dump returned code %d)\n", $? >> 8; |
|
| 108 |
exit 1; |
|
| 109 |
} |
|
| 110 |
|
|
| 111 |
`$ipmitool sdr type $stype -S $ipmidump`; |
|
| 112 |
if ($?) {
|
|
| 113 |
print "no (ipmitool didn't found any sensor of type "; |
|
| 114 |
printf "'$stype', returned code %d)\n", $? >> 8; |
|
| 115 |
exit 1; |
|
| 116 |
} |
|
| 117 |
|
|
| 118 |
print "yes\n"; |
|
| 119 |
exit 0; |
|
| 120 |
} |
|
| 121 |
|
|
| 122 |
# "ipmitool dump" dumps speeds up data retreival big time, by avoiding |
|
| 123 |
# IPMI sensors autodiscovery. This only caches sensors names/types/ids |
|
| 124 |
# (not values/datas), so we can have a very long cache lifetime policy. |
|
| 125 |
if (-f $ipmidump) {
|
|
| 126 |
unlink($ipmidump) if (time - (stat($ipmidump))[9] >= $drefresh); |
|
| 127 |
} |
|
| 128 |
|
|
| 129 |
unless (-f $ipmidump) {
|
|
| 130 |
`$ipmitool sdr dump $ipmidump` || die $!; |
|
| 131 |
} |
|
| 132 |
|
|
| 133 |
(my @dt = `$ipmitool sdr type $stype -S $ipmidump`) || die $!; |
|
| 134 |
sdrlist_parse(@dt); |
|
| 135 |
|
|
| 136 |
if (defined($ARGV[0]) && $ARGV[0] eq "config") {
|
|
| 137 |
print "graph_category system\n"; |
|
| 138 |
print "graph_title " . $desc->{$stype}->{"graph_title"} . "\n";
|
|
| 139 |
print "graph_vlabel " . $desc->{$stype}->{"graph_vlabel"} . "\n";
|
|
| 140 |
print "graph_info " . $desc->{$stype}->{"graph_info"} . "\n";
|
|
| 141 |
|
|
| 142 |
foreach my $v (values(%sensors)) {
|
|
| 143 |
print $v->{"label"} . ".label " . $v->{"name"} . "\n";
|
|
| 144 |
print $v->{"label"} . ".type GAUGE\n";
|
|
| 145 |
} |
|
| 146 |
|
|
| 147 |
exit 0; |
|
| 148 |
} |
|
| 149 |
|
|
| 150 |
foreach my $v (values(%sensors)) {
|
|
| 151 |
print $v->{"label"} . ".value " . $v->{"value"} . "\n";
|
|
| 152 |
} |
|
| 153 |
|
|
| plugins/ipmi/ipmi_therm | ||
|---|---|---|
| 1 |
#! /usr/bin/perl -w |
|
| 2 |
# |
|
| 3 |
# This plugin will graph the chassis temp sensors on a Dell PowerEdge Server |
|
| 4 |
# via the ipmi-sensors tool. It has been tested on the following chassis: |
|
| 5 |
# |
|
| 6 |
# PE1850 |
|
| 7 |
# |
|
| 8 |
# To enable: |
|
| 9 |
# |
|
| 10 |
# ln -s /usr/share/munin/plugins/ipmi-therm /etc/munin/plugins/ipmi-therm |
|
| 11 |
# |
|
| 12 |
# Configuration parameters for /etc/munin/plugin-conf.d/munin-node |
|
| 13 |
# |
|
| 14 |
# [ipmi_therm] |
|
| 15 |
# user - User that has permissions to run ipmi-sensors |
|
| 16 |
# env.category sensors |
|
| 17 |
# |
|
| 18 |
# Parameters: |
|
| 19 |
# |
|
| 20 |
# config |
|
| 21 |
# autoconf |
|
| 22 |
# |
|
| 23 |
# Author: Alexx Roche <munin-ipmi-plugin@alexx.net> |
|
| 24 |
# Built on the work of Justin Shepherd <galstrom21@gmail.com> |
|
| 25 |
# Revision: 1.3 2011/01/10 |
|
| 26 |
# |
|
| 27 |
#%# family=auto |
|
| 28 |
#%# capabilities=autoconf |
|
| 29 |
|
|
| 30 |
use strict; |
|
| 31 |
|
|
| 32 |
my $IPMI; |
|
| 33 |
if(-f "/usr/sbin/ipmi-sensors"){ $IPMI='/usr/sbin/ipmi-sensors'; }
|
|
| 34 |
unless($IPMI){
|
|
| 35 |
$IPMI = `which ipmi-sensors 2>/dev/null|sed 's/.*no ipmi-sensors//'`; |
|
| 36 |
#$IPMI = `echo -n \$(which ipmi-sensors)`; |
|
| 37 |
} |
|
| 38 |
chomp($IPMI); |
|
| 39 |
unless($IPMI){ exit 1; }
|
|
| 40 |
|
|
| 41 |
if ($ARGV[0] && $ARGV[0] eq "autoconf"){
|
|
| 42 |
if (-f $IPMI){
|
|
| 43 |
print "yes\n"; |
|
| 44 |
}else{
|
|
| 45 |
print "no ($IPMI does not exist)\n"; |
|
| 46 |
exit(1); |
|
| 47 |
} |
|
| 48 |
}else{
|
|
| 49 |
my $cmd = "$IPMI|grep Temp"; |
|
| 50 |
my @result = `$cmd`; |
|
| 51 |
my (%val, $index); |
|
| 52 |
$index=0; |
|
| 53 |
my $count=0; |
|
| 54 |
#Four of these seem to be unlabled, I'm going to guess that they are the CPU(s) and HDD(s) |
|
| 55 |
my @unknown = ('CPU0','CPU1','HDD0','HDD1');
|
|
| 56 |
foreach my $line (@result) {
|
|
| 57 |
$line =~ s/\s+/ /g; |
|
| 58 |
$line =~ s/\s$//g; |
|
| 59 |
next if ($line eq ""); |
|
| 60 |
my ($list, $field, $value, $state) = split(/\: /, $line); |
|
| 61 |
#print "L: $list F: $field V: $value S: $state\n"; |
|
| 62 |
if($field=~m/^(Temp|Ambient|Planar|Riser)/) {
|
|
| 63 |
my $f=$1; |
|
| 64 |
if($f eq 'Temp'){
|
|
| 65 |
$f = $unknown[$count]; |
|
| 66 |
$count++; |
|
| 67 |
} |
|
| 68 |
my @data = split / /, $value; |
|
| 69 |
$data[2]=~s/^\(//; |
|
| 70 |
$data[2]=~s/\)$//; |
|
| 71 |
if($f){
|
|
| 72 |
my($warn,$crit) = split/\//, $data[2]; |
|
| 73 |
unless($warn=~m/\d+/){ $warn = 0; }
|
|
| 74 |
unless($crit=~m/\d+/){ $crit = 200; }
|
|
| 75 |
$val{$index}{'Probe Name'} = "$f";
|
|
| 76 |
$val{$index}{'Reading'} = "$data[0]";
|
|
| 77 |
$val{$index}{'Warning Threshold'} = ($crit - $warn);
|
|
| 78 |
$val{$index}{'Critical Threshold'} = "$crit";
|
|
| 79 |
$index++; |
|
| 80 |
} |
|
| 81 |
} |
|
| 82 |
} |
|
| 83 |
|
|
| 84 |
if ($ARGV[0] && $ARGV[0] eq "config") {
|
|
| 85 |
print "graph_title IPMI sensors - Temperature Probes\n"; |
|
| 86 |
print "graph_args --base 1000 -l 0\n"; |
|
| 87 |
print "graph_vlabel Temperature in Celsius\n"; |
|
| 88 |
print "graph_category Sensors\n"; |
|
| 89 |
foreach my $j (sort keys %val) {
|
|
| 90 |
print "probe_$j\.label $val{$j}{'Probe Name'}\n";
|
|
| 91 |
print "probe_$j\.warning $val{$j}{'Warning Threshold'}\n";
|
|
| 92 |
print "probe_$j\.critical $val{$j}{'Critical Threshold'}\n";
|
|
| 93 |
} |
|
| 94 |
}else{
|
|
| 95 |
foreach my $j (sort keys %val) {
|
|
| 96 |
if($val{$j}{'Reading'}){
|
|
| 97 |
print "probe_$j.value $val{$j}{'Reading'}\n";
|
|
| 98 |
} |
|
| 99 |
} |
|
| 100 |
} |
|
| 101 |
} |
|
| 102 |
exit(0); |
|
| 103 |
|
|
| plugins/ipmi/ipmisens-v3 | ||
|---|---|---|
| 1 |
#!/usr/bin/perl -w |
|
| 2 |
# |
|
| 3 |
# ipmisens3 |
|
| 4 |
# Munin plugin to read IPMI sensor data |
|
| 5 |
# Zoltan HERPAI (c) 2009 <wigyori@uid0.hu> |
|
| 6 |
# |
|
| 7 |
# Symlink this script into your /etc/munin/plugins directory in the |
|
| 8 |
# following way: |
|
| 9 |
# |
|
| 10 |
# ipmisens2_[machine]_[sensors] |
|
| 11 |
# |
|
| 12 |
# Supported machines: |
|
| 13 |
# - Asus K8N-LR: asmb2 (temp, volt, fan) |
|
| 14 |
# - Dell DCS-XS23: xs23 (temp, volt, fan) |
|
| 15 |
# - Dell M610 blade: m610 (temp) |
|
| 16 |
# - Dell PowerEdge 2650: pe2650 (temp, volt, fan) |
|
| 17 |
# - Fujitsu TX120: tx120 (temp, volt, fan) |
|
| 18 |
# - HP Proliant ML350G5: proliantg5 (temp) |
|
| 19 |
# - HP Proliant DL380G5: proliantg5 (temp) |
|
| 20 |
# - HP Proliant DL385G1: hpasmcli (temp, fan) |
|
| 21 |
# - IBM HS21/HS22/Dataplex DX360: ibmhsxx (volt) |
|
| 22 |
# - IBM LS20/LS21: ibmlsxx (temp, volt) |
|
| 23 |
# - IBM LS41: ibmls4x (temp, volt) |
|
| 24 |
# - IBM x3200/x3550: ibmx3xx0 (temp, volt, fan) |
|
| 25 |
# - IBM x346: x346 (temp, volt, fan) |
|
| 26 |
# - Intel SHG2 mainboard: shg2 (temp, volt, fan) |
|
| 27 |
# - Sun x2100/2100m2/2200/2200m2: x2100 (temp, volt, fan) |
|
| 28 |
# - Sun x2250: x2250 (temp, volt, fan) |
|
| 29 |
# - Sun x2270: x2270 (temp, volt, fan) |
|
| 30 |
# - Sun x4100/4100m2/4200/4200m2/4600: x4x00 (temp, volt, fan) |
|
| 31 |
# - Sun x4150: x4150 (temp, volt, fan) |
|
| 32 |
# - Sun V20z (V40z?): v20z (temp, volt, fan) |
|
| 33 |
# - Supermicro X7DB8/X7DCL: aocipmi20e (temp, volt, fan) |
|
| 34 |
# - Supermicro X8DT6/X8DTT-F: hermon (temp, volt, fan) |
|
| 35 |
# - Verari VB1205XM: vb1205 (temp, volt) |
|
| 36 |
# |
|
| 37 |
# Supported but not tested: |
|
| 38 |
# - HP DL145G2: asmb2 (temp, volt, fan) |
|
| 39 |
# |
|
| 40 |
# Notes: |
|
| 41 |
# - hpasmcli machtype requires HP's hpasmcli package, and the additional |
|
| 42 |
# hpasmcliget script. |
|
| 43 |
# |
|
| 44 |
# Outputs submitted by: |
|
| 45 |
# - Zoltan LAJBER <lajbi@lajli.gau.hu> |
|
| 46 |
# - Gergely MADARASZ <gorgo@broadband.hu> |
|
| 47 |
# - Louis van Belle <louis@van-belle.nl> |
|
| 48 |
# - Andras GOT <andrej@antiszoc.hu> |
|
| 49 |
# - Andras KORN <korn@chardonnay.math.bme.hu> |
|
| 50 |
# - Tamas TEVESZ <ice@extreme.hu> |
|
| 51 |
# - Gergely TOMKA <gergely@tomka.hu> |
|
| 52 |
# - Gabor SZOLLOSI <dev@localnet.hu> |
|
| 53 |
# - Reka KAROLYI <reka@karolyi.eu> |
|
| 54 |
# - Andras HORVATH <Andras.Horvath@cern.ch> |
|
| 55 |
# |
|
| 56 |
# CHANGELOG |
|
| 57 |
# |
|
| 58 |
# Revision 3.01 2010/09/23 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 59 |
# * Add support for handling non-ipmitool-based machtypes |
|
| 60 |
# * Add support for HP Proliant DL385G1 |
|
| 61 |
# |
|
| 62 |
# Revision 3.00 2010/05/25 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 63 |
# * Add support for Supermicro X7DB8 via AOC IPMI20-E (aocipmi20e) |
|
| 64 |
# * Add support for Supermicro X7DCL via AOC IPMI20-E (aocipmi20e) |
|
| 65 |
# * Add support for Supermicro X8DT6 via Winbond Hermon BMC (hermon) |
|
| 66 |
# * Add support for Supermicro X8DTT-F via Winbond Hermon BMC (hermon) |
|
| 67 |
# * Add support for Dell M610 (m610) |
|
| 68 |
# * Add support for HP DL380G5 (proliantg5) |
|
| 69 |
# * Add support for HP ML350G5 (proliantg5) |
|
| 70 |
# * Re-add support for Asus K8N-LR via ASMB2 (asmb2) |
|
| 71 |
# * Add to-be-tested support for HP DL145G2 as per Paulo@muninexchange (asmb2) |
|
| 72 |
# |
|
| 73 |
# Revision 3.00early4 2010/01/09 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 74 |
# * Add support for IBM HS22 (ibmhsxx) |
|
| 75 |
# * Add support for IBM iDataplex DX360 (ibmhsxx) |
|
| 76 |
# * Add support for Dell DCS XS23-sc (xs23) |
|
| 77 |
# |
|
| 78 |
# Revision 3.00early3 2009/12/30 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 79 |
# * Support for easier debugging ($debug) |
|
| 80 |
# * Add support for IBM LS41 (ibmls4x) |
|
| 81 |
# * Add complete support for Sun x2270 (x2270) |
|
| 82 |
# * Add support for Sun x4500 (x4x00) |
|
| 83 |
# * Add support for Fujitsu-Siemens TX120 (tx120) |
|
| 84 |
# |
|
| 85 |
# Revision 3.00early2 2009/09/09 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 86 |
# * Minor bugfix due to munin brain damage |
|
| 87 |
# |
|
| 88 |
# Revision 3.00early 2009/09/01 Zoltan HERPAI <wigyori@uid0.hu> |
|
| 89 |
# * Complete rewrite in perl. |
|
| 90 |
# * Sun x2100, x2100M2 and x2200 are now supported in 'x2100' machtype |
|
| 91 |
# * Bunch of new machtypes are supported |
|
| 92 |
# |
|
| 93 |
|
|
| 94 |
use strict; |
|
| 95 |
use warnings; |
|
| 96 |
use POSIX; |
|
| 97 |
use FindBin qw($Script); |
|
| 98 |
|
|
| 99 |
my $IPMITOOL = '/usr/bin/ipmitool'; |
|
| 100 |
my $curtime = time(); |
|
| 101 |
my $TEMPFILE = "/var/lib/munin/plugin-state/ipmisens3"; |
|
| 102 |
# set the ipmidump expiration to 1 day |
|
| 103 |
my $TEMPREFRESH = 86400; |
|
| 104 |
my $debug = 0; |
|
| 105 |
my $devel = 0; |
|
| 106 |
|
|
| 107 |
############## |
|
| 108 |
# You should not need to edit anything below here |
|
| 109 |
# |
|
| 110 |
$ENV{PATH} = '/bin:/usr/bin:/usr/sbin';
|
|
| 111 |
$ENV{IFS} = "\n";
|
|
| 112 |
|
|
| 113 |
$0 =~ /.*_(.*)_(.*)/; |
|
| 114 |
my $machine = $1; |
|
| 115 |
my $sensor = $2; |
|
| 116 |
|
|
| 117 |
# Test if ipmitool is available |
|
| 118 |
if ( !$devel ) |
|
| 119 |
{
|
|
| 120 |
if ( $machine ne 'hpasmcli' ) {
|
|
| 121 |
`$IPMITOOL help 2> /dev/null`; |
|
| 122 |
if ($?) |
|
| 123 |
{
|
|
| 124 |
print "no ($IPMITOOL not found)"; |
|
| 125 |
exit 1; |
|
| 126 |
} |
|
| 127 |
} |
|
| 128 |
} |
|
| 129 |
|
|
| 130 |
|
|
| 131 |
print "Machine: $machine , sensor: $sensor\n" if ($debug); |
|
| 132 |
|
|
| 133 |
# check expiration time of the dumpfile |
|
| 134 |
if ( !$devel ) |
|
| 135 |
{
|
|
| 136 |
if ( $machine ne 'hpasmcli' ) {
|
|
| 137 |
if ( -f $TEMPFILE && $curtime - (stat($TEMPFILE))[9] >= $TEMPREFRESH ) |
|
| 138 |
{
|
|
| 139 |
print "Unlinking $TEMPFILE...\n" if ($debug); |
|
| 140 |
unlink ($TEMPFILE); |
|
| 141 |
} |
|
| 142 |
} |
|
| 143 |
} |
|
| 144 |
|
|
| 145 |
if ( !$devel ) |
|
| 146 |
{
|
|
| 147 |
if ( $machine ne 'hpasmcli' ) {
|
|
| 148 |
if ( ! -f $TEMPFILE ) |
|
| 149 |
{
|
|
| 150 |
print "Writing dumpfile $TEMPFILE...\n" if ($debug); |
|
| 151 |
`$IPMITOOL sdr dump $TEMPFILE` || die $!; |
|
| 152 |
if ($?) |
|
| 153 |
{
|
|
| 154 |
print "no (retcode $?)\n"; |
|
| 155 |
exit 2; |
|
| 156 |
} |
|
| 157 |
} |
|
| 158 |
} |
|
| 159 |
} |
|
| 160 |
|
|
| 161 |
my @ipmioutput; |
|
| 162 |
|
|
| 163 |
# Read the sensors |
|
| 164 |
if ( $machine ne 'hpasmcli' ) {
|
|
| 165 |
@ipmioutput = `$IPMITOOL sdr -S $TEMPFILE`; |
|
| 166 |
} |
|
| 167 |
else {
|
|
| 168 |
@ipmioutput = `cat /tmp/ipmi-sensors`; |
|
| 169 |
} |
|
| 170 |
#my @ipmioutput = `cat ~wigyori/ipmisens2/outputs/hp_ml350g5`; |
|
| 171 |
|
|
| 172 |
if ($?) |
|
| 173 |
{
|
|
| 174 |
print "no (retcode $?)\n"; |
|
| 175 |
exit 3; |
|
| 176 |
} |
|
| 177 |
|
|
| 178 |
my $arg; |
|
| 179 |
if ( defined($ARGV[0]) && $ARGV[0] ne "" ) |
|
| 180 |
{
|
|
| 181 |
print "argv: ".$ARGV[0]."\n" if ($debug); |
|
| 182 |
if ( $ARGV[0] eq 'config' ) { $arg = 'config'; }
|
|
| 183 |
if ( $ARGV[0] eq 'autoconf' ) { $arg = 'autoconf'; }
|
|
| 184 |
|
|
| 185 |
if ( $arg eq 'autoconf' ) { print "no\n"; exit 0; }
|
|
| 186 |
|
|
| 187 |
my %cnf; |
|
| 188 |
if ( $arg eq 'config' ) |
|
| 189 |
{
|
|
| 190 |
# Base sensor config |
|
| 191 |
if ( $sensor eq 'temp' ) |
|
| 192 |
{
|
|
| 193 |
%cnf = ( |
|
| 194 |
'graph_title' => 'Temperature', |
|
| 195 |
'graph_vlabel' => 'C', |
|
| 196 |
'graph_category' => 'sensors', |
|
| 197 |
); |
|
| 198 |
} |
|
| 199 |
|
|
| 200 |
if ( $sensor eq 'volt' ) |
|
| 201 |
{
|
|
| 202 |
%cnf = ( |
|
| 203 |
'graph_title' => 'Voltages', |
|
| 204 |
'graph_vlabel' => 'Volts', |
|
| 205 |
'graph_category' => 'sensors', |
|
| 206 |
); |
|
| 207 |
} |
|
| 208 |
|
|
| 209 |
if ( $sensor eq 'fan' ) |
|
| 210 |
{
|
|
| 211 |
if ( $machine ne 'hpasmcli' ) {
|
|
| 212 |
%cnf = ( |
|
| 213 |
'graph_title' => 'Fan speeds', |
|
| 214 |
'graph_vlabel' => 'RPM', |
|
| 215 |
'graph_category' => 'sensors', |
|
| 216 |
); |
|
| 217 |
} |
|
| 218 |
else {
|
|
| 219 |
%cnf = ( |
|
| 220 |
'graph_title' => 'Fan speeds', |
|
| 221 |
'graph_vlabel' => '%', |
|
| 222 |
'graph_category' => 'sensors', |
|
| 223 |
); |
|
| 224 |
} |
|
| 225 |
} |
|
| 226 |
|
|
| 227 |
# Static descriptors |
|
| 228 |
my %base; |
|
| 229 |
|
|
| 230 |
# Sun x4100 |
|
| 231 |
$base{'x4x00'}->{'mbt_amb'} = 'Mainboard';
|
|
| 232 |
$base{'x4x00'}->{'fpt_amb'} = 'FP';
|
|
| 233 |
$base{'x4x00'}->{'pdbt_amb'} = 'PSU';
|
|
| 234 |
$base{'x4x00'}->{'iot_amb'} = 'Disks';
|
|
| 235 |
$base{'x4x00'}->{'p0t_core'} = 'CPU0';
|
|
| 236 |
$base{'x4x00'}->{'p1t_core'} = 'CPU1';
|
|
| 237 |
$base{'x4x00'}->{'ft0fm0f0'} = 'ft0.fm0.f0';
|
|
| 238 |
$base{'x4x00'}->{'ft0fm1f0'} = 'ft0.fm1.f0';
|
|
| 239 |
$base{'x4x00'}->{'ft0fm2f0'} = 'ft0.fm2.f0';
|
|
| 240 |
$base{'x4x00'}->{'ft0fm0f1'} = 'ft0.fm0.f1';
|
|
| 241 |
$base{'x4x00'}->{'ft0fm1f1'} = 'ft0.fm1.f1';
|
|
| 242 |
$base{'x4x00'}->{'ft0fm2f1'} = 'ft0.fm2.f1';
|
|
| 243 |
$base{'x4x00'}->{'ft1fm0f0'} = 'ft1.fm0.f0';
|
|
| 244 |
$base{'x4x00'}->{'ft1fm1f0'} = 'ft1.fm1.f0';
|
|
| 245 |
$base{'x4x00'}->{'ft1fm2f0'} = 'ft1.fm2.f0';
|
|
| 246 |
$base{'x4x00'}->{'ft1fm0f1'} = 'ft1.fm0.f1';
|
|
| 247 |
$base{'x4x00'}->{'ft1fm1f1'} = 'ft1.fm1.f1';
|
|
| 248 |
$base{'x4x00'}->{'ft1fm2f1'} = 'ft1.fm2.f1';
|
|
| 249 |
$base{'x4x00'}->{'mbv_bat'} = 'BAT';
|
|
| 250 |
$base{'x4x00'}->{'mbv_3v3stby'} = '3.3VSTBY';
|
|
| 251 |
$base{'x4x00'}->{'mbv_3v3'} = '3.3V';
|
|
| 252 |
$base{'x4x00'}->{'mbv_5v'} = '5V';
|
|
| 253 |
$base{'x4x00'}->{'mbv_12v'} = '+12V';
|
|
| 254 |
$base{'x4x00'}->{'mbv_dash12v'} = '-12V';
|
|
| 255 |
$base{'x4x00'}->{'mbv_2v5core'} = 'MB 2.5V';
|
|
| 256 |
$base{'x4x00'}->{'mbv_1v8core'} = 'MB 1.8V';
|
|
| 257 |
$base{'x4x00'}->{'mbv_1v2core'} = 'MB 1.2V';
|
|
| 258 |
$base{'x4x00'}->{'p0v_1v5'} = 'CPU0 1.5V';
|
|
| 259 |
$base{'x4x00'}->{'p0v_2v5core'} = 'CPU0 2.5V';
|
|
| 260 |
$base{'x4x00'}->{'p0v_1v25core'} = 'CPU0 1.25V';
|
|
| 261 |
$base{'x4x00'}->{'p1v_1v5'} = 'CPU1 1.5V';
|
|
| 262 |
$base{'x4x00'}->{'p1v_2v5core'} = 'CPU1 2.5V';
|
|
| 263 |
$base{'x4x00'}->{'p1v_1v25core'} = 'CPU1 1.25V';
|
|
| 264 |
# Sun x4100m2 extents |
|
| 265 |
$base{'x4x00'}->{'mbv_1v5core'} = 'MB 1.5V';
|
|
| 266 |
$base{'x4x00'}->{'p0v_vddio'} = 'CPU0 VDDIO';
|
|
| 267 |
$base{'x4x00'}->{'p0v_vdd'} = 'CPU0 VDD';
|
|
| 268 |
$base{'x4x00'}->{'p0v_vtt'} = 'CPU0 VTT';
|
|
| 269 |
$base{'x4x00'}->{'p1v_vddio'} = 'CPU1 VDDIO';
|
|
| 270 |
$base{'x4x00'}->{'p1v_vdd'} = 'CPU1 VDD';
|
|
| 271 |
$base{'x4x00'}->{'p1v_vtt'} = 'CPU1 VTT';
|
|
| 272 |
# Sun x4600 voltage extents |
|
| 273 |
$base{'x4x00'}->{'mbv_1v2'} = 'MB +1.2V';
|
|
| 274 |
$base{'x4x00'}->{'mbv_1v5'} = 'MB +1.5V';
|
|
| 275 |
$base{'x4x00'}->{'mbv_2v5'} = 'MB +2.5V';
|
|
| 276 |
$base{'x4x00'}->{'mbv_3v3aux_r'} = 'MB +3.3VAUX';
|
|
| 277 |
$base{'x4x00'}->{'p0v_12v'} = 'CPU0 module +12V';
|
|
| 278 |
$base{'x4x00'}->{'p1v_12v'} = 'CPU1 module +12V';
|
|
| 279 |
$base{'x4x00'}->{'p2v_12v'} = 'CPU2 module +12V';
|
|
| 280 |
$base{'x4x00'}->{'p3v_12v'} = 'CPU3 module +12V';
|
|
| 281 |
$base{'x4x00'}->{'p4v_12v'} = 'CPU4 module +12V';
|
|
| 282 |
$base{'x4x00'}->{'p5v_12v'} = 'CPU5 module +12V';
|
|
| 283 |
$base{'x4x00'}->{'p6v_12v'} = 'CPU6 module +12V';
|
|
| 284 |
$base{'x4x00'}->{'p7v_12v'} = 'CPU7 module +12V';
|
|
| 285 |
$base{'x4x00'}->{'p0v_2v5'} = 'CPU0 module +2.5V';
|
|
| 286 |
$base{'x4x00'}->{'p1v_2v5'} = 'CPU1 module +2.5V';
|
|
| 287 |
$base{'x4x00'}->{'p2v_2v5'} = 'CPU2 module +2.5V';
|
|
| 288 |
$base{'x4x00'}->{'p3v_2v5'} = 'CPU3 module +2.5V';
|
|
| 289 |
$base{'x4x00'}->{'p4v_2v5'} = 'CPU4 module +2.5V';
|
|
| 290 |
$base{'x4x00'}->{'p5v_2v5'} = 'CPU5 module +2.5V';
|
|
| 291 |
$base{'x4x00'}->{'p6v_2v5'} = 'CPU6 module +2.5V';
|
|
| 292 |
$base{'x4x00'}->{'p7v_2v5'} = 'CPU7 module +2.5V';
|
|
| 293 |
$base{'x4x00'}->{'p0v_1v2'} = 'CPU0 module +1.2V';
|
|
| 294 |
$base{'x4x00'}->{'p1v_1v2'} = 'CPU1 module +1.2V';
|
|
| 295 |
$base{'x4x00'}->{'p2v_1v2'} = 'CPU2 module +1.2V';
|
|
| 296 |
$base{'x4x00'}->{'p3v_1v2'} = 'CPU3 module +1.2V';
|
|
| 297 |
$base{'x4x00'}->{'p4v_1v2'} = 'CPU4 module +1.2V';
|
|
| 298 |
$base{'x4x00'}->{'p5v_1v2'} = 'CPU5 module +1.2V';
|
|
| 299 |
$base{'x4x00'}->{'p6v_1v2'} = 'CPU6 module +1.2V';
|
|
| 300 |
$base{'x4x00'}->{'p7v_1v2'} = 'CPU7 module +1.2V';
|
|
| 301 |
$base{'x4x00'}->{'p0v_3v3aux_r'} = 'CPU0 module +3.3VAUX';
|
|
| 302 |
$base{'x4x00'}->{'p1v_3v3aux_r'} = 'CPU1 module +3.3VAUX';
|
|
| 303 |
$base{'x4x00'}->{'p2v_3v3aux_r'} = 'CPU2 module +3.3VAUX';
|
|
| 304 |
$base{'x4x00'}->{'p3v_3v3aux_r'} = 'CPU3 module +3.3VAUX';
|
|
| 305 |
$base{'x4x00'}->{'p4v_3v3aux_r'} = 'CPU4 module +3.3VAUX';
|
|
| 306 |
$base{'x4x00'}->{'p5v_3v3aux_r'} = 'CPU5 module +3.3VAUX';
|
|
| 307 |
$base{'x4x00'}->{'p6v_3v3aux_r'} = 'CPU6 module +3.3VAUX';
|
|
| 308 |
$base{'x4x00'}->{'p7v_3v3aux_r'} = 'CPU7 module +3.3VAUX';
|
|
| 309 |
$base{'x4x00'}->{'p0v_3v3led'} = 'CPU0 module +3.3V LED';
|
|
| 310 |
$base{'x4x00'}->{'p1v_3v3led'} = 'CPU1 module +3.3V LED';
|
|
| 311 |
$base{'x4x00'}->{'p2v_3v3led'} = 'CPU2 module +3.3V LED';
|
|
| 312 |
$base{'x4x00'}->{'p3v_3v3led'} = 'CPU3 module +3.3V LED';
|
|
| 313 |
$base{'x4x00'}->{'p4v_3v3led'} = 'CPU4 module +3.3V LED';
|
|
| 314 |
$base{'x4x00'}->{'p5v_3v3led'} = 'CPU5 module +3.3V LED';
|
|
| 315 |
$base{'x4x00'}->{'p6v_3v3led'} = 'CPU6 module +3.3V LED';
|
|
| 316 |
$base{'x4x00'}->{'p7v_3v3led'} = 'CPU7 module +3.3V LED';
|
|
| 317 |
$base{'x4x00'}->{'p2v_1v25core'} = 'CPU2 1.25V';
|
|
| 318 |
$base{'x4x00'}->{'p3v_1v25core'} = 'CPU3 1.25V';
|
|
| 319 |
$base{'x4x00'}->{'p4v_1v25core'} = 'CPU4 1.25V';
|
|
| 320 |
$base{'x4x00'}->{'p5v_1v25core'} = 'CPU5 1.25V';
|
|
| 321 |
$base{'x4x00'}->{'p6v_1v25core'} = 'CPU6 1.25V';
|
|
| 322 |
$base{'x4x00'}->{'p7v_1v25core'} = 'CPU7 1.25V';
|
|
| 323 |
$base{'x4x00'}->{'p0v_core'} = 'CPU0 Vcore';
|
|
| 324 |
$base{'x4x00'}->{'p1v_core'} = 'CPU1 Vcore';
|
|
| 325 |
$base{'x4x00'}->{'p2v_core'} = 'CPU2 Vcore';
|
|
| 326 |
$base{'x4x00'}->{'p3v_core'} = 'CPU3 Vcore';
|
|
| 327 |
$base{'x4x00'}->{'p4v_core'} = 'CPU4 Vcore';
|
|
| 328 |
$base{'x4x00'}->{'p5v_core'} = 'CPU5 Vcore';
|
|
| 329 |
$base{'x4x00'}->{'p6v_core'} = 'CPU6 Vcore';
|
|
| 330 |
$base{'x4x00'}->{'p7v_core'} = 'CPU7 Vcore';
|
|
| 331 |
# Sun x4600 temp extents |
|
| 332 |
$base{'x4x00'}->{'p2t_core'} = 'CPU2';
|
|
| 333 |
$base{'x4x00'}->{'p3t_core'} = 'CPU3';
|
|
| 334 |
$base{'x4x00'}->{'p4t_core'} = 'CPU4';
|
|
| 335 |
$base{'x4x00'}->{'p5t_core'} = 'CPU5';
|
|
| 336 |
$base{'x4x00'}->{'p6t_core'} = 'CPU6';
|
|
| 337 |
$base{'x4x00'}->{'p7t_core'} = 'CPU7';
|
|
| 338 |
$base{'x4x00'}->{'p0t_amb'} = 'CPU0 module';
|
|
| 339 |
$base{'x4x00'}->{'p1t_amb'} = 'CPU1 module';
|
|
| 340 |
$base{'x4x00'}->{'p2t_amb'} = 'CPU2 module';
|
|
| 341 |
$base{'x4x00'}->{'p3t_amb'} = 'CPU3 module';
|
|
| 342 |
$base{'x4x00'}->{'p4t_amb'} = 'CPU4 module';
|
|
| 343 |
$base{'x4x00'}->{'p5t_amb'} = 'CPU5 module';
|
|
| 344 |
$base{'x4x00'}->{'p6t_amb'} = 'CPU6 module';
|
|
| 345 |
$base{'x4x00'}->{'p7t_amb'} = 'CPU7 module';
|
|
| 346 |
$base{'x4x00'}->{'mbt_amb0'} = 'System board 0';
|
|
| 347 |
$base{'x4x00'}->{'mbt_amb1'} = 'System board 1';
|
|
| 348 |
$base{'x4x00'}->{'mbt_amb2'} = 'System board 2';
|
|
| 349 |
# Sun x4500 voltage extents |
|
| 350 |
$base{'x4x00'}->{'procp0v_1v25'} = 'CPU0 1.25V';
|
|
| 351 |
$base{'x4x00'}->{'procp1v_1v25'} = 'CPU1 1.25V';
|
|
| 352 |
$base{'x4x00'}->{'procp0v_1v5'} = 'CPU0 1.5V';
|
|
| 353 |
$base{'x4x00'}->{'procp1v_1v5'} = 'CPU1 1.5V';
|
|
| 354 |
$base{'x4x00'}->{'procp0v_2v5'} = 'CPU0 2.5V';
|
|
| 355 |
$base{'x4x00'}->{'procp1v_2v5'} = 'CPU1 2.5V';
|
|
| 356 |
$base{'x4x00'}->{'procv_1v8'} = 'CPU 1.8V';
|
|
| 357 |
$base{'x4x00'}->{'iov_1v5'} = 'IO 1.5V';
|
|
| 358 |
$base{'x4x00'}->{'iov_2v5'} = 'IO 2.5V';
|
|
| 359 |
$base{'x4x00'}->{'iov_5v_disk'} = 'IO 5V disk';
|
|
| 360 |
$base{'x4x00'}->{'iov_dash12v'} = 'IO -12V';
|
|
| 361 |
# Sun x4500 temp extents |
|
| 362 |
$base{'x4x00'}->{'iofrontt_amb'} = 'IO front';
|
|
| 363 |
$base{'x4x00'}->{'ioreart_amb'} = 'IO rear';
|
|
| 364 |
$base{'x4x00'}->{'procfrontt_amb'} = 'CPU front';
|
|
| 365 |
$base{'x4x00'}->{'procreart_amb'} = 'CPU rear';
|
|
| 366 |
$base{'x4x00'}->{'procp0t_core'} = 'CPU0 temp';
|
|
| 367 |
$base{'x4x00'}->{'procp1t_core'} = 'CPU1 temp';
|
|
| 368 |
$base{'x4x00'}->{'dbpt_amb'} = 'DBP';
|
|
| 369 |
|
|
| 370 |
# Sun V20z (V40z?) |
|
| 371 |
$base{'v20z'}->{'ambient'} = 'System';
|
|
| 372 |
$base{'v20z'}->{'cpu0die'} = 'CPU0 die';
|
|
| 373 |
$base{'v20z'}->{'cpu0mem'} = 'CPU0 mem';
|
|
| 374 |
$base{'v20z'}->{'cpu1die'} = 'CPU1 die';
|
|
| 375 |
$base{'v20z'}->{'cpu1mem'} = 'CPU1 mem';
|
|
| 376 |
$base{'v20z'}->{'gbeth'} = 'GBNIC';
|
|
| 377 |
$base{'v20z'}->{'hddbp'} = 'HDD backplane';
|
|
| 378 |
$base{'v20z'}->{'sp'} = 'Service CPU';
|
|
| 379 |
|
|
| 380 |
# Sun x2100 |
|
| 381 |
$base{'x2100'}->{'cpucorevoltage'} = 'CPU core';
|
|
| 382 |
$base{'x2100'}->{'batteryvolt'} = 'VBAT';
|
|
| 383 |
$base{'x2100'}->{'ddr26v'} = 'DDR 2.6V';
|
|
| 384 |
$base{'x2100'}->{'vcc33v'} = '+3.3V';
|
|
| 385 |
$base{'x2100'}->{'vcc5v'} = '+5V';
|
|
| 386 |
$base{'x2100'}->{'vcc12v'} = '+12V';
|
|
| 387 |
$base{'x2100'}->{'cputemp'} = 'CPU';
|
|
| 388 |
$base{'x2100'}->{'system'} = 'System';
|
|
| 389 |
# Sun x2100M2 extents |
|
| 390 |
$base{'x2100'}->{'ddrp118v'} = 'DDR P1 1.8V';
|
|
| 391 |
$base{'x2100'}->{'vcc33vstb'} = '+3.3VSTBY';
|
|
| 392 |
$base{'x2100'}->{'ambienttemp'} = 'System';
|
|
| 393 |
# Sun x2200 extents |
|
| 394 |
$base{'x2100'}->{'ddrp018v'} = 'DDR P0 1.8V';
|
|
| 395 |
$base{'x2100'}->{'ambienttemp0'} = 'System temp 0';
|
|
| 396 |
$base{'x2100'}->{'ambienttemp1'} = 'System temp 1';
|
|
| 397 |
$base{'x2100'}->{'cpu0temp'} = 'CPU0 temp';
|
|
| 398 |
$base{'x2100'}->{'cpu1temp'} = 'CPU1 temp';
|
|
| 399 |
|
|
| 400 |
# Intel SHG2 |
|
| 401 |
$base{'shg2'}->{'baseboard12v'} = 'MB 12V';
|
|
| 402 |
$base{'shg2'}->{'baseboard15v'} = 'MB 1.5V';
|
|
| 403 |
$base{'shg2'}->{'baseboard25v'} = 'MB 2.5V';
|
|
| 404 |
$base{'shg2'}->{'baseboard33v'} = 'MB 3.3V';
|
|
| 405 |
$base{'shg2'}->{'baseboard33vsb'} = '3.3VSTBY';
|
|
| 406 |
$base{'shg2'}->{'baseboard5v'} = 'MB 5V';
|
|
| 407 |
$base{'shg2'}->{'baseboarddash12v'} = 'MB -12V';
|
|
| 408 |
$base{'shg2'}->{'batteryvoltage'} = 'VBAT';
|
|
| 409 |
$base{'shg2'}->{'processorvrm'} = 'VRM';
|
|
| 410 |
|
|
| 411 |
# IBM x346 |
|
| 412 |
$base{'x346'}->{'125vsense'} = '+1.25V';
|
|
| 413 |
$base{'x346'}->{'12vasense'} = '+12V A';
|
|
| 414 |
$base{'x346'}->{'12vbsense'} = '+12V B';
|
|
| 415 |
$base{'x346'}->{'12vcsense'} = '+12V C';
|
|
| 416 |
$base{'x346'}->{'13vsense'} = '+1.3V';
|
|
| 417 |
$base{'x346'}->{'15vsense'} = '+1.5V';
|
|
| 418 |
$base{'x346'}->{'18vsense'} = '+1.8V';
|
|
| 419 |
$base{'x346'}->{'25vsense'} = '+2.5V';
|
|
| 420 |
$base{'x346'}->{'5vsense'} = '+5V';
|
|
| 421 |
$base{'x346'}->{'cpu1vcore'} = 'CPU1 Vcore';
|
|
| 422 |
$base{'x346'}->{'cpu2vcore'} = 'CPU2 Vcore';
|
|
| 423 |
$base{'x346'}->{'cpuvtt'} = 'CPU VTT';
|
|
| 424 |
$base{'x346'}->{'dash12vsense'} = '-12V';
|
|
| 425 |
$base{'x346'}->{'vbat'} = 'VBAT';
|
|
| 426 |
$base{'x346'}->{'cpu1'} = 'CPU1';
|
|
| 427 |
$base{'x346'}->{'cpu2'} = 'CPU2';
|
|
| 428 |
$base{'x346'}->{'dasd'} = 'DASD';
|
|
| 429 |
$base{'x346'}->{'ambient'} = 'System';
|
|
| 430 |
|
|
| 431 |
# Sun x2250 |
|
| 432 |
$base{'x2250'}->{'3v3_stby'} = '3.3VSTBY';
|
|
| 433 |
$base{'x2250'}->{'3v3'} = '+3.3V';
|
|
| 434 |
$base{'x2250'}->{'5v'} = '+5V';
|
|
| 435 |
$base{'x2250'}->{'12v'} = '+12V';
|
|
| 436 |
$base{'x2250'}->{'1v5'} = '+1.5V';
|
|
| 437 |
$base{'x2250'}->{'1v8'} = '+1.8V';
|
|
| 438 |
$base{'x2250'}->{'0v9'} = '+0.9V';
|
|
| 439 |
$base{'x2250'}->{'vtt'} = 'VTT';
|
|
| 440 |
$base{'x2250'}->{'1v5_esb'} = 'ESB +1.5V';
|
|
| 441 |
$base{'x2250'}->{'1v2_nic'} = 'NIC +1.2V';
|
|
| 442 |
$base{'x2250'}->{'1v8_nic'} = 'NIC +1.8V';
|
|
| 443 |
$base{'x2250'}->{'1v5_fbd'} = 'FBDIMM +1.5V';
|
|
| 444 |
|
|
| 445 |
# Sun x2270 |
|
| 446 |
$base{'x2270'}->{'3v3_stby'} = '3.3VSTBY';
|
|
| 447 |
$base{'x2270'}->{'3v3'} = '+3.3V';
|
|
| 448 |
$base{'x2270'}->{'5v'} = '+5V';
|
|
| 449 |
$base{'x2270'}->{'12v'} = '+12V';
|
|
| 450 |
$base{'x2270'}->{'3v3_vbat'} = '3.3VBAT';
|
|
| 451 |
$base{'x2270'}->{'1v5'} = '+1.5V';
|
|
| 452 |
$base{'x2270'}->{'p0_1v5_ddr'} = 'DDR P0 +1.5V';
|
|
| 453 |
$base{'x2270'}->{'p1_1v5_ddr'} = 'DDR P1 +1.5V';
|
|
| 454 |
$base{'x2270'}->{'p0_1v8'} = 'P0 +1.8V';
|
|
| 455 |
$base{'x2270'}->{'p1_1v8'} = 'P1 +1.8V';
|
|
| 456 |
$base{'x2270'}->{'p0_vtt'} = 'P0 VTT';
|
|
| 457 |
$base{'x2270'}->{'p1_vtt'} = 'P1 VTT';
|
|
| 458 |
$base{'x2270'}->{'p0_vccp'} = 'P0 VCCp';
|
|
| 459 |
$base{'x2270'}->{'p1_vccp'} = 'P1 VCCp';
|
|
| 460 |
|
|
| 461 |
# Sun x4150 |
|
| 462 |
$base{'x4150'}->{'mb_t_amb0'} = 'MB Sensor 0';
|
|
| 463 |
$base{'x4150'}->{'mb_t_amb1'} = 'MB Sensor 1';
|
|
| 464 |
$base{'x4150'}->{'mb_t_amb2'} = 'MB Sensor 2';
|
|
| 465 |
$base{'x4150'}->{'mb_t_amb3'} = 'MB Sensor 3';
|
|
| 466 |
$base{'x4150'}->{'ps0_t_amb'} = 'PS 1 temp';
|
|
| 467 |
$base{'x4150'}->{'ps1_t_amb'} = 'PS 2 temp';
|
|
| 468 |
$base{'x4150'}->{'t_amb'} = 'System';
|
|
| 469 |
$base{'x4150'}->{'ps0_f0'} = 'PS 1 fan';
|
|
| 470 |
$base{'x4150'}->{'ps1_f0'} = 'PS 2 fan';
|
|
| 471 |
$base{'x4150'}->{'mb_p0_v_vcc'} = 'CPU0 VCC';
|
|
| 472 |
$base{'x4150'}->{'mb_p1_v_vcc'} = 'CPU1 VCC';
|
|
| 473 |
$base{'x4150'}->{'mb_v_12v'} = '+12V';
|
|
| 474 |
$base{'x4150'}->{'mb_v_1v5'} = '+1.5V';
|
|
| 475 |
$base{'x4150'}->{'mb_v_1v8'} = '+1.8V';
|
|
| 476 |
$base{'x4150'}->{'mb_v_2v5stby'} = '+2.5VSTBY';
|
|
| 477 |
$base{'x4150'}->{'mb_v_3v3'} = '+3.3V';
|
|
| 478 |
$base{'x4150'}->{'mb_v_3v3stby'} = '+3.3VSTBY';
|
|
| 479 |
$base{'x4150'}->{'mb_v_5v'} = '+5V';
|
|
| 480 |
$base{'x4150'}->{'mb_v_nic'} = 'NIC';
|
|
| 481 |
$base{'x4150'}->{'mb_v_vtt'} = 'VTT';
|
|
| 482 |
$base{'x4150'}->{'ps0_v_in'} = 'PS 1 voltage in';
|
|
| 483 |
$base{'x4150'}->{'ps0_v_out'} = 'PS 1 voltage out';
|
|
| 484 |
$base{'x4150'}->{'ps1_v_in'} = 'PS 2 voltage in';
|
|
| 485 |
$base{'x4150'}->{'ps1_v_out'} = 'PS 2 voltage out';
|
|
| 486 |
|
|
| 487 |
# Verari VB1205XM |
|
| 488 |
$base{'vb1205'}->{'12v'} = '+12V';
|
|
| 489 |
$base{'vb1205'}->{'1_2v'} = '+1.2V';
|
|
| 490 |
$base{'vb1205'}->{'1_5v'} = '+1.5V';
|
|
| 491 |
$base{'vb1205'}->{'3_3v'} = '+3.3V';
|
|
| 492 |
$base{'vb1205'}->{'5v'} = '+5V';
|
|
| 493 |
$base{'vb1205'}->{'5vsb'} = '+5VSTBY';
|
|
| 494 |
$base{'vb1205'}->{'cpu1vcore'} = 'CPU1 Vcore';
|
|
| 495 |
$base{'vb1205'}->{'cpu2vcore'} = 'CPU2 Vcore';
|
|
| 496 |
$base{'vb1205'}->{'dash12v'} = '-12V';
|
|
| 497 |
$base{'vb1205'}->{'vbat'} = 'VBAT';
|
|
| 498 |
$base{'vb1205'}->{'cputemp1'} = 'CPU 1 temp';
|
|
| 499 |
$base{'vb1205'}->{'cputemp2'} = 'CPU 2 temp';
|
|
| 500 |
$base{'vb1205'}->{'systemp'} = 'System';
|
|
| 501 |
|
|
| 502 |
# Dell PowerEdge 2650 |
|
| 503 |
$base{'pe2650'}->{'esmmbfan1'} = 'Fan 1';
|
|
| 504 |
$base{'pe2650'}->{'esmmbfan2'} = 'Fan 2';
|
|
| 505 |
$base{'pe2650'}->{'esmmbfan3'} = 'Fan 3';
|
|
| 506 |
$base{'pe2650'}->{'esmmbfan4'} = 'Fan 4';
|
|
| 507 |
$base{'pe2650'}->{'esmmbfan5'} = 'Fan 5';
|
|
| 508 |
$base{'pe2650'}->{'esmmbfan6'} = 'Fan 6';
|
|
| 509 |
$base{'pe2650'}->{'esmmbfan7'} = 'Fan 7';
|
|
| 510 |
$base{'pe2650'}->{'esmmb12'} = 'MB +12V';
|
|
| 511 |
$base{'pe2650'}->{'esmmb25'} = 'MB +2.5V';
|
|
| 512 |
$base{'pe2650'}->{'esmmb33'} = 'MB +3.3V';
|
|
| 513 |
$base{'pe2650'}->{'esmmb5'} = 'MB +5V';
|
|
| 514 |
$base{'pe2650'}->{'esmmbbat'} = 'VBAT';
|
|
| 515 |
$base{'pe2650'}->{'esmmbdash12'} = 'MB -12V';
|
|
| 516 |
$base{'pe2650'}->{'esmrombpk'} = 'ROMB PK';
|
|
| 517 |
$base{'pe2650'}->{'esmvtt'} = 'VTT';
|
|
| 518 |
$base{'pe2650'}->{'esmcpu'} = 'CPU';
|
|
| 519 |
$base{'pe2650'}->{'esm5aux'} = '5V AUX';
|
|
| 520 |
$base{'pe2650'}->{'esmcpu1'} = 'CPU1';
|
|
| 521 |
$base{'pe2650'}->{'esmcpu2'} = 'CPU2';
|
|
| 522 |
$base{'pe2650'}->{'esmfrti_o'} = 'Front I/O';
|
|
| 523 |
$base{'pe2650'}->{'esmriser'} = 'Riser';
|
|
| 524 |
|
|
| 525 |
# IBM x3200 |
|
| 526 |
$base{'ibmx3xx0'}->{'planar12v'} = '+12V';
|
|
| 527 |
$base{'ibmx3xx0'}->{'planar15v'} = '+1.5V';
|
|
| 528 |
$base{'ibmx3xx0'}->{'planar18v'} = '+1.8V';
|
|
| 529 |
$base{'ibmx3xx0'}->{'planar33v'} = '+3.3V';
|
|
| 530 |
$base{'ibmx3xx0'}->{'planar5v'} = '+5V';
|
|
| 531 |
$base{'ibmx3xx0'}->{'cpuvcore'} = 'CPU Vcore';
|
|
| 532 |
$base{'ibmx3xx0'}->{'cpuvtt'} = 'VTT';
|
|
| 533 |
$base{'ibmx3xx0'}->{'ambient'} = 'System';
|
|
| 534 |
$base{'ibmx3xx0'}->{'cpu'} = 'CPU';
|
|
| 535 |
# IBM x3550 extents |
|
| 536 |
$base{'ibmx3xx0'}->{'planarvbat'} = 'VBAT';
|
|
| 537 |
|
|
| 538 |
# IBM LS41 |
|
| 539 |
$base{'ibmlsxx'}->{'12vsense'} = '+12V';
|
|
| 540 |
$base{'ibmlsxx'}->{'3_3vsense'} = '+3.3V';
|
|
| 541 |
$base{'ibmlsxx'}->{'5vsense'} = '+5V';
|
|
| 542 |
$base{'ibmlsxx'}->{'planarvbat'} = 'VBAT';
|
|
| 543 |
# IBM LS20 extents |
|
| 544 |
$base{'ibmlsxx'}->{'1_8vsense'} = '+1.8V';
|
|
| 545 |
$base{'ibmlsxx'}->{'1_8vsbsense'} = '+1.8VSB';
|
|
| 546 |
$base{'ibmlsxx'}->{'12vsbsense'} = '+12VSB';
|
|
| 547 |
$base{'ibmlsxx'}->{'12v_isense'} = '+12V_I';
|
|
| 548 |
|
|
| 549 |
# IBM HS21 |
|
| 550 |
$base{'ibmhsxx'}->{'planar0_9v'} = '+0.9V';
|
|
| 551 |
$base{'ibmhsxx'}->{'planar12v'} = '+12V';
|
|
| 552 |
$base{'ibmhsxx'}->{'planar3_3v'} = '+3.3V';
|
|
| 553 |
$base{'ibmhsxx'}->{'planar5v'} = '+5V';
|
|
| 554 |
$base{'ibmhsxx'}->{'planarvbat'} = 'VBAT';
|
|
| 555 |
# IBM iDataplex DX320 extents |
|
| 556 |
$base{'ibmhsxx'}->{'cpu1vcore'} = 'CPU1 Vcore';
|
|
| 557 |
$base{'ibmhsxx'}->{'cpu2vcore'} = 'CPU2 Vcore';
|
|
| 558 |
|
|
| 559 |
# Fujitsu-Siemens TX120 |
|
| 560 |
$base{'tx120'}->{'12v'} = '12V';
|
|
| 561 |
$base{'tx120'}->{'15v'} = '1.5V';
|
|
| 562 |
$base{'tx120'}->{'18v'} = '1.8V';
|
|
| 563 |
$base{'tx120'}->{'33v'} = '3.3V';
|
|
| 564 |
$base{'tx120'}->{'5v'} = '5V';
|
|
| 565 |
$base{'tx120'}->{'dash12v'} = '-12V';
|
|
| 566 |
$base{'tx120'}->{'stdby33v'} = '3.3VSTBY';
|
|
| 567 |
$base{'tx120'}->{'vtt'} = 'VTT';
|
|
| 568 |
$base{'tx120'}->{'battery3v'} = '3VBAT';
|
|
| 569 |
$base{'tx120'}->{'fanpsu'} = 'Fan PSU';
|
|
| 570 |
$base{'tx120'}->{'fan1sys'} = 'Fan Sys 1';
|
|
| 571 |
$base{'tx120'}->{'fan2sys'} = 'Fan Sys 2';
|
|
| 572 |
$base{'tx120'}->{'fancpu'} = 'Fan CPU';
|
|
| 573 |
$base{'tx120'}->{'ambient'} = 'Ambient';
|
|
| 574 |
$base{'tx120'}->{'systemboard'} = 'System board';
|
|
| 575 |
$base{'tx120'}->{'cpu'} = 'CPU';
|
|
| 576 |
|
|
| 577 |
# Dell DCS XS23-sc |
|
| 578 |
$base{'xs23'}->{'systemfan'} = 'System fan';
|
|
| 579 |
$base{'xs23'}->{'cpu0'} = 'CPU 0';
|
|
| 580 |
$base{'xs23'}->{'cpu1'} = 'CPU 1';
|
|
| 581 |
$base{'xs23'}->{'midplane'} = 'Midplane';
|
|
| 582 |
$base{'xs23'}->{'p12v'} = 'Planar 12V';
|
|
| 583 |
$base{'xs23'}->{'p15v'} = 'Planar 1.5V';
|
|
| 584 |
$base{'xs23'}->{'p18v'} = 'Planar 1.8V';
|
|
| 585 |
$base{'xs23'}->{'p33v'} = 'Planar 3.3V';
|
|
| 586 |
$base{'xs23'}->{'p5v'} = 'Planar 5V';
|
|
| 587 |
$base{'xs23'}->{'vtt'} = 'Vtt';
|
|
| 588 |
$base{'xs23'}->{'vcc33vaux'} = 'Vcc 3.3V AUX';
|
|
| 589 |
|
|
| 590 |
# Supermicro X8DT6 / X8DTT-F via Winbond Hermon BMC |
|
| 591 |
$base{'hermon'}->{'fan1'} = 'Fan 1';
|
|
| 592 |
$base{'hermon'}->{'fan2'} = 'Fan 2';
|
|
| 593 |
$base{'hermon'}->{'fan3'} = 'Fan 3';
|
|
| 594 |
$base{'hermon'}->{'fan4'} = 'Fan 4';
|
|
| 595 |
$base{'hermon'}->{'fan5'} = 'Fan 5';
|
|
| 596 |
$base{'hermon'}->{'fan6'} = 'Fan 6';
|
|
| 597 |
$base{'hermon'}->{'fan7'} = 'Fan 7';
|
|
| 598 |
$base{'hermon'}->{'fan8'} = 'Fan 8';
|
|
| 599 |
$base{'hermon'}->{'system'} = 'System';
|
|
| 600 |
$base{'hermon'}->{'cpu1temp'} = 'CPU1 temp';
|
|
| 601 |
$base{'hermon'}->{'cpu2temp'} = 'CPU2 temp';
|
|
| 602 |
$base{'hermon'}->{'12v'} = '+12V';
|
|
| 603 |
$base{'hermon'}->{'15v'} = '+1.5V';
|
|
Formats disponibles : Unified diff