Linux下主机常用信息查询

系统+安全 Liemer_Lius 61℃

1、查询主机序列号

dmidecode -t 1
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: ZTE
        Product Name: R8500 G4   # 主机型号
        Version: 1.0.0
        Serial Number: 00000000000   # 此段就是序列号,目前匿名化
        UUID: xxxxx-xxxxx-xxxxx-xxxxx-xxxxx 
        Wake-up Type: Power Switch
        SKU Number: N/A
        Family: Server

2、查看管理IP地址

# ipmitool lan print
Set in Progress         : Set Complete
IP Address Source       : Static Address
IP Address              : 10.10.10.10    # 此段为管理ip地址,已匿名化
Subnet Mask             : 255.255.255.0
MAC Address             : xx:xx:xx:xx:xx:xx
SNMP Community String   : platform
Default Gateway IP      : 10.10.10.2
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
Cipher Suite Priv Max   : aaaaaaaaaaaaaaa
                        :     X=Cipher Suite Unused
                        :     c=CALLBACK
                        :     u=USER
                        :     o=OPERATOR
                        :     a=ADMIN
                        :     O=OEM
Bad Password Threshold  : Not Available
如果没有命令,执行如下命令,加载模块:
# modprobe ipmi_msghandler
# modprobe ipmi_si
# modprobe ipmi_devintf

3、系统信息查询

   Static hostname: myserver-001
         Icon name: computer-server
           Chassis: server
        Machine ID: xxxxxxxxxxxxxxxxxxxxxxx
           Boot ID: xxxxxxxxxxxxxxxxx
  Operating System: SUSE Linux Enterprise Server 12 SP2
       CPE OS Name: cpe:/o:suse:sles:12:sp2
            Kernel: Linux 4.4.121-92.92-default
      Architecture: x86-64

 

转载请注明:skelchina.com » Linux下主机常用信息查询

喜欢 (4)