BCornelissen / SCOM-WinTaskSchedulerMP

SCOM Management Pack for Windows Task Scheduler
GNU Lesser General Public License v3.0
7 stars 3 forks source link

There is a memory usage problem in the Windows TaskScheduler management Pack #5

Closed sonalibann closed 4 years ago

sonalibann commented 4 years ago

Is the bug fixed in this MP fixed?

Event 2004 is being logged on widows server 2012 running the tasks

Event Description: Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: MonitoringHost.exe (5384) consumed 21751795712 bytes, svchost.exe (888) consumed 326160384 bytes, and HealthService.exe (1312) consumed 279740416 bytes.

scherndl commented 4 years ago

Hi,

We fixed it, check issue #4 and https://github.com/scherndl/SCOM-WinTaskSchedulerMP/tree/FixedMemoryLeak

sonalibann commented 4 years ago

Where can i find the .mp file for the SCOM Management Pack for Windows Task Scheduler Version: 1.2.1.7 (published July 2020)

scherndl commented 4 years ago

As long as rafabu do not seal the new version, you have to seal it by your own. (He is inactive here since 9 month) Use the Windows.TaskScheduler.Monitoring.xml file I uploaded today.

rafabu commented 4 years ago

@scherndl @sonalibann inactive with SCOM that is... Unfortunately I am not currently able to perform the quality checks on the PR but I'll see what can be done. P.S.: Any motivation to potentially work on the future support of this MP?

BCornelissen commented 4 years ago

I see @scherndl has been picking up the memory issue. Thank you very much for that! I will have a look at the code change proposal from his pull request. I will make a sealed beta version so you can test it and if working properly make a new prod version. As you see the github repo for this pack has been transferred to me, so the URL has changed @sonalibann Give me a little bit to review.

BCornelissen commented 4 years ago

Can you test the preview release 1.2.1.7? https://github.com/BCornelissen/SCOM-WinTaskSchedulerMP/releases If it works correctly please let me know so I can move to a production release. Also needs a few other changes which are not code related. Thank you!

scherndl commented 4 years ago

I tested your sealed version in my test enviroment (SCOM2019UR1) and it works fine.

For me I added following return code as good: 267011 (The task has not yet run)

Please add the Custom.Windows.TaskScheduler.Windows2008.QuickStartOR.xml MP to the release, I think this helps SCOM beginners to start with the mp.

Also the MP Guide would be fine, the old guide is better than no guide. :-)

My console crash if i want to open the overrides Summery "For the Monitor" image

With my sealed version it works fine, but i cannot find a difference.

BCornelissen commented 4 years ago

Hi Bernhard, So, we can add that code as a good code. Have to see where in the original code it is hiding though. Also have to find out why it crashes console, I can replicate it by clicking the same button as you did.

The 1.2.1.7 version is beta and only for testing. thats why only the one file got changed and added. Once its good I will create a new version for all files, add all 3 packs and such. Also need to change the guide. But have to check if I have the Word version somewhere already or if I need to request from Raphael.

BCornelissen commented 4 years ago

Right, I made a newer version 1.2.2.2. Imports fine now (there was a problem loading the library pack first). Also added that task state result code 267011 now (Thanks @scherndl ). Built all 3 MP files now with that version. Next step is the guide now, working on that now. Will write here to confirm if the release is online.

BCornelissen commented 4 years ago

Version 1.2.2.2 has been released and uploaded to Dev Branch. Zip file containing all files and guide has been included. Will figure out how to merge it all with the Release branch as well. V1.2.2.2 should fix the memory leak, and the other things mentioned in this #5 thread.

sonalibann commented 4 years ago

Thanks a lot for the help!!

sonalibann commented 4 years ago

We have updated the Task scheduler MP to 1.2.2.2 version but still we observed a memory leak. Event : 2004 Event Description: Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: MonitoringHost.exe (1376) consumed 21992554496 bytes, svchost.exe (876) consumed 335265792 bytes, and HealthService.exe (1308) consumed 291573760 bytes.

BCornelissen commented 4 years ago

Hi @sonalibann , was this after a complete clearing of the cache of that agent? It looks like it is using over 20 GB of ram on this one process? would be a big leak for a 1 week period.

sonalibann commented 4 years ago

I have cleared the cache now. Hopefully this doesn't occur again..