怎样获取Windows平台下SQL server性能计数器值
转载自工作伙伴Garrett, Helen “SQL Server Performance Counter captures”
Capturing Windows Performance Counters for SQL Server
SQL Server Performance Counters
The following counters are the recommended list to capture baseline performance metrics for SQL Server:
- Memory Available Mbytes (already added above)
- Memory Page Faults/sec (already added above)
- Memory Page Reads/sec (already added above)
- Memory Page Writes/sec (already added above)
- Paging File % Usage (_Total) (already added above)
- Processor % Privileged Time (_Total)
- Processor % Processor Time (_Total)
- Processor % User Time (_Total)
- Physical Disk % Idle Time (_Total)
- Physical Disk Avg. Disk Queue Length (_Total)
- Physical Disk Avg. Disk sec/Read (_Total)
- Physical Disk Avg. Disk sec/Transfer (_Total)
- Physical Disk Avg. Disk sec/Write (_Total)
- SQL Server: Access Methods/Page Splits/sec
- SQL Server: Buffer Manager Buffer Cache Hit Ratio
- SQL Server: Buffer Manager Page Life Expectancy
- SQL Server: Buffer Manager Page Lookups/sec
- SQL Server: Buffer Manager Page Reads/sec
- SQL Server: Buffer Manager Page Writes/sec
- SQL Server: General Statistics User Connections
- SQL Server: Memory Manager Memory Grants Pending
- SQL Server: SQL Statistics Batch Requests/sec
- SQL Server: SQL Statistics SQL Compilations/sec
- SQL Server: SQL Statistics SQL Recompilations/sec
- SQL Server: Wait Statistics Memory Grant Queue Waits <all instances>
- SQL Server: Wait Statistics Network IO Waits <all instances>
- SQL Server: Wait Statistics Non-Page Latch Waits <all instances>
- SQL Server: Wait Statistics Page IO Latch Waits <all instances>
- SQL Server: Wait Statistics Page Latch Waits <all instances>
- System Processor Queue Length
TypePerf
Microsoft provides a command line utility “TypePerf” which allows capturing counters from a remote system to a monitoring system and logging these either to the command window or a log file.
More information about the TypePerf command can be found at:
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_typeperf.mspx?mfr=true
Using TypePerf with an Input File
Create a folder on the monitoring server named “TypePerf”.
Create a new file in the TypePerf folder named
TypePerf_SQLCounters.txt.
Edit the TypePerf_SQLCounters.txt file by copying the following
contents into the file:
\\SERVERNAME\Memory\Available Bytes
\\SERVERNAME\Memory\Page Reads/sec
\\SERVERNAME\Memory\Page Writes/sec
\\SERVERNAME\Paging File(_Total)\% Usage
\\SERVERNAME\PhysicalDisk(_Total)\% Disk Time
\\SERVERNAME\PhysicalDisk(_Total)\Avg. Disk Queue Length
\\SERVERNAME\PhysicalDisk(_Total)\Avg. Disk sec/Read
\\SERVERNAME\PhysicalDisk(_Total)\Avg. Disk sec/Transfer
\\SERVERNAME\PhysicalDisk(_Total)\Avg. Disk sec/Write
\\SERVERNAME\Processor(_Total)\% Privileged Time
\\SERVERNAME\Processor(_Total)\% Processor Time
\\SERVERNAME\Processor(_Total)\% User Time
\\SERVERNAME\SQLServer:Access Methods\Page Splits/sec
\\SERVERNAME\SQLServer:Buffer Manager\Buffer cache hit ratio
\\SERVERNAME\SQLServer:Buffer Manager\Page life expectancy
\\SERVERNAME\SQLServer:Buffer Manager\Page lookups/sec
\\SERVERNAME\SQLServer:General Statistics\User Connections
\\SERVERNAME\SQLServer:Memory Manager\Memory Grants Pending
\\SERVERNAME\SQLServer:SQL Statistics\Batch Requests/sec
\\SERVERNAME\SQLServer:SQL Statistics\SQL Compilations/sec
\\SERVERNAME\SQLServer:SQL Statistics\SQL Re-Compilations/sec
\\SERVERNAME\SQLServer:Wait Statistics(*)\Memory grant queue
waits
\\SERVERNAME\SQLServer:Wait Statistics(*)\Network IO waits
\\SERVERNAME\SQLServer:Wait Statistics(*)\Page IO latch waits
\\SERVERNAME\SQLServer:Wait Statistics(*)\Page latch waits
\\SERVERNAME\System\Processor Queue Length
Perform a global replace of the SERVERNAME to match the actual server
name for the SQL Server that is to be monitored. Save the file and Close.
--------------------------------------------------------------分割线---------------------------------------------------------------------------
Go to the Start menu -> Command Prompt.
Change the directory to the location where the TypePerf directory was created.
At the command prompt, modify the next command to match the information for the SQL Server being monitored:
TYPEPERF -cf F:\TypePerf\TypePerf_SQLCounters.txt -f csv -o F:\TypePerf\MSLAB2191_yyyymmdd_hhmm.csv -s BRTC_MSLAB2191
-cf Name of the file that contains the list of counters to capture
-f format of the log file, defaults to csv
-o Path\name of output file
-s Name of server to collect the counters from if one does not exist in the counter file
EXAMPLE:
TYPEPERF -cf F:\TypePerf\TypePerf_SQLCounters.txt -f csv -o F:\TypePerf\MSLAB2191_20161020_2025.csv -s BRTC_MSLAB2191
Press Enter to start the counter collection…
The [\] will run the command and capture the counters every second.
Verify the file you specified for the output was created and is growing:
-------------------------------------------------------分割线-----------------------------------------------------------------------
When you have completed the SQL Server test, Press CTRL-C to stop the counter collection.
Close the Command Prompt window.
怎样获取Windows平台下SQL server性能计数器值的更多相关文章
- Windows平台下MySQL常用操作与命令
Windows平台下MySQL常用操作与命令 Windows平台下MySQL常用操作与命令,学习mysql的朋友可以参考下. 1.导出整个数据库 mysqldump -u 用户名 -p --defau ...
- Windows平台下Git服务器搭建
第一步:下载Java,下载地址:http://www.java.com/zh_CN/ 第二步:安装Java.安装步骤不再详述. 第三步:配置Java环境变量. 右键”计算机” => ”属性” = ...
- Windows 平台下Git 服务器搭建
由于项目中一直在使用git作为版本管理,自己对git的理解.使用都还不是怎么的熟悉,所以准备深入了解一下git及一些常用命令的使用,于是干脆把服务端架上,通过自己的PC作为服务端同时作为客户端的角色进 ...
- windows平台下VLC2.0.5编译
windows平台下VLC2.0.5编译说明 时隔一年多,又要搞流媒体了,不过这次是要做流媒体服务器. 暂时决定使用vlc+ffmpeg+live555,虽然听有些前辈说这个组合的性能较差,只能作为学 ...
- 【转】Windows平台下Git服务器搭建
Windows平台下Git服务器搭建 Posted on 2015-05-18 21:29 阿祥当码农 阅读(7637) 评论(0) 编辑 收藏 该文章转自:http://www.codeceo.co ...
- Windows平台下的node.js安装
Windows平台下的node.js安装 直接去nodejs的官网http://nodejs.org/上下载nodejs安装程序,双击安装就可以了 测试安装是否成功: 在命令行输入 node –v 应 ...
- windows平台下nginx+PHP环境安装
因为日常工作在windows下,为方便在window是下进行PHP开发,需要在windows平台下搭建PHP开发环境,web服务器选择nginx,不过windows版本的nginx性能要比Linux/ ...
- Windows平台下Oracle实例启动过程中日志输出
Windows平台下Oracle实例启动过程中日志输出记录. 路径:D:\app\Administrator\diag\rdbms\orcl\orcl\trace\alert_orcl.log 输出内 ...
- windows系统与SQL SERVER 2008数据库服务性能监控分析简要
软件系统性能测试体系流程介绍之windows系统与SQL SERVER 2008数据库服务性能监控分析简要 目前大部分测试人员对操作系统资源.中间件.数据库等性能监控分析都是各自分析各自的监控指标方式 ...
随机推荐
- mysql查询正在执行的进程
查看mysql进程有两种方法 1.进入mysql/bin目录下输入mysqladmin processlist; 2.启动mysql,输入show processlist; 如果有SUPER权限,则可 ...
- “maven编码gbk的不可映射字符”解决办法
一.问题描述 Eclipse中使用Maven编译项目源代码时,如下的错误 java源代码在Eclipse中显示是没有任何错误的,可是执行"maven install"命令编译项目时 ...
- 微信小程序时代已经来临
昨天估计微信公众号上产生了第一篇最快的30万+文章,10万+只花了10多分钟.就是冯大辉(著名Oracle专家,知名博主)同学的「微信应用号来了」. 为什么这么一篇如此简单又技术类的文章一下能刷遍朋友 ...
- java常见面试题及答案 1-10(基础篇)
java常见面试题及答案 1.什么是Java虚拟机?为什么Java被称作是"平台无关的编程语言"? Java 虚拟机是一个可以执行 Java 字节码的虚拟机进程.Java 源文件被 ...
- 如何解决Visual Studio调试Debug很卡很慢
http://brightguo.com/make-debugging-faster-with-visual-studio/ Have you ever been frustrated by slow ...
- Linux图形&命令行界面切换
1.实时切换 1.1 命令行->图形 startx 1.2 图形->命令行 Ctrl+Alt+F1--F6 2.启动默认 2.1 启动进入命令行 修改/etc/inittab文件 &quo ...
- git clone时,报403错误,完美解决方案
首先命令行操作结果如下: root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git ...
- android studio 2.0 GPU Debugger使用说明
GPU Debugger GPU Debugging Tools The GPU debugging tools are an experimental feature intended to hel ...
- jquery easyui tree的全选与反选
//全选反选 //参数:selected:传入this,表示当前点击的组件 //treeMenu:要操作的tree的id:如:id="userTree" function tree ...
- C++学习笔记 知识集锦(二)
1. 命名规范 2. 代码格式 3. QString的判断 4. 对象的判空 5. 隐式接口&显式接口 6. vector&string 7. static 8. const 9. v ...