redhat linux 配置信息查看
查看cpu信息
查看cpu型号
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
# 输出结果
2 Intel(R) Xeon(R) CPU E5-2637 v4 @ 3.50GHz
查看物理cpu数量
grep 'physical id' /proc/cpuinfo | sort | uniq | wc -l
# 输出结果
- 查看每个物理cpu核数
```bash
cat /proc/cpuinfo |grep "cores"|uniq
# 输出结果
2
1
2
3
4
5
6
查看cpu总核数
cat /proc/cpuinfo |grep 'processor'|wc -l
# 输出结果
1
2
3
查看cpu主频
cat /proc/cpuinfo |grep MHz|uniq
# 输出结果
cpu MHz : 3499.996
1
2
3
查看cpu详细信息
cat /proc/cpuinfo | head -20
# 输出结果
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 79
model name : Intel(R) Xeon(R) CPU E5-2637 v4 @ 3.50GHz
stepping : 1
microcode : 0xb000038
cpu MHz : 3499.996
cache size : 15360 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
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 mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap xsaveopt dtherm arat pln pts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
查看cpu相关信息
lscpu
# 输出结果
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2637 v4 @ 3.50GHz
Stepping: 1
CPU MHz: 3499.996
BogoMIPS: 6999.99
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): 0,1
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap xsaveopt dtherm arat pln pts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
查看cpu运行模式
getconf LONG_BIT
# 输出结果
64
1
2
3
查看内存信息
查看内存使用情况
free -m // b, k, m, g
# 输出结果
total used free shared buff/cache available
Mem: 3785 135 3164 8 485 3386
Swap: 6555 0 6555
1
2
3
4
5
查看硬盘信息
查看挂接分区状态
fdisk -l | grep Disk
# 输出结果
Disk /dev/sda: 68.7 GB, 68719476736 bytes, 134217728 sectors
Disk label type: dos
Disk identifier: 0x000af570
Disk /dev/mapper/rhel-root: 40.8 GB, 40831549440 bytes, 79749120 sectors
Disk /dev/mapper/rhel-swap: 6874 MB, 6874464256 bytes, 13426688 sectors
Disk /dev/mapper/rhel-home: 19.9 GB, 19935526912 bytes, 38936576 sectors
1
2
3
4
5
6
7
8
查看硬盘和分区
lsblk
# 输出结果
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 63G 0 part
├─rhel-root 253:0 0 38G 0 lvm /
├─rhel-swap 253:1 0 6.4G 0 lvm [SWAP]
└─rhel-home 253:2 0 18.6G 0 lvm /home
sr0 11:0 1 1024M 0 rom
1
2
3
4
5
6
7
8
9
10
查看分区挂载状态
mount | column -t
# 输出结果
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1925916k,nr_inodes=481479,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=620,ptmxmode=000)
1
2
3
4
5
6
7
8
查看硬盘使用情况
df -hT
# 输出结果
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/rhel-root xfs 39G 2.3G 36G 6% /
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs tmpfs 1.9G 9.0M 1.9G 1% /run
tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 145M 870M 15% /boot
/dev/mapper/rhel-home xfs 19G 33M 19G 1% /home
tmpfs tmpfs 379M 0 379M 0% /run/user/0
1
2
3
4
5
6
7
8
9
10
11
查看网卡信息
查看网卡硬件信息
lspci | grep -i 'eth'
1
查看所有网络接口
ifconfig -a
ip link show
1
2
查看某个网络的详细信息
ethtool eth0
————————————————
版权声明:本文为CSDN博主「_w_q_f」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u013305830/article/details/123002565