0

In the IBM blade center in management module screen I configured the name of the machine as the following

Blade tasks --> configuration --> blade information --> name ( I typed --> machine1 in Bay 12)

After that I installed Linux machines redhat 5.3 on this machine (Bay 12)

My question: Is it possible to find the name: machine1 from the linux that I already installed by some command? or by some other tricks/manipulation?

    example from linux ( But I not get the machine1 name ? )

    dmidecode|grep Location
    Location In Chassis: Slot12
    Location: Internal
    Location: Internal
    Location: Internal
    Location: Internal
    Location: Proprietary Add-on Card
Diana
  • 261
  • 4
  • 10
  • 19

2 Answers2

2

Start the IPMI service, then the following script will print out the IBM Blade Name:

#!/usr/bin/env python
# Copyright 2009-2011 Net Direct Inc.
# Written by: Michael Brown <michael@netdirect.ca>

# Must be run as root

import subprocess

def readIbmBladeName():
    rawcmd = 'ipmitool raw 0x2e 0x0a 0xd0 0x51 0x00 0xf0 0x08 0x10 0x10'
    ipmitool = subprocess.Popen(rawcmd.split(), stdout=subprocess.PIPE)
    rawname = ipmitool.communicate()[0].strip().replace('\n','').split()
    name = ''.join([chr(int(x,16)) for x in rawname[3:]])
    return name

def main():
    print(readIbmBladeName())

if (__name__ == '__main__'):
    main()
MikeyB
  • 39,291
  • 10
  • 105
  • 189
  • Yes its about the blade name - I will wait for your answer , it will help me allot thanks – Diana Nov 07 '11 at 13:07
  • Hi MikeyB I run the script but I get: Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory Unable to send RAW command (channel=0x0 netfn=0x2e lun=0x0 cmd=0xa) – Diana Nov 07 '11 at 14:12
  • You need to start your `ipmi` service. – MikeyB Nov 07 '11 at 14:15
  • service ipmi start Starting ipmi drivers: [ OK ] , yes now its work – Diana Nov 07 '11 at 14:27
  • MikeB what about if I have HP blade machine - its the same proccess? – Diana Nov 07 '11 at 14:30
  • HP blades are *totally* different. Won't be able to help you there. But since this solved your problem, please accept the answer by clicking the checkmark. – MikeyB Nov 07 '11 at 14:32
  • btw from where you find the number - 0x2e 0x0a 0xd0 0x51 0x00 0xf0 0x08 0x10 0x10 – Diana Nov 07 '11 at 14:39
  • Speculative research :) It's now published in one place - here! – MikeyB Nov 07 '11 at 14:42
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/1743/discussion-between-diana-and-mikeyb) – Diana Nov 08 '11 at 06:22
0

You can talk to the AMM via ssh (either running AMM commands or via Server Hardware Command Line Protocol (SMASH CLP)) and you'll also be able to see the slot information on the machine from dmidecode like ie Location In Chassis: Slot05.

pfo
  • 5,700
  • 24
  • 36
  • dmidecode|grep Location Location In Chassis: Slot12 Location: Internal Location: Internal Location: Internal Location: Internal Location: Proprietary Add-on Card yes I see the location 12 But I dont see the name of my machine? – Diana Nov 07 '11 at 12:20
  • You need to check the AMM for that info! Log into it and list the physical topology via the `list` command. – pfo Nov 07 '11 at 12:26
  • But I want to check only from linux – Diana Nov 07 '11 at 12:32
  • This is "from linux". – pfo Nov 07 '11 at 14:53
  • as you know from dmidecode I cant get the machine blade name ! , or write the command that give the blade name – Diana Nov 07 '11 at 15:11