Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 36188

A Timesaver :: Run Perfmon with PowerShell

$
0
0

Welcome to my first post on the wonderful Tech Net Blogging Community.

Just sharing some time saving tips on how to quickly go into your Enterprise Search 2013 setup to help diagnose (for this example - content feeding and processing) issues with a set of predefined perfmon counters.  Very fast and very portable. I presented this at a recent Microsoft Premier Field Engineering Conference.  These are the mechanics of being able to quickly diagnose some issues.  In one of my next blog posts I will review what some of the numbers mean.

-----------------------------------------------
1) To get started:
Here is the TN reference on the Get-Counter cmdlet which is used in my examples --> http://technet.microsoft.com/en-us/library/dd367892.aspx

-----------------------------------------------

2)How to see the counters in PS: eg - Search Content Router
 
What this enables you to do – create a small script that would call a specific set of counters for (crawling, feeding, CPC, QPC etc) and be able to look at a component quickly. Build a counter file that calls the specific counters addressing whatever problem you may be trying to investigate.

Script:
get-counter -counter (get-content C:\path\mycounters.txt) -MaxSamples 10 -sampleinterval 1

mycounters.txt - geared towards diagnosing CPC issues, can create additional files addressing other search component issues
\Search Flow Statistics(contentprocessingcomponent1)\# Items Queued For Processing
\Search Flow Statistics(contentprocessingcomponent1)\Input Queue Empty Time
\Search Submission Service(contentprocessingcomponent1)\# Pending Items
\Search Gatherer Projects - SharePointServerSearch(*content)\Transactions Waiting
\Search Gatherer Projects - SharePointServerSearch(*content)\Transactions In Progress
\Search Gatherer Projects - SharePointServerSearch(*content)\Transactions Completed
\Search Gatherer - SharePointServerSearch\Threads Accessing Network
\Search Gatherer - SharePointServerSearch\Threads Filtering
\Search Gatherer - SharePointServerSearch\Threads Idle
\Search Flow Statistics(contentprocessingcomponent1)\Input Queue Full Time
\Search Content Router(contentprocessingcomponent1*)\NumSuccessIndex
\Search Content Router(contentprocessingcomponent1*)\IndexTime
\Search Gatherer Content Plugin - SharePointServerSearch(_total)\Documents Lost
\Search Gatherer Content Plugin - SharePointServerSearch(_total)\Documents Failed 
 
This will give you some nice statistics on what is going on with content processing and if there are some issues. 
 

Timestamp          CounterSamples                                                                                     
---------                 --------------                                                                                     
5/30/2013 2:56:55 PM    

search flow statistics(contentprocessingcomponent1)\# items queued for processing :     
                          0                                                                                                                                                                                                  
search flow statistics(contentprocessingcomponent1)\input queue empty time :            
                          1320669544                                                                                         
search submission service(contentprocessingcomponent1)\# pending items :                
                          0                                                                                                   
search gatherer projects - sharepointserversearch(search_service_application_0_portal_content)\transactions waiting :         
                          0                                                                                                  
search gatherer projects - sharepointserversearch(search_service_application_0_portal_content)\transactions in progress :     
                          0                                                                                                   
search gatherer projects - sharepointserversearch(search_service_application_0_portal_content)\transactions completed :       
                          0                                                                                                  
search gatherer - sharepointserversearch\threads accessing network :                    
                          0                                                                                                  
search gatherer - sharepointserversearch\threads filtering :                            
                          0                                                                                                  
search gatherer - sharepointserversearch\threads idle :                                 
                          0                                                                                                  
search flow statistics(contentprocessingcomponent1)\input queue full time :             
                          46                                                                                                 
search content router(contentprocessingcomponent1.sp1cdca7e5860a)\numsuccessindex :     
                          18                                                                                                 
search content router(contentprocessingcomponent1_average)\numsuccessindex :            
                          18                                                                                                 
search content router(contentprocessingcomponent1_total)\numsuccessindex :              
                          18                                                                                                 
search content router(contentprocessingcomponent1_max)\numsuccessindex :                
                          18                                                                                                 
search content router(contentprocessingcomponent1.sp1cdca7e5860a)\indextime :           
                          0                                                                                                  
search content router(contentprocessingcomponent1_average)\indextime :                  
                          0                                                                                                  
search content router(contentprocessingcomponent1_total)\indextime :                    
                          0                                                                                                  
search content router(contentprocessingcomponent1_max)\indextime :                      
                          0                                                                                                  
search gatherer content plugin - sharepointserversearch(_total)\documents lost :         
                         0

 

3)  It will also spit the output into the perfmon reporting GUI, so you can still get the nice readable format with  the perfmon graphs.   Just a matter of adding an export..(below)

 Script:
get-counter -counter (get-content C:\path\mycounters.txt) -MaxSamples 10 -sampleinterval 1 | Export-counter -Force -Path C:\path\data1.blg

                                                                                             

   

                                                         


Viewing all articles
Browse latest Browse all 36188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>