文章分类 -  监控MySQL

摘要:zabbix监控MySQL数据库的参数直接可用 阅读全文
posted @ 2017-08-14 10:48 reborn枪 阅读(366) 评论(0) 推荐(0)
摘要:定时任务 给监控服务弄个复活甲 定时任务 阅读全文
posted @ 2017-05-08 13:50 reborn枪 阅读(132) 评论(0) 推荐(0)
摘要:start与stop start关键的语句: $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null & 命令行实行情况: /application/mysq 阅读全文
posted @ 2017-03-16 01:58 reborn枪 阅读(327) 评论(0) 推荐(0)
摘要:##两个启动的命令 [root@db01-51 ~]# ps -ef|grep 3306|grep -v grep root 1517 1 0 Mar15 pts/1 00:00:00 /bin/sh /application/mysql/bin/mysqld_safe --defaults-file=/data/3306/my.cnf mysql 2216 1517 0 Mar15 pts/1... 阅读全文
posted @ 2017-03-16 01:33 reborn枪 阅读(195) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# cat check_db.sh #!/bin/bash #remote if [ "`nmap 10.0.0.51 -p 3306 2>/dev/null |grep open|wc -l`" -gt "0" ] then echo "MySQL is running" else echo "MySQL is stoped" /e... 阅读全文
posted @ 2017-03-09 22:39 reborn枪 阅读(67) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# cat check_db.sh #!/bin/bash #remote if [ "`nc -w 2 10.0.0.51 3306 &>/dev/null echo ok|grep ok|wc -l `" -gt 0 ] then echo "MySQL is running" else echo "MySQL is st... 阅读全文
posted @ 2017-03-09 22:30 reborn枪 阅读(89) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# cat check_db.sh #!/bin/bash #local if [ "`netstat -lntup|grep mysqld|wc -l`" -gt 0 ] then echo "MySQL is running" else echo "MySQL is stoped" /etc/init.d/mysql... 阅读全文
posted @ 2017-03-09 22:24 reborn枪 阅读(63) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# cat check_db.sh #!/bin/bash #local if [ "`ps -ef |grep mysql|grep -v grep|wc -l`" -gt 0 ] then echo "MySQL is running" else echo "MySQL is stoped" /etc/init.d... 阅读全文
posted @ 2017-03-09 22:19 reborn枪 阅读(55) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# cat check_db.sh #!/bin/bash #local if [ "`netstat -lnt|grep 3306|awk -F "[ :]+" '{print $4}'`" = "3306" ] then echo "MySQL is running" else echo "MySQL is stoped" /et... 阅读全文
posted @ 2017-03-09 22:14 reborn枪 阅读(67) 评论(0) 推荐(0)
摘要:[root@db01-51 scripts]# [root@db01-51 scripts]# cat n_m.sh #!/bin/bash a=`/etc/init.d/mysqld status|grep -o SUCCESS` #b=`/etc/init.d/mysqld status|grep -o "not running"` if [ "$a" = "" ] then ... 阅读全文
posted @ 2017-03-09 22:07 reborn枪 阅读(101) 评论(0) 推荐(0)