Preface
 
    As a dba,We are obliged to master several basic tools(such as vmstat,top,netstat,iostat,df,etc.) to monitor system status or analyze the the information of it espcially in trouble shooting and performance tunning.
    
Introduce
 
    pt-summary is a tool which provide us the function of collecting the common system information for us instead of running the other various tools.It can print a report in summary on screen or write into a sepcific file either.It's better to run it as root to get as many as privieges.
 
Procedure
 
Usage
 pt-summary //We can executed it without any parameter.
Common parameter
 --read-samples //Generate the report from sepcific files.
--save-samples //Create a directory and put the collected information into different files in it.
--sleep //Specify the how long to sleep while collecting samples of vmstat.
--summarize-mounts //Report information of mounted filesystems and disk usage.
--summarize-network //Report information of network.
--summarize-processes //Report information of top processes and vmstat.
Example
 [root@zlm2 :: ~]
#pt-summary --save-samples=`date +%Y%m%d`
# Percona Toolkit System Summary Report ######################
Date | -- :: UTC (local TZ: CEST +)
Hostname | zlm2
Uptime | :, users, load average: 0.03, 0.03, 0.05
System | innotek GmbH; VirtualBox; v1. (Other)
Service Tag |
Platform | Linux
Release | CentOS Linux release 7.1. (Core)
Kernel | 3.10.-.el7.x86_64
Architecture | CPU = -bit, OS = -bit
Threading | NPTL 2.17
SELinux | Disabled
Virtualized | VirtualBox
# Processor ##################################################
Processors | physical = , cores = , virtual = , hyperthreading = no
Speeds | 1x2396.
Models | 1xIntel(R) Core(TM) i5-6200U CPU @ .30GHz
Caches | 1x3072 KB
# Memory #####################################################
Total | 993.6M
Free | 588.3M
Used | physical = 250.9M, swap allocated = 1016.0M, swap used = 0.0, virtual = 250.9M
Shared | 6.5M
Buffers | 154.5M
Caches | 606.5M
Dirty | kB
UsedRSS | 296.2M
Swappiness |
DirtyPolicy | ,
DirtyStatus | ,
Locator Size Speed Form Factor Type Type Detail
========= ======== ================= ============= ============= ===========
# Mounted Filesystems ########################################
Filesystem Size Used Type Opts Mountpoint
/dev/mapper/centos-root .4G % xfs rw,relatime,attr2,inode64,noquota /
/dev/sda1 497M % xfs rw,relatime,attr2,inode64,noquota /boot
devtmpfs 488M % devtmpfs rw,nosuid,size=499536k,nr_inodes=,mode= /dev
none 87G % vboxsf rw,nodev,relatime /vagrant
tmpfs 497M % tmpfs rw,nosuid,nodev /dev/shm
tmpfs 497M % tmpfs rw,nosuid,nodev,mode= /dev/shm
tmpfs 497M % tmpfs rw,nosuid,nodev,noexec,mode= /dev/shm
tmpfs 497M % tmpfs rw,nosuid,nodev /sys/fs/cgroup
tmpfs 497M % tmpfs rw,nosuid,nodev,mode= /sys/fs/cgroup
tmpfs 497M % tmpfs rw,nosuid,nodev,noexec,mode= /sys/fs/cgroup
tmpfs 497M % tmpfs rw,nosuid,nodev /run
tmpfs 497M % tmpfs rw,nosuid,nodev,mode= /run
tmpfs 497M % tmpfs rw,nosuid,nodev,noexec,mode= /run
# Disk Schedulers And Queue Size #############################
dm- |
dm- |
sda | [cfq]
sr0 | [cfq]
sr1 | [cfq]
# Disk Partioning ############################################
Device Type Start End Size
============ ==== ========== ========== ==================
/dev/dm- Disk
/dev/dm- Disk
/dev/sda Disk
/dev/sda1 Part
/dev/sda2 Part
# Kernel Inode State #########################################
dentry-state |
file-nr |
inode-nr |
# LVM Volumes ################################################
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root centos -wi-ao---- <.38g
swap centos -wi-ao---- 1016.00m
# LVM Volume Groups ##########################################
VG VSize VFree
centos .41g 40.00m
# RAID Controller ############################################
Controller | No RAID controller detected
# Network Config #############################################
Controller | Intel Corporation 82540EM Gigabit Ethernet Controller (rev )
Controller | Intel Corporation 82540EM Gigabit Ethernet Controller (rev )
FIN Timeout |
Port Range |
# Interface Statistics #######################################
interface rx_bytes rx_packets rx_errors tx_bytes tx_packets tx_errors
========= ========= ========== ========== ========== ========== ==========
lo
enp0s3
enp0s8
# Network Devices ############################################
Device Speed Duplex
========= ========= =========
enp0s3 1000Mb/s Full
enp0s8 1000Mb/s Full
# Network Connections ########################################
Connections from remote IP addresses
192.168.1.1
192.168.1.101
Connections to local IP addresses
192.168.1.101
Connections to top local ports States of connections
CLOSE_WAIT
ESTABLISHED
LISTEN
# Top Processes ##############################################
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
root S 0.0 0.4 :00.68 systemd
root S 0.0 0.0 :00.00 kthreadd
root S 0.0 0.0 :00.27 ksoftirqd/
root - S 0.0 0.0 :00.00 kworker/:0H
root S 0.0 0.0 :00.00 kworker/u2:
root rt S 0.0 0.0 :00.00 migration/
root S 0.0 0.0 :00.00 rcu_bh
root S 0.0 0.0 :00.00 rcuob/
root S 0.0 0.0 :01.07 rcu_sched
# 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 # Memory mamagement ##########################################
Transparent huge pages are enabled.
# The End #################################################### [root@zlm2 :: ~]
#ls -l
total
drwxr-xr-x root root Jul : //This is the newly created directory which contains individual information of system status.
-rw-------. root root Jul anaconda-ks.cfg
-rwxr-xr-x root root Jun : mysqld.sh
drwxr-xr-x root root Jul : sysbench-1.0 [root@zlm2 :: ~]
#cd / [root@zlm2 :: ~/]
#ls -l
total
-rw-r--r-- root root Jul : dmesg_file
-rw-r--r-- root root Jul : dmidecode
-rw-r--r-- root root Jul : ip
-rw-r--r-- root root Jul : lspci_file
-rw-r--r-- root root Jul : lvs
-rw-r--r-- root root Jul : memory
-rw-r--r-- root root Jul : mounted_fs
-rw-r--r-- root root Jul : netstat
-rw-r--r-- root root Jul : network_devices
-rw-r--r-- root root Jul : notable_procs
-rw-r--r-- root root Jul : partitioning
-rw-r--r-- root root Jul : proc_cpuinfo_copy
-rw-r--r-- root root Jul : processes
-rw-r--r-- root root Jul : summary
-rw-r--r-- root root Jul : sysctl
-rw-r--r-- root root Jul : uptime
-rw-r--r-- root root Jul : vgs
-rw-r--r-- root root Jul : vmstat [root@zlm2 :: ~/]
#cat memory //We can get detail information of memory usage in the collected file "memory".
total used free shared buff/cache available
Mem:
Swap:
MemTotal: kB
MemFree: kB
MemAvailable: kB
Buffers: kB
Cached: kB
SwapCached: kB
Active: kB
Inactive: kB
Active(anon): kB
Inactive(anon): kB
Active(file): kB
Inactive(file): kB
Unevictable: kB
Mlocked: kB
SwapTotal: kB
SwapFree: kB
Dirty: kB
Writeback: kB
AnonPages: kB
Mapped: kB
Shmem: kB
Slab: kB
SReclaimable: kB
SUnreclaim: kB
KernelStack: kB
PageTables: kB
NFS_Unstable: kB
Bounce: kB
WritebackTmp: kB
CommitLimit: kB
Committed_AS: kB
VmallocTotal: kB
VmallocUsed: kB
VmallocChunk: kB
HardwareCorrupted: kB
AnonHugePages: kB
HugePages_Total:
HugePages_Free:
HugePages_Rsvd:
HugePages_Surp:
Hugepagesize: kB
DirectMap4k: kB
DirectMap2M: kB
Summary
  • pt-summary can work well in many Unix systems(based on the inside-command of collecting data) without any complex parameters.
  • pt-summary is only a tool of generating reports of system information instead of tuning and diagnosing performance.
  • We can deploy pt-summary in crontab and make it collecting data regularly as we need for future diagnosis.
 

