shell脚本使用钉钉来进行mysql主从监控报警
#!/bin/bash mysql_binfile=/usr/local/mysql/bin/mysql m...
#!/bin/bash mysql_binfile=/usr/local/mysql/bin/mysql m...
#!/bin/bash file=`find ./ -name "*.txt"` user="root" passwd="rocdk890" database="rocdk890" cat $file | while read line do num1=`echo $line |awk '{print $1}'` num2=`echo $line |awk '{print $2}'` num3=`echo...
#!/bin/bash musicPath=/root/music music="*.mp3" cd $musicPath mplayer -loop 0 $music #music="*.mp3 ../../下载/one night in 北京.mp3 ../../下载/怒放的生命.mp3" mplayerID=`ps...
#!/bin/bash # By rocdk890 # https://blog.slogra.com #Check the network is online cat /dev/null > ip_yes.txt cat /dev/null > ip_no.txt ip_num="192.168.1" read -p "Enter your network segment(Default ip: 192.168.1):" ip_num if...
#!/bin/bash . /etc/profile pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'` path="/usr/local/tomcat" if [ -n...
#! /bin/sh # update glibc to 2.17 for CentOS 6 wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.1...
#!/bin/bash # #date :Wed May 3 15:51:34 CST 2017 #author: gaogd # ## 说明: ip为容器的ip,hostname为容器主机名,已经容器识别名称,hostname=itemname-servername-owner-ip ## 可以自己选择镜像,如果参数中木有指定镜像名称,那么就在脚本中展示出来,让用户选择, ## 如果用户也不选择,就是默认的sshd进行 ## 用法: sh createcontainter.sh ...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then echo "Error: You must b...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root...
#!/bin/bash read -p "Enter mysql password": newpasswd sed -i "s/rocdk890/$newpasswd/g" /etc/init.d/mysqld_multi chmod +x /etc/init...
#!/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check the network status NET_NUM=`ping -c 4 www.baidu.com |awk '/pac...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0"...
#!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin:~/bin export PATH # Check if user is root if [ $(id -u) != "0" ]; then echo "...