摘要: Supervisor是由python语言编写,基于linux操作系统的一款服务器管理工具,用以监控服务器的运行,发现问题能立即自动预警及自动重启等功能。Supervisor类似于monit,monit和supervisor的一个比较大的差异是supervisor管理的进程必须由supervisor来 阅读全文
posted @ 2017-05-11 11:28 Ray雷 阅读(1016) 评论(0) 推荐(0)
摘要: 1. IF条件判断语法: if Athen dosthelif B dosthelse dosthfi 2. 判断条件: 2.1 字符串判断 str1 = str2 当两个串有相同内容、长度时为真 str1 != str2 当串str1和str2不等时为真 -n str1 当串的长度大于0时为真(串 阅读全文
posted @ 2017-05-11 10:52 Ray雷 阅读(462) 评论(0) 推荐(0)
摘要: 一、逻辑运算符 二、逻辑表达式 test 命令 使用方法:test EXPRESSION 如: [root@localhost ~]# test 1 = 1 && echo 'ok'ok [root@localhost ~]# test -d /etc/ && echo 'ok' ok [root@ 阅读全文
posted @ 2017-05-11 10:51 Ray雷 阅读(547) 评论(0) 推荐(0)
摘要: # ping一个IP,延时大于5,输出延时大于5s,打印输出 #!/bin/bash ip=$* echo $ip num=`ping -c 10 ${ip}|grep icmp_seq|awk '{print $7}'|cut -d= -f2` for snum in $num do if [ ` 阅读全文
posted @ 2017-05-11 10:50 Ray雷 阅读(1163) 评论(0) 推荐(0)