Signed-off-by: Zhang Yu 2134782174@qq.com --- tests/host-info | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/tests/host-info b/tests/host-info index a57855dc..99b14083 100755 --- a/tests/host-info +++ b/tests/host-info @@ -80,6 +80,25 @@ get_partitions() fi }
+get_ipmi_ip() +{ + # root@localhost ~# ipmitool lan print + # Set in Progress : Set Complete + # IP Address Source : Static Address + # IP Address : 9.3.4.1 + # Subnet Mask : 255.255.0.0 + # MAC Address : e0:00:84:2b:51:7b + # SNMP Community String : TrapAdmin12#$ + # IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10 + # Default Gateway IP : 9.3.0.1 + # 802.1q VLAN ID : Disabled + # RMCP+ Cipher Suites : 0,1,2,3,17 + # Cipher Suite Priv Max : XuuaXXXXXXXXXXX + imp_ip=$(ipmitool lan print |awk 'NR==3{print $4}') + [ $? -eq 0 ] && echo "ipmi_ip:" $imp_ip + +} + main() { get_node @@ -87,6 +106,7 @@ main() get_partitions get_mac get_model_name + get_ipmi_ip }
main
On Tue, Oct 20, 2020 at 08:33:45PM +0800, Zhang Yu wrote:
Signed-off-by: Zhang Yu 2134782174@qq.com
tests/host-info | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/tests/host-info b/tests/host-info index a57855dc..99b14083 100755 --- a/tests/host-info +++ b/tests/host-info @@ -80,6 +80,25 @@ get_partitions() fi }
+get_ipmi_ip() +{
- # root@localhost ~# ipmitool lan print
- # Set in Progress : Set Complete
- # IP Address Source : Static Address
- # IP Address : 9.3.4.1
- # Subnet Mask : 255.255.0.0
- # MAC Address : e0:00:84:2b:51:7b
I'm not sure, but exposure MAC address seems cause safety problems?
Thanks, Yuanchao
- # SNMP Community String : TrapAdmin12#$
- # IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
- # Default Gateway IP : 9.3.0.1
- # 802.1q VLAN ID : Disabled
- # RMCP+ Cipher Suites : 0,1,2,3,17
- # Cipher Suite Priv Max : XuuaXXXXXXXXXXX
- imp_ip=$(ipmitool lan print |awk 'NR==3{print $4}')
- [ $? -eq 0 ] && echo "ipmi_ip:" $imp_ip
+}
main() { get_node @@ -87,6 +106,7 @@ main() get_partitions get_mac get_model_name
- get_ipmi_ip
}
main
2.23.0