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 | zhoujyUptime | 5 days, 23:25, 3 users, load average: 1.31, 1.32, 1.27Platform | LinuxRelease (oneiric)Kernel generic-paeArchitecture , OS Threading | NPTL 2.13SELinux | No SELinux detected Virtualized | No virtualization detected# Processor ################################################## Processors , virtual = 2, hyperthreading = noSpeeds | 2x1600.000Models | 2xPentium(R) Dual-Core CPU E6600 @ 3.06GHzCaches | 2x2048 KB# Memory #####################################################Total | 3.9GFree | 389.6MUsed , swap used .5GBuffers | 322.0MCaches | 1.4GDirty | 344 kBUsedRSS | 2.2G Swappiness | 60 DirtyPolicy | 10, 5 DirtyStatus | 0, 0 Locator SizeSpeedForm Factor TypeType Detail # Mounted Filesystems ######################################## Filesystem Size Used TypeOptsMountpoint devhome ,default_permissions /media/other nonerun/shm none2.0G 1% tmpfsrw,nosuid,nodev/run/shm none2.0G 1% debugfs rw/run/shm none2.0G 1% securityfs rw/run/shm nonerun/lock none5.0M 0% tmpfsrw,nosuid,nodev/run/lock none5.0M 0% debugfs rw/run/lock none5.0M 0% securityfs rw/run/lock tmpfs799M ,moderun udevdev# 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.2001 Connections to local IP addresses192.168.200.2560 Connections local ports States of connectionsCLOSE_WAIT50ESTABLISHED10LISTEN20# Top Processes ############################################## PID USERPR 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-terminalS :00.52 initS :00.01 kthreaddS :rootS :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 boircs 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