From 3217183ffb1bf502fda509a76ba77b341d8cc235 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Thu, 6 Dec 2012 05:58:13 +0000 Subject: [PATCH] fix bug 3194: power usage NOSUCHINSTANCE in firebird plus git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14566 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index 4e1b6300e..f51d9cf1c 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -874,12 +874,15 @@ sub vitals { my $tmp; if ( defined $slot and $slot > 0) { #-- querying some blade - if (grep /watt/,@vitems) { - if ($slot < 8) { - $tmp = $session->get(["1.3.6.1.4.1.2.3.51.2.2.10.2.1.1.7.".($slot+16)]); + if ($mpatype eq 'cmm') { + $tmp = $session->get(["1.3.6.1.4.1.2.3.51.2.2.10.2.1.1.7.".($slot+24)]); } else { - $tmp = $session->get(["1.3.6.1.4.1.2.3.51.2.2.10.3.1.1.7.".($slot+9)]); + if ($slot < 8) { + $tmp = $session->get(["1.3.6.1.4.1.2.3.51.2.2.10.2.1.1.7.".($slot+16)]); + } else { + $tmp = $session->get(["1.3.6.1.4.1.2.3.51.2.2.10.3.1.1.7.".($slot+9)]); + } } unless ($tmp =~ /Not Readable/) { if ($tmp =~ /(\d+)W/) {