YUMSERV
Published 2023. 1. 29. 17:36
[MongoDB] Percona-toolkit 설치 LINUX/DB
반응형

https://docs.percona.com/percona-software-repositories/installing.html

 

Percona Software Installation - Percona Software Repositories

Installation on Debian and Ubuntu LinuxInstallation on Red Hat Enterprise Linux and compatible derivatives If you are running a DEB-based distribution, such as Debian or Ubuntu Linux, use the apt package manager to install the percona-release official pack

docs.percona.com

 

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

 

반응형
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!