PerfMon.exe managing counters through commands

Source: Internet
Author: User
Tags odbc connection

The perfmon command allows you to manage counters, add delete adjustments, and more.

Example 1: Logman: Manage and schedule performance counters and event trace logs on both local and remote systems.

' logman query '

Example 2: Stop performance counter

' logman Stop Performance '

Example 3: Delete the performance counter

' logman Delete Performance '

Example 4:bcp exported to a text file

"/craw" parameter to disable automatic conversion of character codes

"-T" trust link, otherwise you need to specify-u,-P

"-C" uses the char type as the storage type, without a prefix and "\ t" as the field delimiter, with "\ n" as the line separator

' BCP TempDB.dbo.Temp_PfConfigure out "d:\PerformanceConfigure.txt"-t-c-craw '

Example 5: Create a counter based on a file

"-si" Specifies the collection interval, default 15 seconds

"-CF" creates the path to the counter name

The output mode of the "-F" counter result, specified here: SQL

The output location of the "-o" counter result, specifying the output ODBC connection performance and the log name performance

"-V" adds version control information to the end of the output file and path name

' logman Create counter performance-si 00:00:15-cf "D:\PerformanceConfigure.txt"-F Sql-o performance! Performance-v mmddhhmm'

Example 6: Starting the performance counter

' logman Start Performance '

PerfMon.exe managing counters through commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.