帝王谷资源网 Design By www.wdxyy.com

Hi,大家好;今天是双12,大家剁手了没。今天给大家带来的是《Linux查看服务器上的硬件信息》本篇文章的示例全部是在服务器(Inspur SA5112M4)上实现的,有些命令在虚拟机上达不到效果

查看服务器型号、序列号

root@zhangdaifu# dmidecode -s system-serial-number
root@zhangdaifu# dmidecode -t system | grep -i 'serial number'
"htmlcode">
root@zhangdaifu# dmidecode | grep -i -A16 'System information$'
System Information
"htmlcode">
root@zhangdaifu# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
"/1.2 MB floppy services are supported (int 13h)
"/720 kB floppy services are supported (int 13h)
"/2.88 MB floppy services are supported (int 13h)
"htmlcode">
root@zhangdaifu# lspci | head -10
00:00.0 Host bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D DMI2 (rev 01)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
00:01.1 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 1 (rev 01)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:02.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 2 (rev 01)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:03.2 PCI bridge: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D PCI Express Root Port 3 (rev 01)
00:04.0 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 0 (rev 01)
00:04.1 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 1 (rev 01)
00:04.2 System peripheral: Intel Corporation Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Crystal Beach DMA Channel 2 (rev 01)

查看cpu型号

root@zhangdaifu# grep name /proc/cpuinfo | cut -f2 -d: | uniq -c
"htmlcode">
root@zhangdaifu# grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
2

系统中实际物理CPU的数量(核数)

root@zhangdaifu# grep 'processor' /proc/cpuinfo | wc -l
56

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

root@zhangdaifu# grep "cores" /proc/cpuinfo | uniq
cpu cores : 14

查看CPU的主频

root@zhangdaifu# grep -i MHz /proc/cpuinfo | uniq
cpu MHz : 2899.781
cpu MHz : 2900.156
cpu MHz : 2899.593
cpu MHz : 2899.687
cpu MHz : 2900.156
cpu MHz : 2899.968
cpu MHz : 2900.156
cpu MHz : 2899.875
cpu MHz : 2899.968
cpu MHz : 2899.781
cpu MHz : 2899.968
cpu MHz : 2899.781
cpu MHz : 2899.968
cpu MHz : 2899.781
cpu MHz : 2899.875
cpu MHz : 2899.968
cpu MHz : 2899.875
cpu MHz : 2899.781
cpu MHz : 2901.281
cpu MHz : 2900.062
cpu MHz : 2899.968
cpu MHz : 2898.187
cpu MHz : 2901.187
cpu MHz : 2900.156
cpu MHz : 2899.781
cpu MHz : 2899.687
cpu MHz : 2899.968
cpu MHz : 2899.687
cpu MHz : 2899.968
cpu MHz : 2900.156
cpu MHz : 2899.968
cpu MHz : 2900.250
cpu MHz : 2899.968
cpu MHz : 2899.875
cpu MHz : 2899.968
cpu MHz : 2899.875
cpu MHz : 2899.218
cpu MHz : 2899.687
cpu MHz : 2900.812
cpu MHz : 2899.687
cpu MHz : 2899.875
cpu MHz : 2899.968
cpu MHz : 2899.218
cpu MHz : 2900.812
cpu MHz : 2899.968
cpu MHz : 2899.593
cpu MHz : 2899.781

查看CPU的详细信息

root@zhangdaifu# head -26 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
stepping : 1
microcode : 0xb00002e
cpu MHz : 2899.781
cache size : 35840 KB
physical id : 0
siblings : 28
core id : 0
cpu cores : 14
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 20
wp : yes
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 eagerfpu pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts
bogomips : 4788.94
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

AND

root@zhangdaifu# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 56
On-line CPU(s) list: 0-55
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
Stepping: 1
CPU MHz: 2900.062
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4788.94
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 35840K
NUMA node0 CPU(s): 0-13,28-41
NUMA node1 CPU(s): 14-27,42-55
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 eagerfpu pni pclmulqdq dtes64 ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 cdp_l3 intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts

查看cpu运行模式

root@zhangdaifu# getconf LONG_BIT
64

查看cpu是否支持64bit

root@zhangdaifu# grep flags /proc/cpuinfo | grep ' lm ' | wc -l

查看内存硬件信息

