Discovering the assigned Blade Name from Linux (IBM BladeCenter)

bladecenteribm

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

Best Answer

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()
Related Topic