반응형
https://docs.percona.com/percona-software-repositories/installing.html
Percona-toolkit
Percona 사에서 개발한 오픈소스 기반의 MySQL/MariaDB 의 유틸리티로 기술지원 시 사용하던 유용한 기능의 유틸리티 도구를 하나로 묶은 패키지
툴킷을 이용해서 DB의 다양한 정보들을 확인해볼 수 있습니다.
Percona-toolkit 설치
yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
yum install percona-toolkit
상태 체크 확인
pt-mongodb-summary mongodb://USERID:PASSWORD@localhost:27017/DB명
pt-mongodb-summary mongodb://USERID:PASSWORD@localhost:27017/manager
# Instances ##############################################################################################
PID Host Type ReplSet Engine
0 mongodb01:30000 -
0 mongodb02:30000 -
0 mongodb03:30000 -
0 mongodb04:30000 -
6186 manager:20001 CONFIGSVR/SECONDARY rs-cfg wiredTiger
6186 manager:20002 CONFIGSVR/SECONDARY rs-cfg wiredTiger
6186 manager:20003 CONFIGSVR/PRIMARY rs-cfg wiredTiger
4863 manager:33000 SHARDSVR/ARBITER rs-01 wiredTiger
4293 manager:33001 SHARDSVR/ARBITER rs-02 wiredTiger
# This host
# Mongo Executable #######################################################################################
Path to executable | /data/mongo/source/mongodb/bin/mongos
# Report On test:27017 ########################################
User | mongo
PID Owner | mongos-00
Hostname | test01:27017
Version | 4.4.18
Built On | Linux x86_64
Started | 2022-12-19 00:23:00 +0900 KST
Processes | 0
Process Type | mongos
# Command line arguments
mongos-00 -f /data/mongo/cfg/mongos-00.cfg
# Running Ops ############################################################################################
Type Min Max Avg
Insert 0 0 0/5s
Query 0 0 0/5s
Update 0 0 0/5s
Delete 0 0 0/5s
GetMore 0 0 0/5s
Command 1 3 7/5s
# Security ###############################################################################################
Users : 3
Roles : 0
Auth : disabled
SSL : disabled
Port : 27017
Bind IP: 0.0.0.0
Error. You are insecure: bind ip 0.0.0.0 is public and auth is disabled
# Balancer (per day)
Success: 1536
Failed: 0
Splits: 1024
Drops: 0
중복 인덱스, 사용안하는 인덱스 체크
pt-mongodb-index-check --mongodb.uri=mongodb://USERID:PASSWORD@localhost:27017/DB명 check-all
pt-mongodb-index-check --mongodb.uri=mongodb://USERID:PASSWORD@localhost:27017/manager check-all
Duplicated indexes
Unused indexes since last restart
반응형
'LINUX > DB' 카테고리의 다른 글
[MySQL] Mysql8 Audit 로그 설정 (0) | 2022.11.25 |
---|---|
[AWS-RDS] MYSQL you *might* want to use the less safe log_bin_trust_function_creators variable (0) | 2022.10.24 |
[MSSQL] (Backup, Restore) Database 진행률 확인 쿼리 (0) | 2022.08.30 |
[MSSQL] 제일 많은 빈도수 쿼리 조회 스크립트 (0) | 2022.07.19 |
[MYSQL] 한 서버에서 여러개 mysql 관리 (mysqld_multi) (0) | 2022.05.03 |