摘要: #!/bin/bash ping_baidu(){ if ping -c 1 www.baidu.com >/dev/null; then echo 1 else echo 0 fi } ping_check_mysqlfile(){ if ping -c 1 XX.XX.XX.XX > /dev/null; then ... 阅读全文
posted @ 2019-01-07 22:20 SMALL-D 阅读(299) 评论(0) 推荐(0) 编辑
摘要: package mainimport ( "flag" "fmt" "golang.org/x/crypto/ssh" "log" "net" "os" "time")func connect_host(user, password, host string, port int) (*ssh.Ses 阅读全文
posted @ 2019-01-06 14:28 SMALL-D 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python# -*- coding:utf8 -*- """ """ import json, sys, argparsefrom zabbix_api import ZabbixAPIimport urllib2import osimport datetimeimport 阅读全文
posted @ 2019-01-06 14:25 SMALL-D 阅读(248) 评论(0) 推荐(0) 编辑
摘要: package main import ( "bufio" "fmt" "io" "os" "strings" ) func ReadLine(fileName string, handler func(string)) error { f, err := os.Open(fileName) if err != nil { return err } buf := buf... 阅读全文
posted @ 2018-09-11 00:20 SMALL-D 阅读(665) 评论(0) 推荐(0) 编辑
摘要: 在启用ICS时报以下错误: internet连接共享访问被启用时,出现了一个错误(null) 原因: Windows Firewall 服务被关掉了。 解决办法: 打开服务开启Windows Firewall。 开始 运行 services.msc 找到 Windows Firewall 并开启。 阅读全文
posted @ 2018-08-05 08:36 SMALL-D 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1. 下载NODE: https://nodejs.org/en/ 左侧是稳定版, 右侧是最新版。 2. 安装完成后用如下命令进行检测: 3. 设置环境变量,如果你的系统经常不是管理员登录 , 建议设置到非C盘: 4. 测试安装一个模块: 如无报错, 则环境变量等设置无误。 5. 安装VNPM: 设 阅读全文
posted @ 2018-05-20 12:29 SMALL-D 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 1. 安装PYTHON: 2. 安装PYTHON 包管理软件PIP: 3. 安装VIRTUALENV: 4. 虚拟一个环境: 5. 安装DJANGO: 6. 创建一个项目: 7. 创建一个APP: 8. 修改项目study下的SETTINGS配置文件: 8.1 增加自己的APP: INSTALLED 阅读全文
posted @ 2018-02-09 15:48 SMALL-D 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 案例背景: mysql 从库延迟一直增加,但RELAY_LOG_POS一直停止不前,设置READ_ONLY直接HANG死。用SHOW PROCESS LIST或者SHOW ENGINE INNODB STATUS均查看不到异常。 操作回顾: 1.接到业务需求方需要从另一个实例里迁移一张表过来并进行运 阅读全文
posted @ 2018-01-20 09:52 SMALL-D 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 异常: 表INSERT不了数据。 postgres=# insert into t_rows(name) values('b'); ERROR: duplicate key value violates unique constraint "t_rows_pkey" DETAIL: Key (id) 阅读全文
posted @ 2017-12-18 15:31 SMALL-D 阅读(6053) 评论(0) 推荐(0) 编辑
摘要: 问题现状: 在执行ONLINE DDL时,PT工具报出异常,无法连接从库: Cannot connect to A=utf8,D=test,P=3306,h=192.168.252.100,p=...,u=root 执行是完成了, 但这个警告忽略了从库,如果从库有异常,这个时候是不会管的。 分析: 阅读全文
posted @ 2017-12-11 15:21 SMALL-D 阅读(1578) 评论(0) 推荐(1) 编辑