New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Monitoring all process CPU usage

Votes:

0

Your Vote:

Up

Down

Hi

can some one help with monitoring all process CPU usage and view hystoric data then?

thnx

cpu-load process prtg

Created on Oct 18, 2018 8:18:44 AM by  licencie (0) 1



5 Replies

Votes:

0

Your Vote:

Up

Down

Hi there,

You can use the Windows Process Sensor to monitor processes of your choice. This sensor has got a channel for the total and average CPU usage.


Kind regards,
Felix Saure, Tech Support Team

Created on Oct 18, 2018 12:23:14 PM by  Felix Saure [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I need monitor ALL processes not one specific sensor. I need to find in specific time witch process has top CPU usage.

Created on Oct 22, 2018 11:34:27 AM by  licencie (0) 1



Votes:

0

Your Vote:

Up

Down

Licencie, we're talking about Windows, correct? Or Linux? Do you need to find out which process is eating up CPU on long or short term?


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Oct 22, 2018 8:58:25 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Stephan we talking about windows. We need to find on long term in specific time which process use how many CPU. So we need monitoring all processes in long term (1-5 days) and then when user say now i have bad performance of PC find which proces in this time was on TOP.

Created on Oct 24, 2018 6:15:35 AM by  licencie (0) 1



Votes:

0

Your Vote:

Up

Down

Something like this should do the trick:

param(
    $computerName = "localhost",
    $ignoreList   = @("_Total", "svchost*")
)

$channelTemplateCPULoad = @"
<result>
 <channel>[{0}] CPU Load</channel>
 <value>{1}</value>
 <unit>CPU</unit>
 <float>1</float>
 <DecimalMode>2</DecimalMode>
</result>
"@


$channelTemplateMemoryUsage = @"
<result>
 <channel>[{0}] Memory Usage</channel>
 <value>{1}</value>
 <Unit>BytesDisk</Unit>
 <VolumeSize>MegaByte</VolumeSize>
 <Float>1</Float>
</result>
"@

$properties=@(
    @{Name="Process Name"; Expression = {$_.name}},
    @{Name="CPU (%)"; Expression = {$_.PercentProcessorTime}},    
    @{Name="Memory (MB)"; Expression = {[Math]::Round(($_.workingSetPrivate / 1mb),2)}}
)
$Processes = (Get-WmiObject -class Win32_PerfFormattedData_PerfProc_Process -ComputerName $computerName | Select-Object $properties )

Write-Host "<prtg>";
Foreach($Process in $Processes){
        if( $Process.'Process Name' -notmatch $ignoreList){
        Write-Host ([string]::Format($channelTemplateCPULoad, $Process.'Process Name', $Process.'CPU (%)'))
        Write-Host ([string]::Format($channelTemplateMemoryUsage, $Process.'Process Name', $Process.'Memory (MB)'))
        }
}
Write-Host "</prtg>";

However, filtering via $ignoreList doesn't work properly yet, you'll need to work on that (otherwise, you'll have 300 or more svchost processes). The script is provided as is and should give you a starting point. We can't help in getting it up and running as desired in your environment. Please also check our Guide for PowerShell based Custom Sensors for further installation details.


PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team

Created on Oct 24, 2018 8:26:49 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.