11/28/2023 0 Comments Windows powershell using cpuIf the process is not in the protected list, then the script tries to kill that process on the destination server. We do NOT want to render a server inoperable!. It is recommended to define a protected process list to prevent killing critical processes. “KillWindowsProcess.ps1” script connects to SolarWinds API to pull top process information from alert note and then checks the found process if it is in protected process list. This script gets two parameters first parameter is server name and the second parameter is alert object ID.Īction should be configured to be executed with a domain account that can connect and kill process on destination server: This is the actual command to be run by the action:ĪPM\ -n=$'& amp amp amp amp amp amp amp amp amp amp quot Īs shown in this command, we defined custom script “KillWindowsProcess.ps1” in folder “C:\Webinar_Scripts” of Primary SolarWinds server. This action in type of “Execute external program” and it executes SolarWinds® out-of-the-box tool “” in order to poll in realtime for the top 5 processes sorted by “Physical Memory” and insert this information to “Alert Notes” area for the triggered alert object. Now let’s look at these actions in detail:Īction 1: Execute program : OK, I have given enough of a warning to configure this function in your Orion, so lets get to it.įirst of all you need to be monitoring your servers within Orion SAM, which will provide CPU and memory utilisation for the whole system. If you are at this place the ability for Orion to identify the issue and fix the issue and all you need to see is the alert notification to confirm it did this, you would be kinda happy right? This is a big if and this post should if you have not already picked up, will give you a method within Orion itself to automate that operation, but you must be at that 100% to apply the capability outlined in this post. Now the big question comes where you know for absolute certainty (notice how this is in bold?!) that if your server consumes continuously more than say 95%, that stopping the process with the highest resource usage will resolve the issue. If you are using a monitoring solution, such as SolarWinds Server and Application Monitor (SAM), you are no doubt monitoring those key servers. If you have a slow running machine or application, and you happened to be on the desktop of that machine, you are going to go look at Task Manager to see what is consuming all of the compute resource. For some, this is the pre-cursor IT fix before rebooting the machine, as that invariably gets the right result. We have all had an application or service that runs away with itself and consumes all of the compute resource on a server, where you know that a simple restart of the service or killing of the process will restore operation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |