• Linux:系统基本信息扫描(3)


    echo "#网络地址"
    echo "#ip a"
    ip a
    echo "#主机名"
    echo "#hostnamectl status"
    hostnamectl status
    sleep 0.5s
    echo "#系统基本信息"
    echo "#uname -a"
    uname -a
    echo "#内核与发行版信息"
    echo "#cat /proc/version"
    cat /proc/version
    echo "#linux用户"
    echo "#cat /etc/passwd"
    cat /etc/passwd
    echo "#Linux 组查询"
    echo "#cat /etc/group"
    cat /etc/group
    echo "#CPU详细信息"
    echo "#lscpu -a---------"
    #lscpu -a
    echo "#获取CPU模式"
    echo "#cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor"
    #cat /sys/devices/system/cpu/cpu0/cpufreq/scaling\_governor
    #performance performance代表CPU处于高性能模式
    echo "#虚拟机所在物理机的CPU核数"
    echo '#cat /proc/cpuinfo | grep "processor" | wc -l'
    cat /proc/cpuinfo | grep "processor" | wc -l
    echo "#内存使用情况"
    echo "#free -h"
    free -h
    echo "#网络接口信息"
    echo "#ifconfig"
    ifconfig
    echo "#网络链路信息"
    echo "#ip link show"
    ip link show
    echo "#网络连接相关信息"
    echo "#netstat -i"
    netstat -i
    echo "#统计网络接口活动状态的工具"
    echo "#ifstat -tT"
    ifstat -tT
    echo "#查看主机路由信息"
    echo "#route -n"
    route -n
    echo "#磁盘分区信息"
    echo "#fdisk -l"
    fdisk -l
    echo "#获取磁盘信息"
    echo "#lsblk"
    lsblk
    echo "#查看挂接的分区状态"
    echo "#mount | column -t"
    mount | column -t
    echo "#磁盘使用情况"
    echo "#df -lhT"
    df -lhT
    echo "#USB设备信息"
    echo "#lsusb"
    lsusb
    echo "#PCI设备信息"
    echo "#lspci"
    lspci
    echo "#系统硬件详细信息"
    echo "#dmidecode"
    dmidecode
    echo "#查看bois信息"
    echo "#dmidecode -t bios"
    dmidecode -t bios
    echo "#查看centos上安装了多少个软件"
    echo "#rpm -qa | wc -l"
    rpm -qa | wc -l
    echo "#所有的服务状态"
    echo "#chkconfig --list"
    chkconfig --list
    echo "#显示所有运行中的进程"
    echo "#ps aux"
    ps aux
    echo "#查看非root运行的进程"
    echo "#ps -U root -u root -N"
    ps -U root -u root -N
    echo "#查看用户vivek运行的进程"
    echo "#ps -u vivek"
    ps -u vivek
    echo "#显示进程的树状图"
    echo "#pstree"
    pstree
    echo "#检查防火墙状态"
    echo "#systemctl status firewalld"
    systemctl status firewalld
    echo "#查看开放的端口"
    echo "#firewall-cmd --list-ports"
    firewall-cmd --list-ports
    echo "#检查IPtables信息"
    echo "#iptables -nL"
    iptables -nL
    echo "#Iptables 查看配置文件"
    echo "#cat /etc/sysconfig/iptables-config"
    cat /etc/sysconfig/iptables-config
    echo "#检查linux 下是否安装java(jdk)环境"
    echo "#java -version"
    java -version
    which java
    rpm -qa |grep java
    echo $PATH 
    echo "#检查python环境"
    echo "#which python"
    which python
    python --version
    echo "#检查用户环境变量配置"
    echo "#cat ~/.bashrc"
    cat ~/.bashrc
    echo "#linux-ssh互信配置"
    echo "#cat ~/.ssh/known_hosts"
    cat ~/.ssh/known_hosts
    echo "#查看系统环境变量"
    echo "#cat /etc/environment"
    cat /etc/environment
    echo "#systemd系统服务"
    echo "#systemctl list-unit-files"
    systemctl list-unit-files
    echo "#查看安装的软件包"
    echo "#rpm -qa | sort"
    rpm -qa | sort
    echo "#使用netstat 命令查看系统服务"
    echo "#netstat -pnltu"
    netstat -pnltu

    echo "#检测k8s版本"
    echo "#kubectl version"
    kubectl version
    echo "#检测docker版本"
    echo "#docker version"
    docker version

  • 相关阅读:
    整数转罗马数字算法(leetcode第12题)
    双机热备综合实验(VRRP+OSPF+VTP+NAT+DHCP)
    Docker 入门流程
    Linux如何使用Nginx部署前端项目
    需求变更,敏捷项目应如何做?
    基于粒子群优化神经网络(Matlab代码实现)
    weapp-tailwindcss - 在开发小程序中使用 tailwindcss 的最佳方式,免费开源,支持国内各家主流小程序平台
    从零开始搭建springboot框架
    Educational Codeforces Round 155 (Rated for Div. 2)
    联表查询JoinON详解(自连接)
  • 原文地址:https://blog.csdn.net/shunzi2016/article/details/134494877