linux 系统信息查看命令

常用的linux系统信息查看:

A.  cat /proc/cpuinfo | grep "physical id"    # 查询物理cpu个数

[root@mynet ~]# cat /proc/cpuinfo | grep "physical id"     //查询结果显示有1个物理CPU
physical id     : 0
physical id     : 0
physical id     : 0
physical id     : 0

B.  cat /proc/cpuinfo | grep processor    #查询CPU的核数

[root@mynet ~]# cat /proc/cpuinfo | grep processor         //查询结果显示有4核
processor       : 0
processor       : 1
processor       : 2
processor       : 3

 综上所述,该服务器有1颗4核的CPU

 C. ethtool -p DEVNAME   查看相应设备名称对应的设备位置

[root@MyOpenStack ~]# ethtool -p enp217s0f1             //回车后与eth0 相对应的网卡接口旁边的指示灯就会闪烁,可以确定enp217s0f1 网口的位置。(按下Ctrl+C 结束命令,停止闪烁)

 

 

 

1.    lsb_release -a    # 查看linux是什么版本的信息,使用于所有版本的Linux

[root@xzythpt04 ~]# lsb_release -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 6.7 (Santiago)
Release:        6.7
Codename:       Santiago

 2.  uname –a                       # 查看内核/操作系统/CPU信息的linux系统信息命令

[root@mynet ~]# uname -a
Linux mynet 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

 3.  head -n 1 /etc/issue           # 查看操作系统版本

[root@xzythpt04 ~]# head -n 1 /etc/issue
Red Hat Enterprise Linux Server release 6.7 (Santiago)

 4.  cat /proc/cpuinfo              # 查看CPU信息的linux系统信息命令

[root@mynet ~]# cat /proc/cpuinfo 
processor       : 0                                     //系统中逻辑处理核的编号
vendor_id       : AuthenticAMD                          //CPU制造商
cpu family      : 23                                    //CPU产品系列代号
model           : 49                                    //CPU属于其系列中的哪一代的代号
model name      : AMD EPYC 7K62 48-Core Processor       //CPU属于的名字及其编号、标称主频
stepping        : 0                                     //CPU属于制作更新版本
microcode       : 0x1000065                             //
cpu MHz         : 2595.124                              //CPU的实际使用主频
cache size      : 512 KB                                //CPU二级缓存大小
physical id     : 0                                     //单个CPU的标号
siblings        : 4                                     //单个CPU逻辑物理核数
core id         : 0                                     //当前物理核在其所处CPU中的编号,这个编号不一定连续
cpu cores       : 4                                     //该逻辑核所处CPU的物理核数
apicid          : 0                                     //用来区分不同逻辑核的编号,系统中每个逻辑核的此编号必然不同,此编号不一定连续
initial apicid  : 0                                     //
fpu             : yes                                   //是否具有浮点运算单元(Floating Point Unit)
fpu_exception   : yes                                   //是否支持浮点计算异常
cpuid level     : 13                                    //执行cpuid指令前,eax寄存器中的值,根据不同的值cpuid指令会返回不同的内容
wp              : yes                                   //表明当前CPU是否在内核态支持对用户空间的写保护(Write Protection)
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall 
nx mmxext fxsr_opt pdpe1gb rdtscp lm art rep_good nopl extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16
sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm
sse4a misalignsse 3dnowprefetch osvw topoext retpoline_amd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed
adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 arat
//当前CPU支持的功能
bogomips : 5190.24 //在系统内核启动时粗略测算的CPU速度(Million Instructions Per Second) TLB size : 1024 4K pages // clflush size : 64 //每次刷新缓存的大小单位 cache_alignment : 64 //缓存地址对齐单位 address sizes : 48 bits physical, 48 bits virtual //可访问地址空间位数 power management: //对能源管理的支持 ......

 5.     hostname                       # 查看计算机名

[root@mynet ~]# hostname
mynet

 6.  lspci -tv                      # 列出所有PCI设备

[root@mynet ~]# lspci -tv
-[0000:00]-+-00.0  Intel Corporation 440FX - 82441FX PMC [Natoma]
           +-01.0  Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
           +-01.1  Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
           +-01.2  Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II]
           +-01.3  Intel Corporation 82371AB/EB/MB PIIX4 ACPI
           +-02.0  Cirrus Logic GD 5446
           +-03.0-[01]--
           +-04.0-[02]--
           +-05.0  Red Hat, Inc. Virtio network device
           +-06.0  Red Hat, Inc. Virtio block device
           \-07.0  Red Hat, Inc. Virtio memory balloon

 7.  lsusb -tv                      # 列出所有USB设备

[root@xzythpt04 ~]# lsusb -tv
Bus#  2
`-Dev#   1 Vendor 0x1d6b Product 0x0002
  `-Dev#   2 Vendor 0x8087 Product 0x0024
    `-Dev#   9 Vendor 0x0624 Product 0x0248
      `-Dev#  10 Vendor 0x04b3 Product 0x4010
Bus#  1
`-Dev#   1 Vendor 0x1d6b Product 0x0002
  `-Dev#   2 Vendor 0x8087 Product 0x0024

 8. lsmod                          # 列出加载的内核模块

