查看linux基本信息

查看启动的端口:

netstat -tuln
或
ss -tuln

查看内存:

free -m

             total       used       free     shared    buffers     cached
Mem:          1000        927         72         47        136        517
-/+ buffers/cache:        273        727
Swap:         1951        383       1568                 

查看内存(显示单位):

free -h
             total       used       free     shared    buffers     cached
Mem:          1.0G       927M        72M        47M       136M       517M
-/+ buffers/cache:       273M       726M
Swap:         1.9G       383M       1.5G

查看有几个CPU

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l  
1

查看单个cpu的物理核数

cat /proc/cpuinfo| grep "cpu cores"| uniq   
cpu cores   : 1

查看逻辑核

cat /proc/cpuinfo| grep "processor"| wc -l   
1

查看CPU详情

cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 6
model name  : QEMU Virtual CPU version 2.1.2
stepping    : 3
microcode   : 0x1
cpu MHz     : 2099.998
cache size  : 4096 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 4
wp      : yes
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni cx16 x2apic popcnt hypervisor lahf_lm
bogomips    : 4199.99
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

查看硬盘信息

df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/dm-0       205G  188G  8.9G  96% /
udev             10M     0   10M   0% /dev
tmpfs           201M   25M  176M  13% /run
tmpfs           501M  4.0K  501M   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           501M     0  501M   0% /sys/fs/cgroup
/dev/vda1       236M   33M  191M  15% /boot
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容