信息收集
查看OS信息
查看操作系统版本信息
shell# cat /etc/openEuler-latest # cat /etc/os-release # cat /etc/openEuler-release查看内核版本信息
shell# uname -a
查看硬件信息
查看cpu的统计信息
shell# lscpu查看CPU相关参数
shell# cat /proc/cpuinfo查看系统内存信息
shell# cat /proc/meminfo查看内存信息
shell# dmidecode -t memory查看硬盘和分区分布
shell# lsblk看硬盘和分区的详细信息
shell# fdisk -l查看网卡硬件信息
shell# lspci | grep -i 'eth'查看所有网络接口
shell# ip a # yum install -y net-tools # ifconfig查看某个网络接口的详细信息
shell# ethtool enp7s0 (以enp7s0为例)查看pci信息
shell# lspci查看设备树
shell# lspci -t查看bios信息
shell# dmidecode -t bios
查看软件信息
查看软件包的详细信息
shell# rpm -qi systemd(以systemd为例)查看软件包提供的模块
shell# rpm -q --provides systemd (以systemd为例)查看所有已安装软件包
shell# rpm -qa | grep systemd (以systemd为例)查看软件包文件列表
shell# rpm -ql python3-rpm (以python3-rpm为例)
查看OS日志
查看系统启动后的信息和错误日志
shell# cat /var/log/messages查看安全相关的日志信息
shell# cat /var/log/secure查看邮件相关的日志信息
shell# cat /var/log/maillog查看定时任务相关的日志信息
shell# cat /var/log/cron查看UUCP和news设备相关的日志信息
shell# cat /var/log/spooler查看守护进程启动和停止相关的日志消息
shell# cat /var/log/boot.log
文档捉虫