linux 常用命令

系统设置相关

  1. Linux 查看CPU和内存使用率 top
    top - 20:35:58 up 159 days, 18:00,  9 users,  load average: 40.73, 41.14, 41.86
    Tasks: 516 total,   5 running, 511 sleeping,   0 stopped,   0 zombie
    %Cpu(s): 10.0 us,  0.2 sy, 84.7 ni,  5.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem : 13191814+total, 47438360 free, 35677444 used, 48802336 buff/cache
    KiB Swap:        0 total,        0 free,        0 used. 92182000 avail Mem
    
      PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
    97589 sgji      20   0 7980944 313320  41784 R  99.7  0.2  10241:18 python3
    20218 sgji      20   0 7948144 332288  41776 R  99.3  0.3  10579:45 python3
    68605 root      20   0   63876  13396   8784 S   1.7  0.0   0:21.41 gitlab-runner
    34169 lizejun   20   0   18.0g   1.0g  14548 S   0.7  0.8  90:03.21 java
    73286 hlj       20   0  162404   2716   1588 R   0.7  0.0   0:00.04 top
    
  2. 查看本地磁盘挂载和使用率 df -h
    文件系统        容量  已用  可用 已用% 挂载点
    /dev/sda2        48G   20G   29G   41% /
    tmpfs            63G  2.8G   61G    5% /run
    /dev/sda3       228G   19G  210G    9% /export
    /dev/sdb1        22T   13T  9.7T   56% /data
    tmpfs            13G     0   13G    0% /run/user/0
    

你可能感兴趣的:(linux 常用命令)