查看Linux系统基础信息的常用命令,包括:CPU、内存、磁盘等信息

  • 服务器操作系统版本信息:
[root@demo /]# uname -a
Linux demo 5.10.0-153.29.0.106.oe2203sp2.x86_64 #1 SMP Thu Oct 12 10:04:22 CST 2023 x86_64 x86_64 x86_64 GNU/Linux
  • 列出所有块设备信息:
[root@demo /]# lsblk
NAME               MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                  8:0    0   200G  0 disk 
├─sda1               8:1    0     1G  0 part /boot
└─sda2               8:2    0   199G  0 part 
  ├─openeuler-root 253:0    0 191.1G  0 lvm  /
  └─openeuler-swap 253:1    0   7.9G  0 lvm  [SWAP]
sr0                 11:0    1   3.5G  0 rom  

  • 服务器内存信息:
[root@demo /]# free -h
               total        used        free      shared  buff/cache   available
Mem:            30Gi       3.6Gi       6.1Gi        40Mi        21Gi        27Gi
Swap:          7.9Gi          0B       7.9Gi

  • 服务器CPU信息:
[root@demo /]# lscpu
架构:                   x86_64
  CPU 运行模式:         32-bit, 64-bit
  Address sizes:         43 bits physical, 48 bits virtual
  字节序:               Little Endian
CPU:                     16
  在线 CPU 列表:        0-15
厂商 ID:                GenuineIntel
  BIOS Vendor ID:        GenuineIntel
  型号名称:             Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
    BIOS Model name:     Intel(R) Xeon(R) Gold 6248 CPU @ 2.50GHz
    CPU 系列:           6
    型号:               85
    每个核的线程数:     1
    每个座的核数:       1
    座:                 16
    步进:               7
    BogoMIPS:           4988.28
    标记:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl x
                         topology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hyperviso
                         r lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed 
                         adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xsaves arat pku ospke md_clear flush_l1d arch_capabilities
Virtualization features: 
  超管理器厂商:         VMware
  虚拟化类型:           完全
Caches (sum of all):     
  L1d:                   512 KiB (16 instances)
  L1i:                   512 KiB (16 instances)
  L2:                    16 MiB (16 instances)
  L3:                    440 MiB (16 instances)
NUMA:                    
  NUMA 节点:            1
  NUMA 节点0 CPU:       0-15
Vulnerabilities:         
  Gather data sampling:  Unknown: Dependent on hypervisor status
  Itlb multihit:         KVM: Mitigation: VMX unsupported
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Retbleed:              Mitigation; Enhanced IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Vulnerable: eIBRS with unprivileged eBPF
  Srbds:                 Not affected
  Tsx async abort:       Not affected
  • 服务器的磁盘情况:
[root@demo /]# df -h
文件系统                    容量  已用  可用 已用% 挂载点
devtmpfs                    4.0M     0  4.0M    0% /dev
tmpfs                        16G     0   16G    0% /dev/shm
tmpfs                       6.2G   41M  6.2G    1% /run
tmpfs                       4.0M     0  4.0M    0% /sys/fs/cgroup
/dev/mapper/openeuler-root  188G   22G  156G   13% /
tmpfs                        16G   32K   16G    1% /tmp
/dev/sda1                   974M  251M  656M   28% /boot
  • 显示目录占用空间大小
[root@demo /]# du -sh *
146M	bin
4.0K	games
40M	include
575M	lib
357M	lib64
158M	libexec
20G	local
65M	sbin
554M	share
107M	src
0	tmp
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值