root@zhangdaifu# dmidecode -t memory | head -45 | tail -23
"htmlcode">
root@zhangdaifu# dmidecode -t memory | grep -i 'Locator' | grep -v -i 'Bank' | grep -v -i 'no'
"htmlcode">
root@zhangdaifu# dmidecode | grep -P 'Maximum\s+Capacity'
"htmlcode">
root@zhangdaifu# dmidecode -t memory | grep -A5 -i 'memory device' | grep Size | grep -iv range
"htmlcode">
root@zhangdaifu# dmidecode | grep -A16 -i "Memory Device" | grep -i 'Speed'
"htmlcode">
root@zhangdaifu# cat /proc/meminfo
MemTotal: 131716456 kB
MemFree: 128926560 kB
MemAvailable: 129823072 kB
Buffers: 139584 kB
Cached: 1060328 kB
SwapCached: 0 kB
Active: 299052 kB
Inactive: 967756 kB
Active(anon): 72860 kB
Inactive(anon): 11760 kB
Active(file): 226192 kB
Inactive(file): 955996 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 32 kB
Writeback: 0 kB
AnonPages: 67424 kB
Mapped: 30548 kB
Shmem: 17632 kB
Slab: 423604 kB
SReclaimable: 340432 kB
SUnreclaim: 83172 kB
KernelStack: 10160 kB
PageTables: 3836 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 65858228 kB
Committed_AS: 1228180 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 520712 kB
VmallocChunk: 34291843068 kB
HardwareCorrupted: 0 kB
AnonHugePages: 6144 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 201200 kB
DirectMap2M: 5945344 kB
DirectMap1G: 130023424 kB

查看内存使用信息

root@zhangdaifu# free -m
"htmlcode">
root@zhangdaifu# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 279.4G 0 disk 
"htmlcode">
root@zhangdaifu# fdisk -l

Disk /dev/sda: 300.0 GB, 300000000000 bytes, 585937500 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: 0xd8f7f38b

Device Boot Start End Blocks Id System
"htmlcode">
root@zhangdaifu# mount | column -t
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=65833276k,nr_inodes=16458319,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/sda2 on / type ext4 (rw,noatime,nobarrier,data=ordered)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=46109)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
/dev/sdb on /mnt/disk1 type xfs (rw,noatime,attr2,nobarrier,inode64,noquota)
/dev/sda1 on /boot type ext4 (rw,noatime,nobarrier,data=ordered)
/dev/sda3 on /home type ext4 (rw,noatime,nobarrier,data=ordered)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/1102 type tmpfs (rw,nosuid,nodev,relatime,size=13171648k,mode=700,uid=1102,gid=1102)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=13171648k,mode=700)

查看硬盘使用情况

root@zhangdaifu# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 47G 2.5G 43G 6% /
devtmpfs devtmpfs 63G 0 63G 0% /dev
tmpfs tmpfs 63G 0 63G 0% /dev/shm
tmpfs tmpfs 63G 18M 63G 1% /run
tmpfs tmpfs 63G 0 63G 0% /sys/fs/cgroup
/dev/sdb xfs 1.9T 21G 1.8T 2% /mnt/disk1
/dev/sda1 ext4 453M 178M 249M 42% /boot
/dev/sda3 ext4 227G 254M 215G 1% /home
tmpfs tmpfs 13G 0 13G 0% /run/user/1102
tmpfs tmpfs 13G 0 13G 0% /run/user/0

查看网卡硬件信息

root@zhangdaifu# lspci | grep -i 'eth'
01:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
01:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
07:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
07:00.1 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)

查看系统的所有网络接口

root@zhangdaifu# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
"htmlcode">
root@zhangdaifu# ifconfig -a
bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST> mtu 1500
"htmlcode">
root@zhangdaifu# ipmitool lan print 1
Set in Progress : Set Complete
Auth Type Support : MD2 MD5 PASSWORD 
Auth Type Enable : Callback : MD2 MD5 PASSWORD 
"htmlcode">
root@zhangdaifu# ethtool eth01
Settings for eth01:
  Supported ports: [ FIBRE ]
  Supported link modes: 10000baseT/Full 
  Supported pause frame use: Symmetric
  Supports auto-negotiation: No
  Advertised link modes: 10000baseT/Full 
  Advertised pause frame use: Symmetric
  Advertised auto-negotiation: No
  Speed: Unknown!
  Duplex: Unknown! (255)
  Port: Other
  PHYAD: 0
  Transceiver: external
  Auto-negotiation: off
  Supports Wake-on: d
  Wake-on: d
  Current message level: 0x00000007 (7)
        drv probe link
  Link detected: no

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

标签:
Linux,服务器硬件,Linux查看硬件信息

帝王谷资源网 Design By www.wdxyy.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
帝王谷资源网 Design By www.wdxyy.com

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。