您的位置:首页 > 运维架构 > Linux

查看linux服务器信息

2017-04-28 14:46 253 查看
1 查看的是redhat的版本

cat /etc/redhat-release

[root@controller creds]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.5 (Santiago)

uname -a

[root@controller creds]# uname -a

Linux controller 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@controller creds]# uname -r

2.6.32-431.el6.x86_64

lsb_release -a

[root@controller creds]# lsb_release -a

LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch

Distributor ID: RedHatEnterpriseServer

Description:    Red Hat Enterprise Linux Server release 6.5 (Santiago)

Release:        6.5

Codename:       Santiago

more /etc/issue

[root@controller creds]# more /etc/issue

Red Hat Enterprise Linux Server release 6.5 (Santiago)

Kernel \r on an \m

more /proc/version

[root@controller creds]# more /proc/version

Linux version 2.6.32-431.el6.x86_64 (mockbuild@x86-023.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GC

C) ) #1 SMP Sun Nov 10 22:19:54 EST 2013

2 Bios:
dmidecode |more          --其中能看到服务器的制造商等信息
localadmin@openstack:~/devstack$ sudo dmidecode | more
# dmidecode 2.12
# SMBIOS entry
point at 0x7f6be000
SMBIOS 2.5 present.
87 structures occupying 3157 bytes.
Table at 0x7F6BD000.

Handle 0x0000, DMI type 38, 16 bytes
IPMI Device Information
        Interface Type: KCS (Keyboard Control Style)
        Specification Version: 2.0
        I2C Slave Address: 0x10
        NV Storage Device: Not Present
        Base Address: 0x0000000000000CA2 (I/O)

Handle 0x0001, DMI type 4, 40 bytes
Processor Information
        Socket Designation: Node 1 Socket 1
        Type: Central Processor
        Family: Xeon MP
        Manufacturer: Intel(R) Corporation
        ID: C2 06 02 00 FF FB EB BF
        Signature: Type 0, Family 6, Model 44, Stepping 2
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                DS (Debug store)
                ACPI (ACPI supported)
                MMX (MMX technology supported)
                FXSR (FXSAVE and FXSTOR instructions supported)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                SS (Self-snoop)
                HTT (Multi-threading)
                TM (Thermal monitor supported)
                PBE (Pending break enabled)
        Version: Intel(R) Xeon(R) CPU           X5650  @ 2.67GHz
        Voltage: 1.2 V
        External Clock: 6400 MHz
        Max Speed: 4400 MHz
        Current Speed: 2670 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x0002
        L2 Cache Handle: 0x0003
        L3 Cache Handle: 0x0004
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 6
        Core Enabled: 6
        Thread Count: 12
        Characteristics:
                64-bit capable

Handle 0x0002, DMI type 7, 19 bytes
Cache Information
        Socket Designation: Internal Cache Level 1
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 32 kB
        Maximum Size: 32 kB
        Supported SRAM Types:
                Asynchronous
        Installed SRAM Type: Asynchronous
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Data
        Associativity: 8-way Set-associative

3 cpu : 
more /proc/cpuinfo  
   
more /proc/cpuinfo |grep "physical "|sort -u            --cpu数量
more /proc/cpuinfo |grep "physical "|grep 0|wc -l    --单个cpu核心数量
more /proc/cpuinfo |head -10                                  --cpu的info,类型和主频、cache等

4 mem:
free               --内存和swap
more /proc/meminfo
top

5 hd:
fdisk -l
parted
more /etc/scsi/scsi             --scsi接口的情况下

查看机器配置:cpu/内存/硬盘查看硬盘:
[root@redone etc]# dmesg | grep hd
ide0: BM-DMA at 0x2060-0x2067, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0x2068-0x206f, BIOS settings: hdc:pio, hdd:pio
hdc: CD-232E, ATAPI CD/DVD-ROM drive
hdc: ATAPI 32X CD-ROM drive, 128kB Cache, UDMA(33)
SCSI device sda: 71687340 512-byte hdwr sectors (36704 MB)
SELinux: initialized (dev hdc, type iso9660), uses genfs_contexts
e1000: eth1: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex
e1000: eth1: e1000_watchdog: NIC Link is Down
e1000: eth1: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex

查看CPU
[root@redone etc]# dmesg|grep processor
Detected 2396.908 MHz processor.
Booting processor 1/1 eip 3000
Booting processor 2/6 eip 3000
Booting processor 3/7 eip 3000
Total of 4 processors activated (19070.97 BogoMIPS).

[root@redone etc]# dmesg|grep CPU
Initializing CPU#0
CPU 0 irqstacks, hard=c03d8000 soft=c03b8000
CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000
CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 512K
CPU: Physical Processor ID: 0
CPU: After all inits, caps: bfebf3ff 00000000 00000000 00000080
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
CPU0: Thermal monitoring enabled
CPU0: Intel(R) Xeon(TM) CPU 2.40GHz stepping 07

参考:
SMBIOS
SMBIOS(System Management BIOS)是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。
DMI (Desktop Management Interface, DMI)的主要组成部分是Management InformationFormat (MIF)数据库。这个数据库包括了所有有关电脑系统和配件的信息。通过DMI,用户可以获取序列号、电脑厂商、串口信息以及其它系统配件信息。
在介绍什么是DMI之前,先说说SMBIOS (System Management BIOS,SMBIOS)的概念。 SMBIOS是主板或系统制造者以标准格式显示产品管理信息所需遵循的统一规范。 DMI (Desktop Management Inte***ce, DMI)就是帮助收集电脑系统信息的管理系统,DMI信息的收集必须在严格遵照SMBIOS规范的前提下进行。
SMBIOS和DMI是由行业指导机构Desktop Management Task Force (DMTF)起草的开放性的技术标准,其中,DMI设计适用于任何的平台和操作系统。 DMI充当了管理工具和系统层之间接口的角色。它建立了标准的可管理系统更加方便了电脑厂商和用户对系统的了解。为了提供更为友好的用户工作环境,AOpen开发了实用的WinDMI工具,它采用Windows界面,能够用于多款AOpen主板,完全兼容 Windows 98SE/98/2000/XP操作系统。 WinDMI分为几种功能,首先,默认的[Normal
Mode]功能让用户可以获取包括BIOS、操作系统、主板、内存、扩展槽及扩展接口的所有详细系统信息。 第二种功能为[Dump Memory],它可以让用户转储内存数据,因为它显示了当前DMI的结构数据,所以可以帮助高级用户及软件设计人员处理内存数据。此外,对DMI结构有兴趣的用户也可以使用此项功能进行初步的问题诊断。第三,WinDMI还可以让用户以普通或raw模式保存DMI数据,如果用户需要保存DMI信息,只需按下[Save As]即可。此项功能会在用户指定的文件夹下创建一个 .txt文件,用户就可以在此文本文件中找到所有所需的系统信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: