Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question

2 Answers 2

up vote 1 down vote accepted

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()
share|improve this answer
    
Yes its about the blade name - I will wait for your answer , it will help me allot thanks –  Diana Nov 7 '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 7 '11 at 14:12
    
You need to start your ipmi service. –  MikeyB Nov 7 '11 at 14:15
    
service ipmi start Starting ipmi drivers: [ OK ] , yes now its work –  Diana Nov 7 '11 at 14:27
    
MikeB what about if I have HP blade machine - its the same proccess? –  Diana Nov 7 '11 at 14:30

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.

share|improve this answer
    
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 7 '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 7 '11 at 12:26
    
But I want to check only from linux –  Diana Nov 7 '11 at 12:32
    
This is "from linux". –  pfo Nov 7 '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 7 '11 at 15:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.