11 2019 档案

摘要:#!/bin/bash#chkconfig 2345 99 20 #2345表示系统运行级别#99表示启动优先级#20表示关闭的优先级nginx=/usr/local/nginx/sbin/nginxcase $1 in start) netstat -anptu|grep nginx if [ $ 阅读全文
posted @ 2019-11-07 13:49 liyf023 阅读(673) 评论(0) 推荐(0)
摘要:#!/bin/bash ##########系统信息############系统类型os_type=`uname`#系统版本os_ver=`cat /etc/redhat-release`#系统内核os_ker=`uname -a |awk '{print $3}'`#当前时间os_time=`da 阅读全文
posted @ 2019-11-06 16:53 liyf023 阅读(874) 评论(0) 推荐(0)
摘要:#!/bin/bashnetstat -an |grep "ESTABLISHED" |awk '{print $4}' |awk -F ':' '{print $1}' |sort |uniq >> dropipfor ip in `cat dropip`do if [[ $ip =~ "192" 阅读全文
posted @ 2019-11-06 14:15 liyf023 阅读(126) 评论(0) 推荐(0)
摘要:#!/bin/bashpidof httpdif [ $? -eq 0 ];then echo "httpd is ok"else echo "httpd is not ok" /etc/init.d/httpd startfipidof keepalivedif [ $? -eq 0 ];then 阅读全文
posted @ 2019-11-06 13:55 liyf023 阅读(285) 评论(0) 推荐(0)
摘要:#!/bin/bash###########系统信息###########系统类型os_type=`uname`#系统版本os_ver=`cat /etc/redhat-release`#系统内核os_ker=`uname -a |awk '{print $3}'`#当前时间os_time=`dat 阅读全文
posted @ 2019-11-05 14:23 liyf023 阅读(349) 评论(0) 推荐(0)