Get-Process on a single service with high CPU

%3CLINGO-SUB%20id%3D%22lingo-sub-3180292%22%20slang%3D%22en-US%22%3EGet-Process%20on%20a%20single%20service%20with%20high%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3180292%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Folks%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20playing%20around%20with%20this%20--%26gt%3B%26nbsp%3BGet-Process%20ReportingServicesService%20%7C%20Sort-Object%20%7C%20Select-Object%20for%20example%20and%20gives%20me%20what%20I%20need%20but%20I%20need%20more%20detailed%20info.%20Like%20for%20instance%20when%20a%20service%20consumes%20very%20high%20memory%20drain%20is%20there%20a%20variable%20or%20function%20to%20expand%20what%20is%20really%20taking%20all%20the%20memory%20under%20that%20single%20process%3F%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3180292%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3182735%22%20slang%3D%22en-US%22%3ERe%3A%20Get-Process%20on%20a%20single%20service%20with%20high%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3182735%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1310541%22%20target%3D%22_blank%22%3E%40Tony_Barger%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%3C%2FP%3E%3CP%3ENot%2C%20as%20far%20as%20I%20know%2C%20there%20is%20no%20%3CSTRONG%3Ebuilt-in%20%3C%2FSTRONG%3Eway%20in%20the%20%3CSTRONG%3EGet-Process%3C%2FSTRONG%3E%20to%20get%20which%20process%20is%20consuming%20the%20memory%20after%20a%20certain%20threshold.%3C%2FP%3E%3CP%3EInstead%2C%20you%20need%20to%20monitor%20this%20through%20your%20script%2C%20calculate%20the%20percentage%20and%20issue%20a%20warning%20once%20the%20value%20reaches%20the%20required%20level%2C%20issue%20a%20Send-MailMessage%20or%20send%20an%20alert.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hello Folks, 

 

I have been playing around with this --> Get-Process ReportingServicesService | Sort-Object | Select-Object for example and gives me what I need but I need more detailed info. Like for instance when a service consumes very high memory drain is there a variable or function to expand what is really taking all the memory under that single process?  

1 Reply

@Tony_Barger 

Hi

Not, as far as I know, there is no built-in way in the Get-Process to get which process is consuming the memory after a certain threshold.

Instead, you need to monitor this through your script, calculate the percentage and issue a warning once the value reaches the required level, issue a Send-MailMessage or send an alert.