欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

percona-toolkit 之 【pt-summary】、【pt-mysql-summary】、【pt-config

程序员文章站 2022-05-13 15:34:13
...

percona-toolkit 之 【pt-summary】、【pt-mysql-summary】、【pt-config-diff】、【pt-variable-advisor】说明

摘要:

通过下面的这些命令在接触到新的数据库服务器的时候能更好更快的了解服务器和数据库的状况。

1:pt-summary:查看系统摘要报告

执行:

pt-summary

打印出来的信息包括:CPU、内存、硬盘、网卡等信息,还包括文件系统、磁盘调度和队列大小、LVM、RAID、网络链接信息、netstat 的统计,以及前10的负载占用信息和vmstat信息。

# Percona Toolkit System Summary Report ###################### Date :06:37 UTC (local TZ: CST +0800) Hostname | zhoujy Uptime | 5 days, 23:25, 3 users, load average: 1.31, 1.32, 1.27 Platform | Linux Release (oneiric) Kernel generic-pae Architecture , OS Threading | NPTL 2.13 SELinux | No SELinux detected Virtualized | No virtualization detected # Processor ################################################## Processors , virtual = 2, hyperthreading = no Speeds | 2x1600.000 Models | 2xPentium(R) Dual-Core CPU E6600 @ 3.06GHz Caches | 2x2048 KB # Memory ##################################################### Total | 3.9G Free | 389.6M Used , swap used .5G Buffers | 322.0M Caches | 1.4G Dirty | 344 kB UsedRSS | 2.2G Swappiness | 60 DirtyPolicy | 10, 5 DirtyStatus | 0, 0 Locator Size Speed Form Factor Type Type Detail # Mounted Filesystems ######################################## Filesystem Size Used Type Opts Mountpoint devhome ,default_permissions /media/other none run/shm none 2.0G 1% tmpfs rw,nosuid,nodev /run/shm none 2.0G 1% debugfs rw /run/shm none 2.0G 1% securityfs rw /run/shm none run/lock none 5.0M 0% tmpfs rw,nosuid,nodev /run/lock none 5.0M 0% debugfs rw /run/lock none 5.0M 0% securityfs rw /run/lock tmpfs 799M ,moderun udev dev # Disk Schedulers And Queue Size ############################# sda # Disk Partioning ############################################ # Kernel Inode State ######################################### dentrynr inode # LVM Volumes ################################################ Unable to collect information # LVM Volume Groups ########################################## Unable to collect information # RAID Controller ############################################ Controller | No RAID controller detected # Network Config ############################################# Controller | Atheros Communications AR8151 v2.0 Gigabit Ethernet (rev c0) FIN Timeout | 60 Port Range | 61000 # Interface Statistics ####################################### interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors lo eth0 # Network Connections ######################################## Connections from remote IP addresses .............................46.200 1 Connections to local IP addresses 192.168.200.25 60 Connections local ports States of connections CLOSE_WAIT 50 ESTABLISHED 10 LISTEN 20 # Top Processes ############################################## PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND :17 firefox :28.96 plugin-containe :37.26 compiz 162m :09.55 pulseaudio 20m 12m S :27.86 gnome-terminal S :00.52 init S :00.01 kthreadd S :root S :00.51 kworker/u:0 # Notable Processes ########################################## PID OOM COMMAND sshd # Simplified and fuzzy rounded vmstat (wait please) ########## procs ---swap-- -----io---- ---system---- --------cpu-------- r b si so bi bo ir cs us sy il wa st # The End #################################################### View Code

更多信息见:

2:pt-mysql-summary:查看mysql各个统计信息

执行:

pt-mysql-summary --user=root --password=123456 --host=192.168.200.25 --port=3306