Powershell Script to check service memory usage


OutOfMemoryError error, Tomcat JVM memory allocation problem and memory leak are the most frequently reported Tomcat performance issues. If you are getting any of these issues, it can be too late to fix problem without restart service.

At this point, it will be more critical to monitor service memory usage to take action before getting problem. You can use this script to monitor service memory usage on Windows server.



Parameters and  PowerShell script  usage:

-serviceName =  Service  which  needs  to  monitor

-virtsize = Memory  Threshold  value

-control = HP Operation  Manager  Object  name

-grup = HP Operation  Manager  Alert Owner 

#powershell -ExecutionPolicy ByPass C:\HPOOconfig\SystemControl\MemoryControl.ps1 -serviceName <ServiceName> -virtsize <VirtualMemorySize(MB)> -control <ControlName> -grup <AlertOwner> 

Follow me


I'm a System Engineer with extensive experience and administration skills and works for Interbank Card Center Of Turkey.I provide hardware and software support for the following Unix/Linux and Windows platforms.(Oracle Solaris,HP-UX, Linux, IBM-AIX, Windows Servers)
Follow me
facebooktwittergoogle_pluslinkedinby feather