SCOM 2016 System Center Core Monitoring Fix

*** Update 2 *** Fixed issue with SCOMprecentageCPUTime where it would also measure other processes with healthservice as part of it's name. *** Update ***I have done some extensive refactoring of the code.Fixes:SCOMprecentageCPUTime could occationally terminate in a divide by ze

 
 
 
 
 
5 Star
(1)
281 times
Add to favorites
System Center
6/11/2017
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Collection script timeout
    3 Posts | Last post June 13, 2017
    • Hi,
      
      I have a SCOm 2016 UR3 environment with yhis MP loaded. Many servers report that Microsoft.SystemCenter.HealthService.SCOMpercentageCPUTimeCollectionAddendum workflow times out (120sec). Have you seen this in any of your environments?
      
      Martin
    • Hi, I have not seen this myself. But if servers have a lot of processes running I can see this script taking a long time to run.
      
      I did some measuring of what parts of the script was taking the most time, and unfortunately to tackle this I will have to rewrite everything from scratch (removing all the original code). In my environment the script normally runs for about 30 - 40 sec. 
      
      To find out more about you environment specifics take the script and run it on the server where you are seeing the problem. Run it from powershell command line (admin) and not from the ISE. 
      Do : 
      .\SCOMpercentageCPUTimeCounter.ps1 -ComputerName "servername.mydomain.dom" -ConfigForRun "False" -ProcessIterationCount 3
      
      Usually it is the iteration count that makes this script take a long time to complete. It uses this to get several rounds of performance data from the processes the health service spawns. This is then averaged. One way of reducing runtime is to set a lower number for ProcessIterationCount. Another is to set the original script timeout value back to 300 sec, instead of the 120 I have set. 
      
    • If you have the time can you try to run this version of the script on one of the servers that are timing out? I have changed some more code logic to hopefully optimize better the filtering of what processes it should get the performance counters from. 
      There are still many places where sleep is used, so it is impossible to get it to run faster than the combined values of these sleep commands. 
      
      https://github.com/mortenlerudjordet/lerunTools/blob/master/SCOM/MPs/Microsoft.SystemCenter.2007.Addendum/SCOMpercentageCPUTimeCounter.ps1
      
      Thanks