环境检查脚本:
根据提供的配置文件,读取本地的服务配置是否达标,以及是否能与远程的服务器实现端口的通信:
脚本:
#!/bin/bash #date:2017-08-25 #注意当前目录下要有env_list.conf配置文件 #system info system_info() { echo "*********************************************************************************" echo "system info:" echo echo "System-release : `cat /etc/redhat-release`" echo "Kernel-release : `uname -a|awk '{print $1,$3}'`" echo "Server-Model : `dmidecode | grep "Product Name:"|sed -n '1p'|awk -F': ' '{print $2}'`" } #CPU info cpu_info() { echo "**********************************************************************************" local_cpu_core=`cat /proc/cpuinfo | grep "processor" | sort -u| wc -l ` if [[ $1 -gt $local_cpu_core ]]; then echo -e "