Linux 시스템에서 서버 모델, CPU, RAM, ROM 및 NIC 정보 보기

12994 단어 CentOS_육
우선 CPU 측면: CPU 모델 보기
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
      8  Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz

물리적 CPU 수 보기
# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
2

CPU 코어 보기
# cat /proc/cpuinfo| grep "cpu cores"| uniq
cpu cores   : 4

논리적 CPU 수 보기
# cat /proc/cpuinfo| grep "processor"| wc -l
8

서버 모델 보기 방법 1
# grep 'DMI' /var/log/dmesg
DMI: Dell Inc. PowerEdge R720/******, BIOS 2.4.3 07/09/2014

방법 2
# yum -y install dmidecode
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.sohu.com
 * epel: mirrors.sohu.com
 * extras: mirrors.aliyun.com
 * linuxtech-release: linuxsoft.cern.ch
 * remi-safe: mirror.innosol.asia
 * updates: mirrors.sohu.com
Package 1:dmidecode-2.12-7.el6.x86_64 already installed and latest version
Nothing to do

# dmidecode |grep -A4 'System Information'
System Information
    Manufacturer: Dell Inc.
    Product Name: PowerEdge R720
    Version: Not Specified
    Serial Number: *******

32비트 또는 64비트 시스템 보기
# uname -a
Linux **** 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

RAM 보기 방법 1
# cat /proc/meminfo
MemTotal:       32826948 kB
MemFree:        30190792 kB
Buffers:          161544 kB
Cached:          1476004 kB
SwapCached:            0 kB
Active:          1377540 kB
Inactive:         814108 kB
Active(anon):     554320 kB
Inactive(anon):    20080 kB
Active(file):     823220 kB
Inactive(file):   794028 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:      16482300 kB
SwapFree:       16482300 kB
Dirty:              5112 kB
Writeback:             0 kB
AnonPages:        553972 kB
Mapped:           129264 kB
Shmem:             20308 kB
Slab:             185168 kB
SReclaimable:     103320 kB
SUnreclaim:        81848 kB
KernelStack:        7968 kB
PageTables:        19384 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    32895772 kB
Committed_AS:    2453404 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      339064 kB
VmallocChunk:   34342499988 kB
HardwareCorrupted:     0 kB
AnonHugePages:    280576 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:        5056 kB
DirectMap2M:     2045952 kB
DirectMap1G:    31457280 kB

방법 2 (swap 구역의 크기도 보았습니다)
# free -m
             total       used       free     shared    buffers     cached
Mem:         32057       2573      29484         19        157       1442
-/+ buffers/cache:        973      31084
Swap:        16095          0      16095

ROM 보기 방법 1
# cat /proc/partitions 
major minor  #blocks  name

   7        0    2168646 loop0
   7        1    3824640 loop1
   8        0  975699968 sda
   8        1     512000 sda1
   8        2  975186944 sda2
 253        0   52428800 dm-0
 253        1   16482304 dm-1
 253        2  906272768 dm-2

방법 2
# fdisk -l

Disk /dev/loop0: 2220 MB, 2220693504 bytes
255 heads, 63 sectors/track, 269 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/loop1: 3916 MB, 3916431360 bytes
64 heads, 32 sectors/track, 3735 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x47840dcd

      Device Boot      Start         End      Blocks   Id  System
/dev/loop1p1   *           1        3735     3824640   17  Hidden HPFS/NTFS

Disk /dev/sda: 999.1 GB, 999116767232 bytes
255 heads, 63 sectors/track, 121469 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004e250

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64      121470   975186944   8e  Linux LVM

네트워크 카드 정보 보기
# ip a
 ....

좋은 웹페이지 즐겨찾기