Percona-Tookit工具包之pt-summary的更多相关文章

  1. [访问系统] Api_Win32_Mac类工具包 (转载)

    点击下载 Api_Win32_Mac.zip using System; using System.Collections.Generic; using System.Linq; using Syst ...

  2. Linux后台开发工具箱

    https://files-cdn.cnblogs.com/files/aquester/Linux后台开发工具箱.pdf 目录 目录 1 1. 前言 3 2. 脚本类工具 3 2.1. sed命令- ...

  3. Mysql: pt-table-checksum 和 pt-table-sync 检查主从一致性,实验过程

    一.安装 percona 包 1.安装仓库的包 https://www.percona.com/doc/percona-repo-config/yum-repo.html sudo yum insta ...

  4. Linux后台开发工具箱-葵花宝典

    Linux后台开发工具箱-葵花宝典 一见 2016/11/4 目录 目录 1 1. 前言 4 2. 脚本类工具 4 2.1. 双引号和单引号 4 2.2. 取脚本完整文件路径 5 2.3. 环境变量和 ...

  5. 推荐几款MySQL相关工具

    前言: 随着互联网技术的不断发展, MySQL 相关生态也越来越完善,越来越多的工具涌现出来.一些公司或个人纷纷开源出一些不错的工具,本篇文章主要介绍几款 MySQL 相关实用工具.提醒下,这里并不介 ...

  6. 【C#】分享一个弹出容器层,像右键菜单那样召即来挥则去

    适用于:.net2.0+ Winform项目 ------------------201508261813更新(源码有更新.Demo未更新)------------------ 重新绘制调整大小手柄( ...

  7. winApi

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.R ...

  8. C#中可直接调用WIN32的API函数--USER32.DLL

    Win32的API函数可以直接在C#中直接调用,在做WinForm时还是很有帮助的.有时候直接调用Win32的API,可以很高效的实现想要的效果. using System; using System ...

  9. Winform API "user32.dll"中的函数

    命名空间:System.Runtime.InteropServices /// <summary> /// 该函数检索一指定窗口的客户区域或整个屏幕的显示设备上下文环境的句柄,以后可以在G ...

  10. c# BlowFish 高速 对称加密

    BlowFish 高速 对称加密 string key = "this is my key"; BlowFish algo = new BlowFish(key); string ...

随机推荐

  1. leetcode:回溯——permutation-sequence,

    1. permutation-sequence 顺序排列第k个序列 The set[1,2,3,…,n]contains a total of n! unique permutations. By l ...

  2. IOS TableView代理设置 table的行高

    // 设置行高(每一行的高度一致) self.tableView.rowHeight = ; self.tableView.delegate = self; #pragma mark - 代理方法 / ...

  3. javascript当中的无限分类

    var data = [ {id:100000, name :"1", pid :0}, {id:100100, name :"1-1", pid :10000 ...

  4. vuejs父子组件的数据传递

    在vue中,父组件往子组件传递参数都是通过属性的形式来传递的 <div id='root'> <counter :count = '1'></counter> &l ...

  5. MapReduce计算每年最大值测试样例生成程序

    Demo.java package com.java; import java.io.BufferedWriter; import java.io.File; import java.io.FileW ...

  6. CPP-STL:用vector保存对象时保存指针的优点, 以及reserve的使用(转)

    代码1 #include <vector> #include <stdio.h> class A { public: A() { printf("A()/n" ...

  7. django中间件及中间件实现的登录验证

    1.定义 一个用来处理Django的请求和响应的框架级别的钩子(函数),相对比较轻量级,并且在全局上改变django的输入与输出(使用需谨慎,否则影响性能) 直白的说中间件就是帮助我们在视图函数执行之 ...

  8. Apache 负载均衡 端口转发 配置

    转载自:https://blog.csdn.net/snihcel/article/details/38844323 [端口转发配置]       通过http_proxy做tomcat的端口转发: ...

  9. JAVA_Converter_字符串类型转Date类型

    我们知道数据库中的时间一般为Date类型,而前台传递过来的为字符串,BeanUtils在封装数据的时候,没有将类型转换,导致报异常... 我们只需要在封装数据之前,使用自定义转换器即可: 代码如下: ...

  10. C++声明之CV限定符

    目录 1.const 1.1 const obj 如果调用 non-const member fun会编译出错 经典错误 1.2 例子:STD里的操作符重载 1.3 例子:<cpp primer ...