[root@mynet ~]# lsusb -tv
-bash: lsusb: command not found
[root@mynet ~]# lsmod
Module                  Size  Used by
binfmt_misc            17468  1 
nfnetlink              14519  0 
rdma_ucm               26931  0 
ib_ucm                 22566  0 
rdma_cm                64252  1 rdma_ucm
iw_cm                  43918  1 rdma_cm
ib_ipoib              176977  0 
ib_cm                  53015  3 rdma_cm,ib_ucm,ib_ipoib
ib_umad                27587  0 
mlx5_fpga_tools        14392  0 
mlx5_ib               398012  0 
ib_uverbs             134486  3 mlx5_ib,ib_ucm,rdma_ucm
mlx5_core            1182018  2 mlx5_ib,mlx5_fpga_tools
vfio_mdev              12841  0 
vfio_iommu_type1       22440  0 
vfio                   32657  2 vfio_mdev,vfio_iommu_type1
mdev                   20672  2 vfio_mdev,mlx5_core
mlxfw                  18227  1 mlx5_core
mlx4_ib               220791  0 
ib_core               379728  10 rdma_cm,ib_cm,iw_cm,mlx4_ib,mlx5_ib,ib_ucm,ib_umad,ib_uverbs,rdma_ucm,ib_ipoib
mlx4_en               142468  0 
ptp                    19231  2 mlx4_en,mlx5_core
pps_core               19057  1 ptp
mlx4_core             361489  2 mlx4_en,mlx4_ib
mlx_compat             47141  17 mdev,rdma_cm,vfio_mdev,ib_cm,iw_cm,mlx4_en,mlx4_ib,mlx5_ib,mlx5_fpga_tools,ib_ucm,ib_core,ib_umad,ib_uverbs,mlx4_core,mlx5_core,rdma_ucm,ib_ipoib
devlink                60067  4 mlx4_en,mlx4_ib,mlx4_core,mlx5_core
crc32_pclmul           13133  0 
ghash_clmulni_intel    13273  0 
aesni_intel           189456  0 
lrw                    13286  1 aesni_intel
gf128mul               15139  1 lrw
ppdev                  17671  0 
glue_helper            13990  1 aesni_intel
parport_pc             28205  0 
parport                46395  2 ppdev,parport_pc
ablk_helper            13597  1 aesni_intel
cryptd                 21190  3 ghash_clmulni_intel,aesni_intel,ablk_helper
sg                     40719  0 
virtio_balloon         18015  0 
i2c_piix4              22401  0 
joydev                 17389  0 
pcspkr                 12718  0 
ip_tables              27126  0 
ext4                  584153  1 
mbcache                14958  1 ext4
jbd2                  107478  1 ext4
sr_mod                 22416  0 
cdrom                  42556  1 sr_mod
ata_generic            12923  0 
pata_acpi              13053  0 
virtio_net             28063  0 
virtio_blk             18323  2 
cirrus                 24171  1 
drm_kms_helper        186531  1 cirrus
syscopyarea            12529  1 drm_kms_helper
sysfillrect            12701  1 drm_kms_helper
sysimgblt              12640  1 drm_kms_helper
fb_sys_fops            12703  1 drm_kms_helper
ata_piix               35052  0 
ttm                    96673  1 cirrus
crct10dif_pclmul       14307  0 
crct10dif_common       12595  1 crct10dif_pclmul
crc32c_intel           22094  0 
drm                   456166  4 ttm,drm_kms_helper,cirrus
libata                243133  3 pata_acpi,ata_generic,ata_piix
serio_raw              13434  0 
virtio_pci             22985  0 
virtio_ring            22746  4 virtio_blk,virtio_net,virtio_pci,virtio_balloon
virtio                 14959  4 virtio_blk,virtio_net,virtio_pci,virtio_balloon
floppy                 69432  0 
drm_panel_orientation_quirks    17180  1 drm
scsi_transport_iscsi    99909  1 

 9.  env                            # 查看环境变量资源

[root@mynet ~]# env
XDG_SESSION_ID=105594
HOSTNAME=mynet
TERM=xterm
SHELL=/bin/bash
HISTSIZE=3000
SSH_CLIENT=101.249.33.103 7204 22
SSH_TTY=/dev/pts/1
USER=root
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:
MAIL=/var/spool/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
PWD=/root
LANG=en_US.utf8
SHLVL=1
HOME=/root
LOGNAME=root
SSH_CONNECTION=101.249.33.103 7204 172.21.0.17 22
LESSOPEN=||/usr/bin/lesspipe.sh %s
PROMPT_COMMAND=history -a; history -a; printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"
XDG_RUNTIME_DIR=/run/user/0
HISTTIMEFORMAT=%F %T 
_=/usr/bin/env

 10.  free -m                        # 查看内存使用量和交换区使用量

