Smart Recent Blog Post List

Nov 22, 2011

How to start , stop perfmon from the command line in Windows ?

Logman command is the solution for it.
let's have a look at the command syntax

Syntax Verbs
Logman [create {counter | tracecollection_name ] [start collection_name] [stop collection_name] [delete collection_name] [query {collection_name|providers}] [update collection_name]

Parameter details:-

create {counter | tracecollection_name Creates collection queries for either counter or trace collections. You can use command line options to specify settings.
start collection_name Starts the data collection query collection_name. Use this option to change from scheduled collections to manual ones. Use the update parameter in the command line with begin-time (-b), end-time (-e), or repeat-time (-rt) to reschedule collections.
stop collection_name Stops the data collection query collection_name. Use this option to change from scheduled collections to manual ones. Use the update parameter in the command line with begin-time (-b), end-time (-e), or repeat-time (-rt) to reschedule collections.
delete collection_name Deletes the data collection query collection_name. If the collection_name does not exist, you will receive an error.
query {collection_name|providersIf no collection_name or providers are given, the status of all existing collection queries are displayed. Use collection_name to display the properties of a specific collection. To display the properties on remote computers, use the -s remote computer option in the command line. Use providers as your keyword in place of collection_name to display the registered providers installed on your local system. To list registered providers installed on the remote system, use the -soption in the command line.
update collection_name Updates collection queries for counter and trace collections. For counter collections, modifications to the query will stop, and then restart the collections. For trace collections, use the following parameters in the command line to query without stopping the collection: -p provider [(flags[,flags ...])Level- max n- o PathName-ft mm:ss, or -fd.


This command is very helpful in performance automation scenario.
If performance monitoring counter name is test_perf_log
then start command will go as :-
    logman start test_perf_log
on similar line stop command will go as:-
    logman stop test_perf_log


For more detail jump to page :- http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/nt_command_typeperf.mspx?mfr=true



2 comments:

The procedure of Hot tapping when a connection is required off a live pipe in constant operation, drilling a hole into the component while internal pressure is present.

Like every tech-intensive processes we know of, Line Stopping begins with planning, proceeds to implementation of the solution and finally to review of what has been delivered.

Post a Comment

Smart Recent Blog Post List