查看Linux的系统信息

查看Linux系统信息的命令

Linux查看系统的一些关于内核,cpu,内存,硬盘信息的命令,这里使用的是阿里云的Centos7.3的系统。


查看内核信息
  • uname -a

    Linux izbp1chqvj8ehrcdu67uvtz 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    
    • uname -s (内核名字)

      Linux

    • uname -r (内核发行版本)

      3.10.0-514.26.2.el7.x86_64

    • uanme -p (处理器架构)

      x86_64

    • uanme -o (操作系统)

      GNU/Linux

  • cat /proc/version

    Linux version 3.10.0-514.26.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Tue Jul 4 15:04:05 UTC 2017
    

系统发行版本
  • cat /etc/centos-release

    CentOS Linux release 7.3.1611 (Core)

    这里是centos7.3


cpu相关

  • lscpu

    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                1
    On-line CPU(s) list:   0
    Thread(s) per core:    1
    Core(s) per socket:    1
    
  • cat /proc/cpuinfo

    processor	: 0
    vendor_id	: GenuineIntel
    cpu family	: 6
    model		: 79
    model name	: Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
    stepping	: 1
    microcode	: 0x1
    cpu MHz		: 2494.222
    

内存相关
  • lsmem

    RANGE                                  SIZE  STATE REMOVABLE BLOCK
    0x0000000000000000-0x000000004fffffff  1.3G online        否   0-9
    0x0000000050000000-0x0000000057ffffff  128M online        是    10
    0x0000000058000000-0x000000007fffffff  640M online        否 11-15
    
    Memory block size:       128M
    Total online memory:       2G
    Total offline memory:      0B
    [zhubin@izbp1chqvj8ehrcdu67uvtz ~]$ lsmem
    RANGE                                  SIZE  STATE REMOVABLE BLOCK
    0x0000000000000000-0x000000004fffffff  1.3G online        否   0-9
    0x0000000050000000-0x0000000057ffffff  128M online        是    10
    0x0000000058000000-0x000000007fffffff  640M online        否 11-15
    
    Memory block size:       128M
    Total online memory:       2G
    Total offline memory:      0B
    
  • cat /proc/meminfo

    MemTotal:        1883724 kB
    MemFree:          897868 kB
    MemAvailable:    1500748 kB
    Buffers:           86424 kB
    Cached:           605984 kB
    SwapCached:            0 kB
    Active:           400164 kB
    Inactive:         445816 kB
    Active(anon):     153768 kB
    Inactive(anon):      128 kB
    Active(file):     246396 kB
    Inactive(file):   445688 kB
    Unevictable:           0 kB
    

硬盘相关
  • fdisk -l

    查看当前的磁盘分区信息(主要是分区表信息)

  • df -h

    查看当前文件系统信息,包括容量大小、使用情况、挂载点等


实时查看
  • top

    显示当前系统cpu,内存的利用率

    top - 16:59:29 up 6 days, 29 min,  2 users,  load average: 0.00, 0.01, 0.05
    Tasks:  81 total,   1 running,  66 sleeping,  14 stopped,   0 zombie
    %Cpu(s):  0.4 us,  0.2 sy,  0.5 ni, 98.8 id,  0.1 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem :  1883724 total,   891816 free,   198964 used,   792944 buff/cache
    KiB Swap:        0 total,        0 free,        0 used.  1500404 avail Mem 
    
      PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND     
        1 root      20   0   43104   2520   1428 S  0.0  0.1   0:05.38 systemd     
        2 root      20   0       0      0      0 S  0.0  0.0   0:00.01 kthreadd    
        3 root      20   0       0      0      0 S  0.0  0.0   0:01.41 ksoftirqd/0 
        5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H
        7 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0 
        8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh      
        9 root      20   0       0      0      0 S  0.0  0.0   0:24.94 rcu_sched   
       10 root      rt   0       0      0      0 S  0.0  0.0   0:02.07 watchdog/0  
       12 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kdevtmpfs   
       13 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 netns       
       14 root      20   0       0      0      0 S  0.0  0.0   0:00.08 khungtaskd  
       15 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 writeback   
       16 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kintegrityd 
       17 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 bioset    
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值