Hi Cluster Fans,


Most of you are familiar with the Performance Monitor that allows you to work with performance counters.  Details have been described in the three previous posts in the series: Part 1, Part 2 and Part 3.


Using the command line, there are several functions which you may find useful.  For information about how do this using PowerShell for Failover Clustering, please visit this earlier blog post: http://blogs.msdn.com/clustering/archive/2009/07/22/9844473.aspx.


Typeperf.exe allows you to enumerate, monitor and collect performance counters from the command line. The command bellow show how to enumerate all clustering performance counters


>typeperf.exe -q | findstr Cluster


\Cluster Shared Volumes(*)\Metadata IO Delta

\Cluster Shared Volumes(*)\Metadata IO

\Cluster Shared Volumes(*)\Redirected Read Bytes Delta

\Cluster Shared Volumes(*)\Redirected Read Bytes

\Cluster Shared Volumes(*)\Redirected Reads Delta

\Cluster Shared Volumes(*)\Redirected Reads

\Cluster Shared Volumes(*)\Redirected Write Bytes Delta

\Cluster Shared Volumes(*)\Redirected Write Bytes

\Cluster Shared Volumes(*)\Redirected Writes Delta

\Cluster Shared Volumes(*)\Redirected Writes

\Cluster Shared Volumes(*)\IO Read Bytes Delta

\Cluster Shared Volumes(*)\IO Read Bytes

\Cluster Shared Volumes(*)\IO Reads Delta

\Cluster Shared Volumes(*)\IO Reads

\Cluster Shared Volumes(*)\IO Write Bytes Delta

\Cluster Shared Volumes(*)\IO Write Bytes

\Cluster Shared Volumes(*)\IO Writes Delta

\Cluster Shared Volumes(*)\IO Writes

\Cluster Resource Control Manager\Groups Online

\Cluster Resource Control Manager\RHS Restarts

\Cluster Resource Control Manager\RHS Processes

\Cluster Global Update Manager Messages\Update Messages Delta

\Cluster Global Update Manager Messages\Update Messages

\Cluster Global Update Manager Messages\Database Update Messages Delta

\Cluster Global Update Manager Messages\Database Update Messages

\Cluster API Calls\Batch API Calls Delta

\Cluster API Calls\Network Interface API Calls Delta

\Cluster API Calls\Network API Calls Delta

\Cluster API Calls\Cluster API Calls Delta

\Cluster API Calls\Key API Calls Delta

\Cluster API Calls\Resource API Calls Delta

\Cluster API Calls\Group API Calls Delta

\Cluster API Calls\Node API Calls Delta

\Cluster API Calls\Notification API Calls Delta

\Cluster Checkpoint Manager\Crypto Checkpoints Restored Delta

\Cluster Checkpoint Manager\Crypto Checkpoints Restored

\Cluster Checkpoint Manager\Crypto Checkpoints Saved Delta

\Cluster Checkpoint Manager\Crypto Checkpoints Saved

\Cluster Checkpoint Manager\Registry Checkpoints Restored Delta

\Cluster Checkpoint Manager\Registry Checkpoints Restored

\Cluster Checkpoint Manager\Registry Checkpoints Saved Delta

\Cluster Checkpoint Manager\Registry Checkpoints Saved

\Cluster Network Messages(*)\Bytes Received Delta

\Cluster Network Messages(*)\Bytes Received

\Cluster Network Messages(*)\Bytes Sent Delta

\Cluster Network Messages(*)\Bytes Sent

\Cluster Network Messages(*)\Messages Received Delta

\Cluster Network Messages(*)\Messages Received

\Cluster Network Messages(*)\Messages Sent Delta

\Cluster Network Messages(*)\Messages Sent

\Cluster Network Reconnections(*)\Reconnect Count

\Cluster Network Reconnections(*)\Unacknowledged Message Queue Length Delta

\Cluster Network Reconnections(*)\Unacknowledged Message Queue Length

\Cluster Network Reconnections(*)\Normal Message Queue Length Delta

\Cluster Network Reconnections(*)\Normal Message Queue Length

\Cluster Network Reconnections(*)\Urgent Message Queue Length Delta

\Cluster Network Reconnections(*)\Urgent Message Queue Length

\Cluster Database\Flushes Delta

\Cluster Database\Flushes

\Cluster API Handles\Batch Handles Delta

\Cluster API Handles\Batch Handles

\Cluster API Handles\Network Interface Handles Delta

\Cluster API Handles\Network Interface Handles

\Cluster API Handles\Network Handles Delta

\Cluster API Handles\Network Handles

\Cluster API Handles\Cluster Handles Delta

