在pipe理模块屏幕中的IBM刀片中心,我configuration了以下机器的名称
刀片任务 – >configuration – >刀片信息 – >名称(我input – > Bay12中的machine1)
之后,我在这台机器上安装了Linux机器redhat 5.3(Bay 12)
我的问题:是否有可能从我已经安装了一些命令的Linuxfind名称:machine1? 或通过一些其他的技巧/操纵?
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
启动IPMI服务,然后以下脚本将打印出IBM刀片名称:
#!/usr/bin/env python # Copyright 2009-2011 Net Direct Inc. # Written by: Michael Brown <[email protected]> # 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()
您可以通过ssh(运行AMM命令或通过服务器硬件命令行协议(SMASH CLP))与AMM交谈,您也可以通过dmidecode例如Location In Chassis: Slot05查看机器上的插槽信息。