top of page
Writer's picturenabumilazpingbarph

Perfmon Data collector set from command line: Everything you need to know about importing, starting,



Occasionally, when tracking down a performance problem, you have to have information over time on the values of particular sets of performance counters. To track down the more insidious or sporadic problem, it is best to have the data in a SQL Server table, so you can query it. Feodor Georgiev explains the command-line way of doing this.




How to import,start,stop Perfmon Data collector set from command line



To gather this data, performance monitor (perfmon) logs need to be captured from the servers that should be monitored. This will require local or remote access to the servers with correct permissions to perfmon objects. We are assuming the performance engineer has been denied this level of access, so a server administrator or similar role within the project team with access will need to set this up. It is possible to monitor multiple servers from one location; in cases where the servers are behind a firewall, there needs to be only one log. Below is a list of 10 steps that walk you through gathering perfmon data. In this example, screen shots and steps are for Windows Server 2008.


PCP comes with a wide range of command line utilities for accessing liveperformance metrics via PMCDs or historical data using archive logs. Thefollowing examples illustrate some of the most useful use cases, pleasesee the corresponding manual pages for each command for additionalinformation. In the examples below -h could be used to querya remote host, the default is the local host. Shell completion supportfor Bash and especially for Zsh allows completing available metrics,metricsets (withpmrep), andavailable command line options.


Examples of thepmseriesquery language can be found on the man page. These queries can beexecuted from the command line utility, or from thegrafana-pcpplugin for Grafana (see the PCP Web Services section below).


If you prefer to push metrics into the agent, you can register and report metrics from a command-line script. You can invoke this script from your own custom program or from a cron/scheduler. This method allows for less flexibility but can be very easy to bring to life.


Feature Highlights1.Powerful data collection capabilities: The tool relies on SQLdiag collector engine to provide collection of perfmon, profiler trace, msinfo32, errorlogs, Windows event logs, TSQL script output and registry exports.2.Default templates: You can choose SQL Server version and platform (32 bit or 64 bit). The tool will automatically choose a default template for the combination. This will have default set of perfmon counters, profiler traces.3.Shipped with ready to use Custom collectors: Most commonly used custom collectors include SQL Server 2005, 2008 or 2008 R2 performance collector.4.Customization/Extensibility: You can customize what perfmon and profiler trace events you want to collect. Additionally, you can create your own custom collectors with TSQL Scripts, batch files and utilities. See customization guide.5.Packaging: With a single click of save, the tool will package all your files into a single cab so that you can ship to the machine where you intend to run on.6.Integration with SQL Nexus: The custom collectors shipped will collect data that can be analyzed by SQL Nexus Tool. 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page