linux下常用命令大全,做个记录方便自己后期使用
1、lspci命令,查看服务器当前pci设备的信息,比如主板、显卡、网卡、硬盘等,若找不到命令,请运行 yum install pciutils -y 安装
[root@ebs-57916 ~]# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:06.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:07.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
- [root@ebs-57916 ~]# lspci
- 00:00.0 Host bridge: Intel Corporation 440FX – 82441FX PMC [Natoma] (rev 02)
- 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
- 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
- 00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
- 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
- 00:02.0 VGA compatible controller: Cirrus Logic GD 5446
- 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
- 00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
- 00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
- 00:06.0 SCSI storage controller: Red Hat, Inc Virtio block device
- 00:07.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
[root@ebs-57916 ~]# lspci
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:06.0 SCSI storage controller: Red Hat, Inc Virtio block device
00:07.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
2、查看CPU
物理CPU个数: cat /proc/cpuinfo |grep “physical id”|sort |uniq|wc -l
每个CPU物理核数: cat /proc/cpuinfo |grep “cpu cores”|uniq
每个CPU逻辑核数: cat /proc/cpuinfo |grep “siblings”|uniq
总CPU逻辑核数: cat /proc/cpuinfo |grep -c “processor”
我的服务器是两个芯片组,每个芯片组是10核,支持超线程,所以逻辑CPU是40。
超线程指物理内核+逻辑内核,芯片上只存在一个物理内核,但是这个物理内核可以模拟出一个逻辑内核,于是系统信息就显示了两个内核,一真一假
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
4
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "cpu cores"|uniq
cpu cores : 1
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "siblings"|uniq
siblings : 1
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep -c "processor"
4
- [root@ebs-57916 ~]# cat /proc/cpuinfo |grep “physical id”|sort |uniq|wc -l
- 4
- [root@ebs-57916 ~]# cat /proc/cpuinfo |grep “cpu cores”|uniq
- cpu cores : 1
- [root@ebs-57916 ~]# cat /proc/cpuinfo |grep “siblings”|uniq
- siblings : 1
- [root@ebs-57916 ~]# cat /proc/cpuinfo |grep -c “processor”
- 4
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
4
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "cpu cores"|uniq
cpu cores : 1
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep "siblings"|uniq
siblings : 1
[root@ebs-57916 ~]# cat /proc/cpuinfo |grep -c "processor"
4
声明:本站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,若涉及侵权请及时告知,将会在第一时间删除。本站原创内容未经允许不得转载:
西数超哥博客 »
linux常用命令大全