Failover Clustering Performance Counters – Part 4 – Command Line

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 ManagerGroups Online

Cluster Resource Control ManagerRHS Restarts

Cluster Resource Control ManagerRHS Processes

Cluster Global Update Manager MessagesUpdate Messages Delta

Cluster Global Update Manager MessagesUpdate Messages

Cluster Global Update Manager MessagesDatabase Update Messages Delta

Cluster Global Update Manager MessagesDatabase Update Messages

Cluster API CallsBatch API Calls Delta

Cluster API CallsNetwork Interface API Calls Delta

Cluster API CallsNetwork API Calls Delta

Cluster API CallsCluster API Calls Delta

Cluster API CallsKey API Calls Delta

Cluster API CallsResource API Calls Delta

Cluster API CallsGroup API Calls Delta

Cluster API CallsNode API Calls Delta

Cluster API CallsNotification API Calls Delta

Cluster Checkpoint ManagerCrypto Checkpoints Restored Delta

Cluster Checkpoint ManagerCrypto Checkpoints Restored

Cluster Checkpoint ManagerCrypto Checkpoints Saved Delta

Cluster Checkpoint ManagerCrypto Checkpoints Saved

Cluster Checkpoint ManagerRegistry Checkpoints Restored Delta

Cluster Checkpoint ManagerRegistry Checkpoints Restored

Cluster Checkpoint ManagerRegistry Checkpoints Saved Delta

Cluster Checkpoint ManagerRegistry 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 DatabaseFlushes Delta

Cluster DatabaseFlushes

Cluster API HandlesBatch Handles Delta

Cluster API HandlesBatch Handles

Cluster API HandlesNetwork Interface Handles Delta

Cluster API HandlesNetwork Interface Handles

Cluster API HandlesNetwork Handles Delta

Cluster API HandlesNetwork Handles

Cluster API HandlesCluster Handles Delta

Cluster API HandlesCluster Handles

Cluster API HandlesKey Handles Delta

Cluster API HandlesKey Handles

Cluster API HandlesResource Handles Delta

Cluster API HandlesResource Handles

Cluster API HandlesGroup Handles Delta

Cluster API HandlesGroup Handles

Cluster API HandlesNode Handles Delta

Cluster API HandlesNode Handles

Cluster API HandlesNotification Handles Delta

Cluster API HandlesNotification Handles

Cluster Multicast Request-Response MessagesMessages Outstanding

Cluster Multicast Request-Response MessagesMessages Sent Delta

Cluster Multicast Request-Response MessagesMessages 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 CallsResource API Calls Delta”

 

“(PDH-CSV 4.0)”,”\VPCLUS01Cluster API CallsResource 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