[root@mynet ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           7820         227        1119           0        6474        7290
Swap:             0           0           0

 11.  df -h                          # 查看各分区使用情况

[root@mynet ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G   24K  3.9G   1% /dev/shm
tmpfs           3.9G  516K  3.9G   1% /run
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/vda1        50G  7.5G   40G  16% /
tmpfs           783M     0  783M   0% /run/user/0

 12.  du -sh                         # 查看指定目录的大小

[root@MyOpenStack ~]# du -sh /home
3.8M    /home

 13.  grep MemTotal /proc/meminfo    # 查看内存总量

[root@mynet /]# grep MemTotal /proc/meminfo
MemTotal:        8008696 kB

 14.  grep MemFree /proc/meminfo     # 查看空闲内存量

[root@mynet /]# grep MemFree /proc/meminfo
MemFree:         1095404 kB

 15.  uptime                         # 查看系统运行时间、用户数、负载

[root@mynet /]# uptime
 22:07:07 up 72 days,  1:37,  1 user,  load average: 0.00, 0.01, 0.05

 16.  cat /proc/loadavg              # 查看系统负载磁盘和分区

[root@mynet /]# cat /proc/loadavg 
0.00 0.01 0.05 2/162 29085

 17. mount | column -t              # 查看挂接的分区状态

[root@mynet /]# mount | column -t
sysfs        on  /sys                             type  sysfs        (rw,nosuid,nodev,noexec,relatime)
proc         on  /proc                            type  proc         (rw,nosuid,nodev,noexec,relatime)
devtmpfs     on  /dev                             type  devtmpfs     (rw,nosuid,size=3993436k,nr_inodes=998359,mode=755)
securityfs   on  /sys/kernel/security             type  securityfs   (rw,nosuid,nodev,noexec,relatime)
tmpfs        on  /dev/shm                         type  tmpfs        (rw,nosuid,nodev)
devpts       on  /dev/pts                         type  devpts       (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs        on  /run                             type  tmpfs        (rw,nosuid,nodev,mode=755)
tmpfs        on  /sys/fs/cgroup                   type  tmpfs        (ro,nosuid,nodev,noexec,mode=755)
cgroup       on  /sys/fs/cgroup/systemd           type  cgroup       (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore       on  /sys/fs/pstore                   type  pstore       (rw,nosuid,nodev,noexec,relatime)
cgroup       on  /sys/fs/cgroup/cpuset            type  cgroup       (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup       on  /sys/fs/cgroup/net_cls,net_prio  type  cgroup       (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls)
cgroup       on  /sys/fs/cgroup/devices           type  cgroup       (rw,nosuid,nodev,noexec,relatime,devices)
cgroup       on  /sys/fs/cgroup/perf_event        type  cgroup       (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup       on  /sys/fs/cgroup/memory            type  cgroup       (rw,nosuid,nodev,noexec,relatime,memory)
cgroup       on  /sys/fs/cgroup/cpu,cpuacct       type  cgroup       (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup       on  /sys/fs/cgroup/freezer           type  cgroup       (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup       on  /sys/fs/cgroup/pids              type  cgroup       (rw,nosuid,nodev,noexec,relatime,pids)
cgroup       on  /sys/fs/cgroup/hugetlb           type  cgroup       (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup       on  /sys/fs/cgroup/blkio             type  cgroup       (rw,nosuid,nodev,noexec,relatime,blkio)
configfs     on  /sys/kernel/config               type  configfs     (rw,relatime)
/dev/vda1    on  /                                type  ext4         (rw,relatime,data=ordered)
systemd-1    on  /proc/sys/fs/binfmt_misc         type  autofs       (rw,relatime,fd=26,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=8775)
debugfs      on  /sys/kernel/debug                type  debugfs      (rw,relatime)
hugetlbfs    on  /dev/hugepages                   type  hugetlbfs    (rw,relatime)
mqueue       on  /dev/mqueue                      type  mqueue       (rw,relatime)
tmpfs        on  /run/user/0                      type  tmpfs        (rw,nosuid,nodev,relatime,size=800872k,mode=700)
binfmt_misc  on  /proc/sys/fs/binfmt_misc         type  binfmt_misc  (rw,relatime)

 18.  fdisk -l                       # 查看所有分区

[root@mynet /]# fdisk -l

Disk /dev/vda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009ac89

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   104857566    52427759+  83  Linux

 19.  swapon -s                      # 查看所有交换分区

[root@xzythpt04 home]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       65535996        0       -1
You have mail in /var/spool/mail/root

 20.  hdparm -i /dev/hda             # 查看磁盘参数(仅适用于IDE设备),目前很少用到
 21.  dmesg | grep IDE               # 查看启动时IDE设备检测状况网络,目前很少用到

 22.  ifconfig                       # 查看所有网络接口的属性

[root@mynet /]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.21.0.17  netmask 255.255.240.0  broadcast 172.21.15.255
        inet6 fe80::5054:ff:fe46:cf55  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:46:cf:55  txqueuelen 1000  (Ethernet)
        RX packets 41356689  bytes 5195180417 (4.8 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 41553188  bytes 7570211028 (7.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 39421  bytes 1932499 (1.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 39421  bytes 1932499 (1.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 23.   iptables -L                    # 查看防火墙设置(以下是防火墙关闭后的结果)

[root@mynet /]# iptables -L 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

 24.    route -n                       # 查看路由表

[root@mynet /]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.21.0.1      0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
172.21.0.0      0.0.0.0         255.255.240.0   U     0      0        0 eth0

 25.   netstat -antp                  # 查看所有已经建立的连接

[root@mynet /]# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1235/sshd           
tcp        0      0 0.0.0.0:5466            0.0.0.0:*               LISTEN      23565/./wftpserver  
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      23565/./wftpserver  
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      23565/./wftpserver  
tcp        0      0 172.21.0.17:54454       69.16.175.42:80         ESTABLISHED 23565/./wftpserver  
tcp        0     96 172.21.0.17:22          101.249.33.103:7204     ESTABLISHED 26205/sshd: root@pt 
tcp        0      0 172.21.0.17:45130       169.254.0.55:5574       ESTABLISHED 6578/YDService      
tcp        0     21 172.21.0.17:22          2.144.242.210:50688     ESTABLISHED 29950/sshd: [accept 
tcp6       0      0 :::5466                 :::*                    LISTEN      23565/./wftpserver  
tcp6       0      0 :::80                   :::*                    LISTEN      23565/./wftpserver  
tcp6       0      0 :::21                   :::*                    LISTEN      23565/./wftpserver  

 26.  netstat -s                     # 查看网络统计信息进程

[root@mynet /]# netstat -s 
Ip:
    40084947 total packets received
    0 forwarded
    217 with unknown protocol
    0 incoming packets discarded
    40084154 incoming packets delivered
    40920331 requests sent out
    56 dropped because of missing route
    1106 reassemblies required
    553 packets reassembled ok
Icmp:
    4481985 ICMP messages received
    2426 input ICMP message failed.
    ICMP input histogram:
        destination unreachable: 3425
        timeout in transit: 153
        redirects: 10
        echo requests: 4478166
        echo replies: 15
        timestamp request: 216
    4519488 ICMP messages sent
    0 ICMP messages failed
    ICMP output histogram:
        destination unreachable: 41106
        echo replies: 4478166
        timestamp replies: 216
IcmpMsg:
        InType0: 15
        InType3: 3425
        InType5: 10
        InType8: 4478166
        InType11: 153
        InType13: 216
        OutType0: 4478166
        OutType3: 41106
        OutType14: 216
Tcp:
    2958142 active connections openings
    790642 passive connection openings
    12837 failed connection attempts
    17375 connection resets received
    3 connections established
    34577817 segments received
    35190093 segments send out
    401853 segments retransmited
    675 bad segments received.
    2904483 resets sent
    InCsumErrors: 645
Udp:
    887718 packets received
    48772 packets to unknown port received.
    162 packet receive errors
    898442 packets sent
    0 receive buffer errors
    0 send buffer errors
    InCsumErrors: 161
UdpLite:
TcpExt:
    4536 invalid SYN cookies received
    12837 resets received for embryonic SYN_RECV sockets
    9 ICMP packets dropped because they were out-of-window
    120229 TCP sockets finished time wait in fast timer
    227 packets rejects in established connections because of timestamp
    2109901 delayed acks sent
    74 delayed acks further delayed because of locked socket
    Quick ack mode was activated 14939 times
    270 SYNs to LISTEN sockets dropped
    812199 packets directly queued to recvmsg prequeue.
    1815730 bytes directly in process context from backlog
    133565611 bytes directly received in process context from prequeue
    5771100 packet headers predicted
    143578 packets header predicted and directly queued to user
    11198910 acknowledgments not containing data payload received
    3664466 predicted acknowledgments
    6 times recovered from packet loss due to fast retransmit
    536 times recovered from packet loss by selective acknowledgements
    Detected reordering 1 times using reno fast retransmit
    Detected reordering 3 times using time stamp
    10 congestion windows fully recovered without slow start
    4 congestion windows partially recovered using Hoe heuristic
    282 congestion windows recovered without slow start by DSACK
    24746 congestion windows recovered without slow start after partial ack
    1 timeouts after reno fast retransmit
    726 timeouts after SACK recovery
    85 timeouts in loss state
    518 fast retransmits
    41 forward retransmits
    46 retransmits in slow start
    131174 other TCP timeouts
    TCPLossProbes: 243209
    TCPLossProbeRecovery: 154954
    114 SACK retransmits failed
    16722 DSACKs sent for old packets
    509 DSACKs sent for out of order packets
    151835 DSACKs received
    13 DSACKs for out of order packets received
    9595 connections reset due to unexpected data
    385 connections reset due to early user close
    2197 connections aborted due to timeout
    TCPDSACKIgnoredOld: 11
    TCPDSACKIgnoredNoUndo: 114862
    TCPSpuriousRTOs: 78
    TCPSackShiftFallback: 11123
    TCPRcvCoalesce: 3411137
    TCPOFOQueue: 180371
    TCPOFOMerge: 625
    TCPChallengeACK: 219
    TCPSYNChallenge: 37
    TCPFastOpenCookieReqd: 3
    TCPAutoCorking: 10
    TCPSynRetrans: 101034
    TCPOrigDataSent: 16204576
    TCPACKSkippedSynRecv: 12
    TCPACKSkippedPAWS: 6
    TCPACKSkippedSeq: 65
    TCPACKSkippedTimeWait: 1
    TCPACKSkippedChallenge: 1
IpExt:
    InNoRoutes: 23
    InMcastPkts: 87700
    InOctets: 4572956953
    OutOctets: 6970883417
    InMcastOctets: 3157200
    InNoECTPkts: 40698163
    InECT1Pkts: 14
    InECT0Pkts: 18616
    InCEPkts: 7031

 27.  ps -ef                         # 查看所有进程

[root@mynet /]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Oct10 ?        00:23:31 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root         2     0  0 Oct10 ?        00:00:02 [kthreadd]
root         4     2  0 Oct10 ?        00:00:00 [kworker/0:0H]
root         6     2  0 Oct10 ?        00:00:18 [ksoftirqd/0]
root         7     2  0 Oct10 ?        00:01:01 [migration/0]
root         8     2  0 Oct10 ?        00:00:00 [rcu_bh]
root         9     2  0 Oct10 ?        00:14:01 [rcu_sched]
root        10     2  0 Oct10 ?        00:00:00 [lru-add-drain]
root        11     2  0 Oct10 ?        00:00:12 [watchdog/0]
root        12     2  0 Oct10 ?        00:00:11 [watchdog/1]
root        13     2  0 Oct10 ?        00:01:01 [migration/1]
root        14     2  0 Oct10 ?        00:00:14 [ksoftirqd/1]
root        16     2  0 Oct10 ?        00:00:00 [kworker/1:0H]
root        17     2  0 Oct10 ?        00:00:10 [watchdog/2]
root        18     2  0 Oct10 ?        00:01:01 [migration/2]
root        19     2  0 Oct10 ?        00:00:07 [ksoftirqd/2]
root        21     2  0 Oct10 ?        00:00:00 [kworker/2:0H]
root        22     2  0 Oct10 ?        00:00:10 [watchdog/3]
root        23     2  0 Oct10 ?        00:01:01 [migration/3]
root        24     2  0 Oct10 ?        00:00:07 [ksoftirqd/3]
root        26     2  0 Oct10 ?        00:00:00 [kworker/3:0H]
root        28     2  0 Oct10 ?        00:00:00 [kdevtmpfs]
root        29     2  0 Oct10 ?        00:00:00 [netns]
root        30     2  0 Oct10 ?        00:00:01 [khungtaskd]
root        31     2  0 Oct10 ?        00:00:00 [writeback]
root        32     2  0 Oct10 ?        00:00:00 [kintegrityd]
root        33     2  0 Oct10 ?        00:00:00 [bioset]
root        34     2  0 Oct10 ?        00:00:00 [bioset]
root        35     2  0 Oct10 ?        00:00:00 [bioset]
root        36     2  0 Oct10 ?        00:00:00 [kblockd]
root        37     2  0 Oct10 ?        00:00:00 [md]
root        38     2  0 Oct10 ?        00:00:00 [edac-poller]
root        39     2  0 Oct10 ?        00:00:00 [watchdogd]
root        45     2  0 Oct10 ?        00:00:00 [kswapd0]
root        46     2  0 Oct10 ?        00:00:00 [ksmd]
root        47     2  0 Oct10 ?        00:00:10 [khugepaged]
root        48     2  0 Oct10 ?        00:00:00 [crypto]
root        56     2  0 Oct10 ?        00:00:00 [kthrotld]
root        58     2  0 Oct10 ?        00:00:00 [kmpath_rdacd]
root        59     2  0 Oct10 ?        00:00:00 [kaluad]
root        62     2  0 Oct10 ?        00:00:00 [kpsmoused]
root        63     2  0 Oct10 ?        00:00:00 [ipv6_addrconf]
root        77     2  0 Oct10 ?        00:00:00 [deferwq]
root       151     2  0 Oct10 ?        00:09:19 [kauditd]
root       217     2  0 Oct10 ?        00:00:00 [iscsi_eh]
root       266     2  0 Oct10 ?        00:00:00 [ata_sff]
root       279     2  0 Oct10 ?        00:00:00 [ttm_swap]
root       287     2  0 Oct10 ?        00:00:00 [scsi_eh_0]
root       288     2  0 Oct10 ?        00:00:00 [scsi_tmf_0]
root       289     2  0 Oct10 ?        00:00:00 [scsi_eh_1]
root       290     2  0 Oct10 ?        00:00:00 [scsi_tmf_1]
root       293     2  0 Oct10 ?        00:03:32 [kworker/0:1H]
root       310     2  0 Oct10 ?        00:03:31 [jbd2/vda1-8]
root       311     2  0 Oct10 ?        00:00:00 [ext4-rsv-conver]
root       317     2  0 Oct10 ?        00:00:16 [kworker/1:1H]
root       378     2  0 Oct10 ?        00:00:02 [kworker/2:1H]
root       382     2  0 Oct10 ?        00:00:01 [kworker/3:1H]
root       403     1  0 Oct10 ?        00:20:30 /usr/lib/systemd/systemd-journald
root       433     1  0 Oct10 ?        00:00:00 /usr/sbin/lvmetad -f
root       438     1  0 Oct10 ?        00:00:00 /usr/lib/systemd/systemd-udevd
root       646     1  0 Oct10 ?        00:08:28 /sbin/auditd
polkitd    669     1  0 Oct10 ?        00:02:34 /usr/lib/polkit-1/polkitd --no-debug
root       676     1  0 Oct10 ?        00:02:53 /usr/lib/systemd/systemd-logind
dbus       678     1  0 Oct10 ?        00:07:09 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile 
ntp        680     1  0 Oct10 ?        00:00:09 /usr/sbin/ntpd -u ntp:ntp -g
libstor+   683     1  0 Oct10 ?        00:00:09 /usr/bin/lsmd -d
root       695     1  0 Oct10 ?        00:00:00 /usr/sbin/acpid
root       767     2  0 Oct10 ?        00:00:00 [mlx4]
root       773     2  0 Oct10 ?        00:00:00 [ib-comp-wq]
root       774     2  0 Oct10 ?        00:00:00 [kworker/u9:0]
root       775     2  0 Oct10 ?        00:00:00 [ib-comp-unb-wq]
root       776     2  0 Oct10 ?        00:00:00 [ib_mcast]
root       777     2  0 Oct10 ?        00:00:00 [ib_nl_sa_wq]
root       778     2  0 Oct10 ?        00:00:00 [mlx4_ib]
root       779     2  0 Oct10 ?        00:00:00 [mlx4_ib_mcg]
root       812     2  0 Oct10 ?        00:00:00 [mlx5_ib_sigerr_]
root       856     2  0 Oct10 ?        00:00:00 [rdma_cm]
root      1056     1  0 Oct10 ?        00:00:00 /sbin/dhclient -q -lf /var/lib/dhclient/dhclient--eth0.lease -pf /var/
root      1122     1  0 Oct10 ?        00:05:45 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
root      1133     1  0 Oct10 ?        00:01:08 /usr/sbin/iscsid
root      1134     1  0 Oct10 ?        00:00:00 /usr/sbin/iscsid
root      1235     1  0 Oct10 ?        00:05:32 /usr/sbin/sshd -D
root      1236     1  0 Oct10 ?        00:17:31 /usr/sbin/rsyslogd -n
root      1250     1  0 Oct10 ?        00:00:26 /usr/sbin/crond -n
root      1258     1  0 Oct10 ?        00:00:00 /usr/sbin/atd -f
root      1480     1  0 Oct10 ttyS0    00:00:00 /sbin/agetty --keep-baud 115200,38400,9600 ttyS0 vt220
root      1481     1  0 Oct10 tty1     00:00:00 /sbin/agetty --noclear tty1 linux
root      1671     1  0 Oct10 ?        00:00:40 /usr/local/qcloud/stargate/sgagent -d
root      4287     2  0 20:01 ?        00:00:00 [kworker/3:1]
root      6578     1  0 Nov29 ?        00:48:51 /usr/local/qcloud/YunJing/YDEyes/YDService
root      6618     1  0 Nov29 ?        00:03:05 /usr/local/qcloud/YunJing/YDLive/YDLive
root      7116     1  0 Nov29 ?        00:35:33 /usr/local/qcloud/YunJing/YDEdr
root      7394     2  0 Dec16 ?        00:00:09 [kworker/2:1]
root     11126     2  0 Dec17 ?        00:00:06 [kworker/3:0]
root     14785     2  0 Dec20 ?        00:00:02 [kworker/0:0]
root     23565     1  0 Oct17 ?        01:55:33 ./wftpserver
root     24108     2  0 Dec20 ?        00:00:16 [kworker/1:2]
root     24865     1  0 Nov16 ?        00:00:25 barad_agent
root     24866 24865  0 Nov16 ?        00:25:15 barad_agent
root     24867 24865  0 Nov16 ?        02:47:47 barad_agent
root     25535     2  0 Dec07 ?        00:00:08 [kworker/u8:2]
root     26121     2  0 Dec15 ?        00:00:13 [kworker/u8:1]
root     26205  1235  0 21:53 ?        00:00:00 sshd: root@pts/1
root     26213 26205  0 21:53 pts/1    00:00:00 -bash
root     27780     2  0 22:01 ?        00:00:00 [kworker/2:2]
root     27782     2  0 22:01 ?        00:00:00 [kworker/0:2]
root     28119     2  0 22:02 ?        00:00:00 [kworker/1:0]
root     29132     2  0 22:07 ?        00:00:00 [kworker/1:1]
root     29380     2  0 22:09 ?        00:00:00 [kworker/2:0]
root     30102  1235  0 22:12 ?        00:00:00 sshd: unknown [priv]
sshd     30103 30102  0 22:12 ?        00:00:00 sshd: unknown [net]
root     30117 26213  0 22:12 pts/1    00:00:00 ps -ef

 28.   top                            # 实时显示进程状态用户

[root@xzythpt04 home]# top
top - 10:28:31 up 96 days, 17:05,  1 user,  load average: 0.05, 0.01, 0.00
Tasks: 1657 total,   1 running, 1656 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  132132780k total,  3073052k used, 129059728k free,   190072k buffers
Swap: 65535996k total,        0k used, 65535996k free,   478196k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                                                    
31789 root      20   0 16232 2508  924 R  1.3  0.0   0:00.20 top                                                                                                                                                                         
 4195 zabbix    20   0 26424 5320 5112 S  0.3  0.0 106:00.20 zabbix_agentd                                                                                                                                                               
    1 root      20   0 23596 1640 1304 S  0.0  0.0   0:05.17 init                                                                                                                                                                        
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.03 kthreadd                                                                                                                                                                    
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.09 migration/0                                                                                                                                                                 
    4 root      20   0     0    0    0 S  0.0  0.0   0:00.38 ksoftirqd/0                                                                                                                                                                 
    5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/0                                                                                                                                                                   
    6 root      RT   0     0    0    0 S  0.0  0.0   0:08.56 watchdog/0                                                                                                                                                                  
    7 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/1                                                                                                                                                                 
    8 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/1                                                                                                                                                                   
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.76 ksoftirqd/1                                                                                                                                                                 
   10 root      RT   0     0    0    0 S  0.0  0.0   0:08.15 watchdog/1                                                                                                                                                                  
   11 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/2                                                                                                                                                                 
   12 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/2                                                                                                                                                                   
   13 root      20   0     0    0    0 S  0.0  0.0   0:00.25 ksoftirqd/2                                                                                                                                                                 
   14 root      RT   0     0    0    0 S  0.0  0.0   0:07.73 watchdog/2                                                                                                                                                                  
   15 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/3                                                                                                                                                                 
   16 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/3                                                                                                                                                                   
   17 root      20   0     0    0    0 S  0.0  0.0   0:00.20 ksoftirqd/3                                                                                                                                                                 
   18 root      RT   0     0    0    0 S  0.0  0.0   0:07.80 watchdog/3                                                                                                                                                                  
   19 root      RT   0     0    0    0 S  0.0  0.0   0:00.01 migration/4                                                                                                                                                                 
   20 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/4                                                                                                                                                                   
   21 root      20   0     0    0    0 S  0.0  0.0   0:00.33 ksoftirqd/4                                                                                                                                                                 
   22 root      RT   0     0    0    0 S  0.0  0.0   0:07.68 watchdog/4                                                                                                                                                                  
   23 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/5                                                                                                                                                                 
   24 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/5                                                                                                                                                                   
   25 root      20   0     0    0    0 S  0.0  0.0   0:00.87 ksoftirqd/5                                                                                                                                                                 
   26 root      RT   0     0    0    0 S  0.0  0.0   0:07.49 watchdog/5                                                                                                                                                                  
   27 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/6                                                                                                                                                                 
   28 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/6                                                                                                                                                                   
   29 root      20   0     0    0    0 S  0.0  0.0   0:00.60 ksoftirqd/6                                                                                                                                                                 
   30 root      RT   0     0    0    0 S  0.0  0.0   0:07.27 watchdog/6                                                                                                                                                                  
   31 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/7                                                                                                                                                                 
   32 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/7                                                                                                                                                                   
   33 root      20   0     0    0    0 S  0.0  0.0   0:01.83 ksoftirqd/7                                                                                                                                                                 
   34 root      RT   0     0    0    0 S  0.0  0.0   0:07.31 watchdog/7                                                                                                                                                                  
   35 root      RT   0     0    0    0 S  0.0  0.0   0:00.16 migration/8                                                                                                                                                                 
   36 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/8                                                                                                                                                                   
   37 root      20   0     0    0    0 S  0.0  0.0   0:02.54 ksoftirqd/8                                                                                                                                                                 
   38 root      RT   0     0    0    0 S  0.0  0.0   0:07.53 watchdog/8                                                                                                                                                                  
   39 root      RT   0     0    0    0 S  0.0  0.0   0:00.01 migration/9                                                                                                                                                                 
   40 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/9                                                                                                                                                                   
   41 root      20   0     0    0    0 S  0.0  0.0   0:01.11 ksoftirqd/9                                                                                                                                                                 
   42 root      RT   0     0    0    0 S  0.0  0.0   0:07.62 watchdog/9                                                                                                                                                                  
   43 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/10                                                                                                                                                                
   44 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/10                                                                                                                                                                  
   45 root      20   0     0    0    0 S  0.0  0.0   0:01.34 ksoftirqd/10                                                                                                                                                                
   46 root      RT   0     0    0    0 S  0.0  0.0   0:07.69 watchdog/10                                                                                                                                                                 
   47 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/11                                                                                                                                                                
   48 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/11                                                                                                                                                                  
   49 root      20   0     0    0    0 S  0.0  0.0   0:02.29 ksoftirqd/11                                                                                                                                                                
   50 root      RT   0     0    0    0 S  0.0  0.0   0:07.36 watchdog/11                                                                                                                                                                 
   51 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/12                                                                                                                                                                
   52 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/12                                                                                                                                                                  
   53 root      20   0     0    0    0 S  0.0  0.0   0:03.65 ksoftirqd/12                                                                                                                                                                
   54 root      RT   0     0    0    0 S  0.0  0.0   0:07.34 watchdog/12                                                                                                                                                                 
   55 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/13                                                                                                                                                                
   56 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/13                                                                                                                                                                  
   57 root      20   0     0    0    0 S  0.0  0.0   0:00.89 ksoftirqd/13                                                                                                                                                                
   58 root      RT   0     0    0    0 S  0.0  0.0   0:07.33 watchdog/13                                                                                                                                                                 
   59 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/14                                                                                                                                                                
   60 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 stopper/14 

 29.   w                              # 查看活动用户

[root@mynet /]# w
 22:14:00 up 72 days,  1:44,  1 user,  load average: 0.00, 0.01, 0.05
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
root     pts/1    101.249.33.103   21:53    0.00s  0.06s  0.00s w

 30.   id                             # 查看指定用户信息

[root@mynet /]# id
uid=0(root) gid=0(root) groups=0(root)

 31.   last                           # 查看用户登录日志

[root@mynet /]# last
root     pts/1        101.249.33.103   Mon Dec 21 21:53   still logged in   
root     pts/2        220.182.44.50    Fri Nov 27 15:28 - 15:48  (00:20)    
root     pts/1        220.182.44.50    Fri Nov 27 14:27 - 17:17  (02:49)    
root     pts/1        219.151.40.88    Wed Nov 18 14:31 - 14:36  (00:04)    
root     pts/1        219.151.40.88    Wed Nov 18 12:16 - 14:22  (02:05)    
root     pts/2        219.151.40.88    Wed Nov 18 10:24 - 12:39  (02:15)    
root     pts/1        219.151.40.88    Wed Nov 18 09:57 - 11:58  (02:00)    
root     pts/1        220.182.44.50    Fri Nov 13 18:07 - 18:14  (00:06)    
root     pts/3        219.151.40.88    Thu Nov 12 17:21 - 19:21  (02:00)    
root     pts/1        219.151.40.88    Thu Nov 12 17:20 - 19:48  (02:28)    
root     pts/2        219.151.40.88    Thu Nov 12 15:55 - 18:12  (02:16)    
root     pts/1        219.151.40.88    Thu Nov 12 15:00 - 17:06  (02:06)    
root     pts/1        219.151.40.88    Thu Nov 12 11:25 - 14:02  (02:37)    
root     pts/1        219.151.40.88    Wed Nov 11 15:29 - 17:30  (02:00)    
root     pts/2        101.249.34.214   Mon Nov  9 21:51 - 00:02  (02:11)    
root     pts/1        101.249.34.214   Mon Nov  9 21:29 - 23:43  (02:13)    
root     pts/1        101.249.33.134   Thu Oct 29 23:28 - 01:42  (02:14)    
root     pts/2        220.182.44.50    Sat Oct 17 11:44 - 13:48  (02:04)    
root     pts/0        220.182.44.50    Sat Oct 17 11:00 - 13:22  (02:21)    
root     pts/1        220.182.44.50    Sat Oct 17 10:10 - 12:25  (02:15)    
root     pts/0        14.29.234.162    Sat Oct 17 10:08 - 10:18  (00:10)    
root     pts/0        101.248.132.97   Sun Oct 11 17:47 - 19:59  (02:12)    
root     pts/2        220.182.44.50    Sun Oct 11 13:28 - 15:29  (02:00)    
root     pts/0        220.182.44.50    Sun Oct 11 13:09 - 15:09  (02:00)    
root     pts/1        220.182.44.50    Sun Oct 11 11:37 - 13:58  (02:21)    
root     pts/0        220.182.44.50    Sun Oct 11 10:49 - 12:49  (02:00)    
root     pts/2        101.249.37.203   Sat Oct 10 23:59 - 02:10  (02:11)    
root     pts/1        101.249.37.203   Sat Oct 10 23:45 - 02:03  (02:18)    
root     pts/0        101.249.37.203   Sat Oct 10 23:13 - 01:49  (02:36)    
reboot   system boot  3.10.0-1062.18.1 Sat Oct 10 20:29 - 22:14 (72+01:45)  
root     pts/0        101.249.37.203   Sat Oct 10 19:51 - down   (00:38)    
reboot   system boot  3.10.0-1062.18.1 Mon Sep 28 10:33 - 20:29 (12+09:55)  
root     pts/0        101.249.42.208   Fri Aug 21 17:26 - 17:28  (00:02)    
root     pts/0        101.249.42.208   Fri Aug 21 17:12 - 17:13  (00:00)    

wtmp begins Fri Aug 21 17:12:55 2020

 32.    cut -d: -f1 /etc/passwd        # 查看系统所有用户

[root@mynet /]# cut -d: -f1 /etc/passwd 
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
operator
games
ftp
nobody
systemd-network
dbus
polkitd
libstoragemgmt
rpc
ntp
abrt
sshd
postfix
chrony
tcpdump
syslog
ftptest
grassrouter
apache

 33.   cut -d: -f1 /etc/group         # 查看系统所有组

[root@mynet /]# cut -d: -f1 /etc/group
root
bin
daemon
sys
adm
tty
disk
lp
mem
kmem
wheel
cdrom
mail
man
dialout
floppy
games
tape
video
ftp
lock
audio
nobody
users
utmp
utempter
input
systemd-journal
systemd-network
dbus
polkitd
libstoragemgmt
ssh_keys
rpc
ntp
abrt
sshd
slocate
postdrop
postfix
chrony
tcpdump
stapusr
stapsys
stapdev
syslog
ftpgroup
ftptest
grassrouter
apache

 34. crontab -l                     # 查看当前用户的计划任务服务

[root@mynet /]# crontab -l
*/1 * * * * flock -xn /tmp/stargate.lock -c '/usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &'
0 0 * * * /usr/local/qcloud/YunJing/YDCrontab.sh > /dev/null 2>&1 &

 35.  chkconfig –list                # 列出所有系统服务
 36.  chkconfig –list | grep on      # 列出所有启动的系统服务程序

37.  rpm -qa                        # 查看所有安装的软件包

 

[root@mynet /]# rpm -qa |haed -20
-bash: haed: command not found
[root@mynet /]# rpm -qa |head -n 20
sqlite-3.7.17-8.el7_7.1.x86_64
ustr-1.0.4-16.el7.x86_64
libdaemon-0.14-7.el7.x86_64
kbd-misc-1.15.5-15.el7.noarch
NetworkManager-tui-1.18.0-5.el7_7.2.x86_64
lz4-1.7.5-3.el7.x86_64
ncurses-5.9-14.20130511.el7_4.x86_64
python-requests-2.6.0-9.el7_7.noarch
sssd-client-1.16.4-21.el7_7.3.x86_64
hostname-3.13-3.el7_7.1.x86_64
satyr-0.13-15.el7.x86_64
info-5.1-5.el7.x86_64
sudo-1.8.23-4.el7_7.2.x86_64
passwd-0.79-5.el7.x86_64
......

 38.  cat /proc/meminfo              # 查看linux系统内存信息的linux系统命令

[root@mynet /]# cat /proc/meminfo
MemTotal:        8008696 kB
MemFree:         1085896 kB
MemAvailable:    7460752 kB
Buffers:          197088 kB
Cached:          6074440 kB
SwapCached:            0 kB
Active:          4774392 kB
Inactive:        1610684 kB
Active(anon):     118096 kB
Inactive(anon):       36 kB
Active(file):    4656296 kB
Inactive(file):  1610648 kB
Unevictable:        5428 kB
Mlocked:            5428 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:               284 kB
Writeback:            80 kB
AnonPages:        119056 kB
Mapped:            54088 kB
Shmem:               564 kB
Slab:             434132 kB
SReclaimable:     413880 kB
SUnreclaim:        20252 kB
KernelStack:        2688 kB
PageTables:         5752 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     4004348 kB
Committed_AS:     619548 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       20020 kB
VmallocChunk:   34359712252 kB
HardwareCorrupted:     0 kB
AnonHugePages:     24576 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       87920 kB
DirectMap2M:     4106240 kB
DirectMap1G:     6291456 kB

 39.  cat /proc/version              # 查看版本,类似uname -r

[root@mynet /]# cat /proc/version
Linux version 3.10.0-1062.18.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Mar 17 23:49:17 UTC 2020

 40.   cat /proc/ioports              # 查看设备io端口

[root@mynet /]# cat /proc/ioports
0000-0cf7 : PCI Bus 0000:00
  0000-001f : dma1
  0020-0021 : pic1
  0040-0043 : timer0
  0050-0053 : timer1
  0060-0060 : keyboard
  0064-0064 : keyboard
  0070-0071 : rtc0
  0080-008f : dma page reg
  00a0-00a1 : pic2
  00c0-00df : dma2
  00f0-00ff : fpu
  0170-0177 : 0000:00:01.1
    0170-0177 : ata_piix
  01f0-01f7 : 0000:00:01.1
    01f0-01f7 : ata_piix
  0376-0376 : 0000:00:01.1
    0376-0376 : ata_piix
  03c0-03df : vga+
  03f2-03f2 : floppy
  03f4-03f5 : floppy
  03f6-03f6 : 0000:00:01.1
    03f6-03f6 : ata_piix
  03f7-03f7 : floppy
  03f8-03ff : serial
  0600-063f : 0000:00:01.3
    0600-0603 : ACPI PM1a_EVT_BLK
    0604-0605 : ACPI PM1a_CNT_BLK
    0608-060b : ACPI PM_TMR
  0700-070f : 0000:00:01.3
    0700-0708 : piix4_smbus
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
  afe0-afe3 : ACPI GPE0_BLK
  c000-cfff : PCI Bus 0000:02
  d000-dfff : PCI Bus 0000:01
  e000-e03f : 0000:00:05.0
  e040-e07f : 0000:00:06.0
  e080-e09f : 0000:00:01.2
    e080-e09f : uhci_hcd
  e0a0-e0bf : 0000:00:07.0
  e0c0-e0cf : 0000:00:01.1
    e0c0-e0cf : ata_piix

 41. cat /proc/interrupts           # 查看中断

[root@mynet /]# cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       
  0:        200          0          0          0   IO-APIC-edge      timer
  1:         10          0          0          0   IO-APIC-edge      i8042
  4:        432          0          0          0   IO-APIC-edge      serial
  6:          3          0          0          0   IO-APIC-edge      floppy
  8:          0          0          0          0   IO-APIC-edge      rtc0
  9:          0          0          0          0   IO-APIC-fasteoi   acpi
 11:          0          0          0          0   IO-APIC-fasteoi   uhci_hcd:usb1, virtio2
 12:         15          0          0          0   IO-APIC-edge      i8042
 14:    6081613          0          0          0   IO-APIC-edge      ata_piix
 15:          0          0          0          0   IO-APIC-edge      ata_piix
 24:          0          0          0          0   PCI-MSI-edge      virtio1-config
 25:   23624576          0          0          0   PCI-MSI-edge      virtio1-req.0
 26:          0          0          0          0   PCI-MSI-edge      virtio0-config
 27:   17023230          0          0          0   PCI-MSI-edge      virtio0-input.0
 28:          1          0          0          0   PCI-MSI-edge      virtio0-output.0
 29:          9   20658820          0          0   PCI-MSI-edge      virtio0-input.1
 30:          1          0          0          0   PCI-MSI-edge      virtio0-output.1
NMI:          0          0          0          0   Non-maskable interrupts
LOC:  473194642  458715043  460967476  460243665   Local timer interrupts
SPU:          0          0          0          0   Spurious interrupts
PMI:          0          0          0          0   Performance monitoring interrupts
IWI:   11958040   11723176   11963169   12053587   IRQ work interrupts
RTR:          0          0          0          0   APIC ICR read retries
RES:  120499723  123169292  121766877  121748999   Rescheduling interrupts
CAL:    8269871    4066391    8839293    8449908   Function call interrupts
TLB:   10114303   10165304   10252995   10351461   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0   Threshold APIC interrupts
DFR:          0          0          0          0   Deferred Error APIC interrupts
MCE:          0          0          0          0   Machine check exceptions
MCP:      20759      20759      20759      20759   Machine check polls
ERR:          0
MIS:          0
PIN:          0          0          0          0   Posted-interrupt notification event
NPI:          0          0          0          0   Nested posted-interrupt event
PIW:          0          0          0          0   Posted-interrupt wakeup event

 42.  cat /proc/pci                  # 查看pci设备的信息

 43.  cat /proc/swaps                # 查看所有swap分区的信息

[root@xzythpt04 home]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/dm-1                               partition       65535996        0       -1

 

posted @ 2020-12-22 10:59  3哥哥  阅读(1921)  评论(0编辑  收藏  举报