小主面试的时候发现了有2到这样的题目
1、监控web服务是否正常,不低于2种监控策略。
2、监控db服务是否正常,不低于2种监控策略。
当时小主写的什么查看日志文件。。。。
现在觉得丢脸的一批! 原来是用shell脚本
题目的原型是来自老男孩的题目 但是小主是使用了centos7
所以写了一些不一样的,并且符合centos 7
#!/bin/bash
systemctl start httpd && systemctl enable httpd
if [ $? -ne 0 ];then
echo "failed httpd"
else
echo "success start httpd"
fi
if [ &#