\Cluster API Handles\Cluster Handles

\Cluster API Handles\Key Handles Delta

\Cluster API Handles\Key Handles

\Cluster API Handles\Resource Handles Delta

\Cluster API Handles\Resource Handles

\Cluster API Handles\Group Handles Delta

\Cluster API Handles\Group Handles

\Cluster API Handles\Node Handles Delta

\Cluster API Handles\Node Handles

\Cluster API Handles\Notification Handles Delta

\Cluster API Handles\Notification Handles

\Cluster Multicast Request-Response Messages\Messages Outstanding

\Cluster Multicast Request-Response Messages\Messages Sent Delta

\Cluster Multicast Request-Response Messages\Messages Sent

\Cluster Resources(*)\Resource Type Controls Delta

\Cluster Resources(*)\Resource Type Controls

\Cluster Resources(*)\Resource Controls Delta

\Cluster Resources(*)\Resource Controls

\Cluster Resources(*)\Resource Failure Deadlock

\Cluster Resources(*)\Resource Failure Access Violation

\Cluster Resources(*)\Resource Failure

\Cluster Resources(*)\Resources Online


The next command shows how you can use typeperf to watch counters from the command line.

>typeperf.exe "\Cluster API Calls\Resource API Calls Delta"


"(PDH-CSV 4.0)","\\VPCLUS01\Cluster API Calls\Resource API Calls Delta"

"06/03/2009 17:34:43.647","94.000000"

"06/03/2009 17:34:44.661","89.000000"

"06/03/2009 17:34:45.675","104.000000"

"06/03/2009 17:34:46.689","85.000000"

"06/03/2009 17:34:47.703","91.000000"

"06/03/2009 17:34:48.717","103.000000"

"06/03/2009 17:34:49.731","85.000000"

"06/03/2009 17:34:50.745","92.000000"

"06/03/2009 17:34:51.759","92.000000"

"06/03/2009 17:34:52.773","101.000000"

"06/03/2009 17:34:53.787","87.000000"

"06/03/2009 17:34:54.801","84.000000"

"06/03/2009 17:34:55.815","87.000000"

"06/03/2009 17:34:56.829","101.000000"

"06/03/2009 17:34:57.843","84.000000"

"06/03/2009 17:34:58.857","88.000000"

"06/03/2009 17:34:59.871","96.000000"

"06/03/2009 17:35:00.885","93.000000"

"06/03/2009 17:35:01.898","87.000000"

"06/03/2009 17:35:02.912","88.000000"

"06/03/2009 17:35:03.926","96.000000"

"06/03/2009 17:35:04.940","89.000000"


If you run “typeperf /?” you will find many other useful features you might like.


The other tool I’ve found handy is logman.exe. This is a very powerful utility and one of its features allows you to manipulate Data Collector Sets.  You have probably already seen this feature in the Performance Monitor, but in perfmon you have to do everything manually.  Logman allows you to create/start/stop/delete the sets from the command line.  You can learn from the help a variety of things you can do with this tool, so instead of repeating the help here I want to share with you a batch file that will help you to manipulate the Data Collector Sets for the Failover Cluster counters. Enjoy it!


The script is available here: http://blogs.msdn.com/clustering/pages/9915526.aspx.  Note that this script is a sample only and you should test this before using it in a production environment.  This is not an officially supported script from Microsoft, so please use this at your own risk.


The Performance Monitor team has a post about the logman that can be used to manipulate perfmon logging sessions: http://blogs.technet.com/askperf/archive/2008/05/13/two-minute-drill-logman-exe.aspx.


To find more information about this script, you can run it with the /? parameter and see the following output:

> ClustPerf.cmd /?

clusperf.cmd [-c] [-stop] [-start] [-d] [-show] [-q] [-n {session name}] [-o {path to the log files}] [-f {counters filter}] [{list of nodes}]


-c           - cerate new session.

               aliases: create.

-start       - starts session.

-stop        - stops session.

-d           - deletes session.

               aliases: delete.

-show        - prints session details.

               aliases: q, query.

-q           - same as show.

               aliases: show, query.

-n {name}    - Session name.

               aliases: name.

               default: WSFCCluster.

-o {path}    - path to the trace files.

               aliases: out.

               default: c:\WSFCCluster.

-f {str}     - filter for the counters we want to monitor.

               aliases: flt, filter.

               default: Cluster.


You can specify multiple commands and they will be executed in the following order







Note that if you specify create then it already implies stop and delete.

Note that if you specify delete then it already implies stop.


You can provide list of nodes using clusnodes or myclusnodes environment variables



Vladimir Petter
Senior Software Development Engineer
Clustering & High-Availability