瀚高数据库
目录
环境
文档用途
详细信息
环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7,Microsoft Windows (64-bit) 10
版本:4.5.7,4.5.6
文档用途
介绍瀚高数据库最佳实践配置工具HG_BP日志采集内容
详细信息
瀚高数据库最佳实践配置工具HG_BP日志采集内容如下:
收集项 |
说明 |
最早支持版本 |
CPU统计信息 |
lscpu |
V 1.1 |
CPU详细信息 |
cat /proc/cpuinfo |
V 1.1 |
内存详细信息 |
cat /proc/meminfo |
V 1.1 |
内存统计信息 |
free -m |
V 1.1 |
硬盘个数及分区情况 |
fdisk -l |
V 1.1 |
磁盘大小 |
df -Th |
V 1.1 |
磁盘Inode |
df -i |
V 1.1 |
bashrc文件 |
cat ~/.bashrc |
V 1.1 |
bash_profile文件 |
cat ~/.bash_profile |
V 1.1 |
HGDB HOME目录 |
ls -l $PGHOME |
V 1.1 |
HGDB data目录 |
ls -l $PGDATA |
V 1.1 |
HGDB HOME目录 |
ls -l $HGDB_HOME |
V 1.1 |
/opt目录情况 |
ls -l /opt/* |
V 1.1 |
操作系统版本情况 |
cat /etc/*-release |
V 1.1 |
操作系统系统参数文件 |
cat /etc/sysctl.conf |
V 1.1 |
用户进程限制 |
ulimit -a |
V 1.1 |
操作系统内核参数 |
sysctl -a |
V 1.1 |
是否加入开机启动项 |
systemctl list-unit-files|grep hgdb |
V 1.1 |
HGDB data目录初始化信息 |
pg_controldata |
V 1.1 |
HGDB 查看授权信息 |
check_lic |
V 1.1 |
CPU和磁盘I/O统计信息 |
iostat -d -x -k 1 10 |
V 1.1 |
CPU和磁盘I/O统计信息 |
iostat -c 1 10 |
V 1.1 |
进程统计信息 |
top -d 1 -n 2 |
V 1.1 |
系统的IP地址 |
ip a |
V 1.1 |
主机名和IP配置文件 |
cat /etc/hosts |
V 1.1 |
主机名 |
hostname |
V 1.1 |
系统运行时间 |
uptime |
V 1.1 |
系统的启动信息 |
dmesg |
V 1.1 |
定时任务计划 |
crontab -l |
V 1.1 |
大页内存使用情况 |
grep Huge /proc/meminfo |
V 1.1 |
HGDB hac集群状态 |
hghactl list |
V 1.1 |
HGDB hac集群配置 |
hghactl show-config |
V 1.1 |
HGDB集群etcd状态 |
etcdctl endpoint status --write-out=table |
V 1.1 |
HGDB集群proxy状态 |
systemctl status proxy |
V 1.1 |
HGDB集群hghac状态 |
systemctl status hghac |
V 1.1 |
HGDB集群hghac-vip状态 |
systemctl status hghac-vip |
V 1.1 |
HGDB集群etcd状态 |
systemctl status etcd |
V 1.1 |
HGDB集群zookeeper状态 |
systemctl status zookeeper |
V 1.1 |
操作系统防火墙状态 |
systemctl status firewalld.service |
V 1.1 |
操作系统时间 |
timedatectl |
V 1.1 |
SELinux配置文件 |
cat /etc/selinux/config |
V 1.1 |
免密配置文件 |
cat ~/.pgpass |
V 1.1 |
所有进程 |
ps -aux |
V 1.1 |
数据库进程 |
ps -ef|grep postgres |
V 1.1 |
数据库版本 |
select kernel_version(); |
V 1.1 |
数据库日志路径 |
show log_directory ; |
V 1.1 |
数据库参数 |
show all; |
V 1.1 |
流复制状态 |
select * from pg_stat_replication; |
V 1.1 |
类型转换 |
select |
V 1.1 |
castsource::regtype, |
||
casttarget::regtype, |
||
castcontext |
||
from pg_cast; |
||
数据库信息 |
l+ --采用sql |
V 1.1 |
数据库用户 |
du+ --采用sql |
V 1.1 |
存在的数据库 |
db+ --采用sql |
V 1.1 |
数据库事务锁信息 |
select |
V 1.1 |
a.locktype, |
||
a.database, |
||
a.pid, |
||
a.mode, |
||
a.relation, |
||
b.relname |
||
from pg_locks a |
||
join pg_class b on a.relation = b.oid; |
||
最大连接数 |
show max_connections ; |
V 1.1 |
数据库连接进程 |
select count(1) |
V 1.1 |
from pg_stat_activity ; |
||
安全管理参数 |
select show_secure_param(); |
V 1.1 |
审计管理参数 |
select show_audit_param(); |
V 1.1 |
数据库对象(部分) |
select * from pg_class; |
V 1.1 |
数据库表信息 |
select * from pg_tables; |
V 1.1 |
数据库索引信息 |
select * from pg_index; |
V 1.1 |
数据库运行日志 |
数据库日志文件 |
V 1.1 |
操作系统报错日志 |
/var/log/messages* |
V 1.1 |
操作系统定时任务日志 |
/var/log/cron* |