Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Process Monitoring

Reply
 
Old 07-17-2009   #1 (permalink)
rutherfg


 
 

Process Monitoring

I'm trying to monitor a component Service via Powershell script. my
requirment is: if the process DLLhost.exe, that is launced by a specific user
name, goes above 35 % CPU utalization for 5 min send alert, via SCOM.

My questions are:
1.) how do I check the User name of a process via Powershell.
2.) are there any logs that I can use to find historical CPU usage or will I
need to have my script running and sleeping to keep track of the CPU usage?

Thanks

My System SpecsSystem Spec
Old 07-18-2009   #2 (permalink)
Vadims Podans [MVP]


 
 

Re: Process Monitoring

1) gwmi win32_process -filter "name='mstsc.exe'" | %{$_.getowner().user}
2) no, there is no logs about CPU utilization. However you can use
Performance Monitor counters and/or trace logs. Or rerun your script each
time.
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog - www.sysadmins.lv

"rutherfg" <rutherfg@xxxxxx> rakstīja ziņojumā
"news:291B5AEB-32E4-4E68-AEFD-6D5BFDB8779F@xxxxxx"...
Quote:

> I'm trying to monitor a component Service via Powershell script. my
> requirment is: if the process DLLhost.exe, that is launced by a specific
> user
> name, goes above 35 % CPU utalization for 5 min send alert, via SCOM.
>
> My questions are:
> 1.) how do I check the User name of a process via Powershell.
> 2.) are there any logs that I can use to find historical CPU usage or will
> I
> need to have my script running and sleeping to keep track of the CPU
> usage?
>
> Thanks
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Failover Guest Cluster -- 'The process cannot access the file becauseit is being used by another process.' Virtual Server
Monitoring In/Out: what that can be? Vista General
Process count wrong when only one process matches criteria PowerShell
get-process & stop-process by owner PowerShell
Bug? Shouldn't Stop-Process automatically match Id if object is a process? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46