文章分类 - 监控MySQL
摘要:zabbix监控MySQL数据库的参数直接可用
阅读全文
摘要:start与stop start关键的语句: $bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null & 命令行实行情况: /application/mysq
阅读全文
摘要:##两个启动的命令 [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...
阅读全文
摘要:[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...
阅读全文
摘要:[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...
阅读全文
摘要:[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...
阅读全文
摘要:[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...
阅读全文
摘要:[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...
阅读全文
摘要:[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 ...
阅读全文

浙公网安备 33010602011771号