zoukankan      html  css  js  c++  java
  • 查看服务器的配置

    # cat /proc/cpuinfo | grep physical | sort -n | uniq | wc -l

    3

    代表3个cpu的个数

    查看服务器型号

    # dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product"

             Manufacturer: HP

             Product Name: ProLiant DL170e G6

    查看服务器的CPU型号

    # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq

    Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz

    查看当前操作系统发行版信息

    # cat /etc/redhat-release

    CentOS Linux release 7.5.1804 (Core)

    查看到服务器的内核信息

    # uname -a

    Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    CPU

    查看CPU统计信息

    # lscpu

    Architecture:          x86_64

    CPU op-mode(s):        32-bit, 64-bit

    Byte Order:            Little Endian

    CPU(s):                24

    On-line CPU(s) list:   0-23

    Thread(s) per core:    2

    Core(s) per socket:    6

    Socket(s):             2

    NUMA node(s):          2

    Vendor ID:             GenuineIntel

    CPU family:            6

    Model:                 44

    Model name:            Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz

    Stepping:              2

    CPU MHz:               1600.000

    CPU max MHz:           2400.0000

    CPU min MHz:           1600.0000

    BogoMIPS:              4800.63

    Virtualization:        VT-x

    L1d cache:             32K

    L1i cache:             32K

    L2 cache:              256K

    L3 cache:              12288K

    NUMA node0 CPU(s):     0-5,12-17

    NUMA node1 CPU(s):     6-11,18-23

    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 popcnt aes lahf_lm tpr_shadow vnmi flexpriority ept vpid dtherm arat

    查看CPU型号

    # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

         24  Intel(R) Xeon(R) CPU           E5645  @ 2.40GHz

    查看物理CPU个数

    # cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

    2

    查看每个物理CPU中core的个数(即核数)

    # cat /proc/cpuinfo| grep "cpu cores"| uniq

    cpu cores : 6

    查看逻辑CPU的个数

    # cat /proc/cpuinfo| grep "processor"| wc -l

    24

    内存

    查看概要内存使用情况

    # free -g

                  total        used        free      shared  buff/cache   available

    Mem:             62           0          61           0           0          61

    Swap:            31           0          31

    查看内存硬件信息

    # dmidecode -t memory

    # dmidecode 3.0

    Getting SMBIOS data from sysfs.

    SMBIOS 2.6 present.

    Handle 0x001E, DMI type 16, 15 bytes

    Physical Memory Array

             Location: System Board Or Motherboard

             Use: System Memory

             Error Correction Type: Multi-bit ECC

             Maximum Capacity: 128 GB

             Error Information Handle: Not Provided

             Number Of Devices: 16

    Handle 0x0020, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 1 DIMM8A

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 113ADB16

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x0021, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 1 DIMM7D

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x0022, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 1 DIMM6G

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x0023, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 1 DIMM5B

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 0218F8F4

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x0024, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 1 DIMM4E

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x0025, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 1 DIMM3H

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x0026, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 1 DIMM2C

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 282622D0

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NK-CG

             Rank: Unknown

    Handle 0x0027, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 1 DIMM1F

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 2A0CE8EC

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NK-CG

             Rank: Unknown

    Handle 0x0028, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 2 DIMM8A

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 143AC429

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x0029, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 2 DIMM7D

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 143AFCF0

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x002A, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 2 DIMM6G

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x002B, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 2 DIMM5B

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 0418F927

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x002C, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 2 DIMM4E

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x002D, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 2 DIMM3H

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    Handle 0x002E, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: 72 bits

             Data Width: 64 bits

             Size: 8192 MB

             Form Factor: DIMM

             Set: None

             Locator: PROC 2 DIMM2C

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: Other

             Speed: 1333 MHz

             Manufacturer: Nanya        

             Serial Number: 143AC59D

             Asset Tag: <BAD INDEX>

             Part Number: NT8GC72B4NG0NL-CG

             Rank: Unknown

    Handle 0x002F, DMI type 17, 28 bytes

    Memory Device

             Array Handle: 0x001E

             Error Information Handle: Not Provided

             Total Width: Unknown

             Data Width: 64 bits

             Size: No Module Installed

             Form Factor: Other

             Set: None

             Locator: PROC 2 DIMM1F

             Bank Locator: <BAD INDEX>

             Type: DDR3

             Type Detail: None

             Speed: Unknown

             Manufacturer: <BAD INDEX>

             Serial Number: <BAD INDEX>

             Asset Tag: <BAD INDEX>

             Part Number: <BAD INDEX>

             Rank: Unknown

    查看内存详细使用情况

    # cat /proc/meminfo

    MemTotal:       65797728 kB

    MemFree:        64803200 kB

    MemAvailable:   64772600 kB

    Buffers:            2132 kB

    Cached:           336276 kB

    SwapCached:            0 kB

    Active:           222108 kB

    Inactive:         186012 kB

    Active(anon):      70140 kB

    Inactive(anon):     8708 kB

    Active(file):     151968 kB

    Inactive(file):   177304 kB

    Unevictable:           0 kB

    Mlocked:               0 kB

    SwapTotal:      33030140 kB

    SwapFree:       33030140 kB

    Dirty:                 0 kB

    Writeback:             0 kB

    AnonPages:         69720 kB

    Mapped:            22640 kB

    Shmem:              9136 kB

    Slab:             111972 kB

    SReclaimable:      41016 kB

    SUnreclaim:        70956 kB

    KernelStack:        4960 kB

    PageTables:         3960 kB

    NFS_Unstable:          0 kB

    Bounce:                0 kB

    WritebackTmp:          0 kB

    CommitLimit:    65929004 kB

    Committed_AS:     226800 kB

    VmallocTotal:   34359738367 kB

    VmallocUsed:      396496 kB

    VmallocChunk:   34325399548 kB

    HardwareCorrupted:     0 kB

    AnonHugePages:     14336 kB

    CmaTotal:              0 kB

    CmaFree:               0 kB

    HugePages_Total:       0

    HugePages_Free:        0

    HugePages_Rsvd:        0

    HugePages_Surp:        0

    Hugepagesize:       2048 kB

    DirectMap4k:      169408 kB

    DirectMap2M:     6113280 kB

    DirectMap1G:    62914560 kB

    查看内存的插槽数,已经使用多少插槽.每条内存多大

    # dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: 8192 MB

             Size: 8192 MB

             Size: 8192 MB

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

    硬盘

    查看硬盘和分区分布

    # dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: 8192 MB

             Size: 8192 MB

             Size: 8192 MB

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

             Size: No Module Installed

             Size: 8192 MB

             Size: No Module Installed

    # lsblk

    NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

    sda               8:0    0 410.1G  0 disk

    ├─sda1            8:1    0     1G  0 part /boot

    └─sda2            8:2    0 409.1G  0 part

      ├─centos-root 253:0    0    50G  0 lvm  /

      ├─centos-swap 253:1    0  31.5G  0 lvm  [SWAP]

      └─centos-home 253:2    0 327.6G  0 lvm  /home

    查看硬盘和分区的详细信息

    # fdisk -l

    Disk /dev/sda: 440.3 GB, 440345714688 bytes, 860050224 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk label type: dos

    Disk identifier: 0x000bf90f

       Device Boot      Start         End      Blocks   Id  System

    /dev/sda1   *        2048     2099199     1048576   83  Linux

    /dev/sda2         2099200   860049407   428975104   8e  Linux LVM

    Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/mapper/centos-swap: 33.8 GB, 33822867456 bytes, 66060288 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

    Disk /dev/mapper/centos-home: 351.8 GB, 351755304960 bytes, 687022080 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Sector size (logical/physical): 512 bytes / 512 bytes

    I/O size (minimum/optimal): 512 bytes / 512 bytes

  • 相关阅读:
    优化你的手机游戏
    vuforia 结合 unity3d 开发 AR 的 androidAPP 总结
    self._raiseerror(v) File "D:GameDevelopmentPython27libxmletreeElementTree.py", line 1506, in _raiseerror
    自定义TexturePacker插件导出自己的plist文件
    还原TexturePacker plist 文件以及图片的方法 (切开各小图片)
    no module named firefly.master.master
    c#比较器 排序
    python ——面向对象进阶(反射,双下线方法,静态方法,类方法)
    python——模块和包 需要注意的地方
    举例详解Python中的split()函数的使用方法
  • 原文地址:https://www.cnblogs.com/jeshy/p/10519549.html
Copyright © 2011-2022 走看看