2,268   Linux

 

总核数 物理CPU个数 每颗物理CPU的核数 

总逻辑CPU数 物理CPU个数 每颗物理CPU的核数 超线程数

 

查看逻辑CPU的个数

cat /proc/cpuinfo| grep “processor”| wc -l

 

1,查看cpu个数
ubuntu@VM-138-137-ubuntu:~$ cat /proc/cpuinfo |grep “physical id”|sort |uniq|wc -l
1

2,查看cpu 核数
ubuntu@VM-138-137-ubuntu:~$ cat /proc/cpuinfo |grep “cores”|uniq
cpu cores : 1

3,查看内存情况
ubuntu@VM-138-137-ubuntu:~$ free -m
total used free shared buffers cached
Mem: 995 731 264 0 148 360
-/+ buffers/cache: 222 772
Swap: 0 0 0

 

4,查看硬盘

ubuntu@ip-172-31-6-145:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 1.1G 6.3G 15% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 284M 8.0K 284M 1% /dev
tmpfs 59M 196K 59M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 295M 0 295M 0% /run/shm
none 100M 0 100M 0% /run/user

 

5,输出各处理器的详细信息

ubuntu@ip-172-31-6-145:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 45
model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
stepping : 6
microcode : 0x619
cpu MHz : 1795.672
cache size : 20480 KB
physical id : 0
siblings : 1
core id : 3
cpu cores : 1
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu de tsc msr pae cx8 apic sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl nonstop_tsc pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 popcnt tsc_deadline_timer aes avx hypervisor lahf_lm
bogomips : 3591.34
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:




Leave a Reply

Your email address will not be published. Required fields are marked *