1. 关闭防火墙
service iptables stop
2. 查看防火墙状态
firewall -cmd –state
3. 查看端口是否被占用
netstat -an|grep 端口号
4. 根据port端口号显示具体进程号(pid)
lsof -i:端口号
5. 查看某个端口是否存在 (可以组合同时查询多个端口号,该命令会打印出端口号所占用的进程id)
netstat -tunlp|egrep “(2181 | 9092)”
6. 查看CPU型号
dmidecode -s processor-version(或cat /proc/cpuinfo |grep name |cut -f2 -d: |uniq -c )
7. 查看硬盘型号和大小
smartctl –all /dev/sda
8. 查看内存总数
cat /proc/meminfo |grep MemTotal
9. 查看操作系统版本号
cat /etc/redhat_release
10. 查看cpu核数
cat /proc/cpuinfo |grep “cpu cores” |uniq
11. 查看cpu个数
cat /proc/cpuinfo |gre p “physical id” |uniq |wc -l
12. 查看硬盘大小
fdisk -l |grep Disk