代码改变世界

MySQL监控脚本

2017-07-07 18:07 by DataBases, 287 阅读, 0 推荐, 收藏,
摘要:#!/bin/bash## usage() {echo "Usage: $0 [ types... ] [ limit ] "echo ""echo "Types are:"echo "[ Size ] [ Rss ] [ Swap ] [ Private ] [ Shared ]"echo ""p 阅读全文

pgpool如何对数据库节点进行状态检查及相关数据结构描述

2017-06-28 10:49 by DataBases, 1472 阅读, 0 推荐, 收藏,
摘要:/* * configuration parameters */typedef struct { char *listen_addresses; /* hostnames/IP addresses to listen on */ int port; /* port # to bind */ char 阅读全文

性能瓶颈定位分析

2017-06-25 10:41 by DataBases, 786 阅读, 0 推荐, 收藏,
摘要:用vmstat、sar、iostat检测是否是CPU瓶颈 用free、vmstat检测是否是内存瓶颈 用iostat、dmesg 检测是否是磁盘I/O瓶颈 用netstat检测是否是网络带宽瓶颈 https://linux.cn/article-4452-1.html 1 首先进行OS层面的检查确认 阅读全文

如何使用pgpool failover_stream.sh自己控制选择指定的master节点

2017-06-20 16:31 by DataBases, 1136 阅读, 0 推荐, 收藏,
摘要:集群架构: h236:master h237:standby sync h238:standby sync h239:stadnby async h240:standby async h241:standby async pool.conf failover_command = '/etc/king 阅读全文

使用pgpool管理数据库集群故障的问题

2017-06-20 15:14 by DataBases, 1159 阅读, 0 推荐, 收藏,
摘要:pgpool如何选举master角色 在pgpool启动的过程中通过对 pgpoo.conf配置文件中的数据库节点条目信息,对集群中的数据库节点从0开始一个个的遍历,并发送SQL语句“select pg_is_in_recovery();”;根据返回的结构来判断哪个数据库节点是master。 在ma 阅读全文

pgpool中定义的数据库节点及pgpool支持的复制模式

2017-06-20 12:28 by DataBases, 694 阅读, 0 推荐, 收藏,
摘要:/* * The first DB node id appears in pgpool.conf or the first "live" DB * node otherwise. */#define REAL_MASTER_NODE_ID (Req_info->master_node_id)/* * 阅读全文

pgpool中的配置参数的定义

2017-06-20 10:55 by DataBases, 1455 阅读, 0 推荐, 收藏,
摘要:/* * configuration parameters */typedef struct { char *listen_addresses; /* hostnames/IP addresses to listen on */ int port; /* port # to bind */ char 阅读全文

pgpool-II在故障切换过程中是如何选举新主节点的

2017-06-20 10:48 by DataBases, 2317 阅读, 0 推荐, 收藏,
摘要:在pgpool的源代码中有有一个pgpool_main.c文件,在该文件中有一个pgpool的主函数pgpoolmain控制着pgpool的运行及相关操作。 libpcp_ext.h文件中定义了pgpool在一个集群中所运行的数据库节点个数如下宏定义及128个; #define MAX_NUM_BA 阅读全文

Linux 安装MySQL5.7.18

2017-06-18 07:25 by DataBases, 852 阅读, 0 推荐, 收藏,
摘要:https://dev.mysql.com/downloads/mysql/Linux-Generic md5sum mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz Linux环境检查 1 关闭numa [root@node130 ~]# vim /boot/gr 阅读全文

数据库系统基于日志的故障恢复过程

2017-06-15 16:27 by DataBases, 3761 阅读, 0 推荐, 收藏,
摘要:在数据库系统中日志是记录数据库修改的结构,记录数据库中的所有更新活动。描述一次数据库写操作的一个更新日志记录包含如下几个字段: 1)事务标识符是执行write操作事务的唯一标识符。2)数据项标识符是所写数据项的唯一标识符。通常是数据项在磁盘上的位置。3)旧值是写之前数据项的值。4)新值是写之后数据项 阅读全文
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 40 下一页