What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

WMI Process 64 Bit OS >4 GB Ram

Votes:

0

Hello, is it possible to monitor the RAM usage of a 64bit process >4 gb? I get the message "This 64 bit process may use more than 4 GB (code: PE130)" but the sensor is green and 4096 MB ram is in use. Is there a better way or can i adjust something?

pe130 prtg ram wmi

Created on Jun 12, 2014 1:56:19 PM



Best Answer

Accepted Answer

Votes:

0

This works for me and i dont get the error message.

param(
[string] $machine,
[string] $processName
)
# Get Process Info
$myargs = @{ ProcessName = $processName }
$processInfo = Invoke-Command -ComputerName $machine -ScriptBlock { 
	PARAM($myargs);
	Get-Process -Name $myargs.ProcessName 
} -argumentList $myargs

# Output PRTG XML Data
write-host "<prtg>"
write-host "<result>"
write-host "<channel>"
write-host $processInfo.ProcessName
write-host "</channel>"
write-host "<unit>BytesMemory</unit>"
write-host "<value>"
write-host $processInfo.WorkingSet64
write-host "</value>"
write-host "</result>"
write-host "</prtg>"

Pramiters to set:"

-machine "%host" -processName "processName"

Created on May 24, 2018 12:16:22 PM

Last change on May 24, 2018 12:47:00 PM by  Luciano Lingnau [Paessler]



7 Replies

Votes:

0

Dear Marcel

This is a weakness of WMI which we cannot solve from our side. For for information please have a look at this article https://kb.paessler.com/en/topic/1073 chapter "Nonsensical or wrong results".

Created on Jun 13, 2014 9:39:05 AM by  Arne Seifert [Paessler Support]



Votes:

0

I am using a Powershell custom EXEXML sensors to monitor the RAM on a 64-bit process.

Just put this code into your "Custom Sensors\EXEXML" folder and create a new EXEXML sensor. I also set the Security Context to "Use Windows credentials of parent device".

Just modify the "HOST" value with the hostname of your server and modify the "PROCESS" value with the name (without .exe) of the process you wish to monitor.

For example to monitor the WinLogon.exe process only input "winlogon". $ProcessName = Invoke-Command -ComputerName Server01 -ScriptBlock {Get-Process -Name "winlogon" }

# Get Process Info
$ProcessName = Invoke-Command -ComputerName HOST -ScriptBlock {Get-Process -Name "PROCESS" }

# Output PRTG XML Data
write-host "<prtg>"
write-host "<result>"
write-host "<channel>"
write-host $ProcessName.ProcessName
write-host "</channel>"
write-host "<unit>BytesMemory</unit>"
write-host "<value>"
write-host $ProcessName.WorkingSet64
write-host "</value>"
write-host "</result>"
write-host "</prtg>"

Edit by Paessler Technical Support

The following script (adapted from above) allows you to pass the host and process as a parameter, rather than hardcoding it in the script itself.

param(
[string] $machine,
[string] $processName
)
# Get Process Info
$myargs = @{ ProcessName = $processName }
$processInfo = Invoke-Command -ComputerName $machine -ScriptBlock { 
	PARAM($myargs);
	Get-Process -Name $myargs.ProcessName 
} -argumentList $myargs

# Output PRTG XML Data
write-host "<prtg>"
write-host "<result>"
write-host "<channel>"
write-host $processInfo.ProcessName
write-host "</channel>"
write-host "<unit>BytesMemory</unit>"
write-host "<value>"
write-host $processInfo.WorkingSet64
write-host "</value>"
write-host "</result>"
write-host "</prtg>"

Now when you add the script within PRTG, you have to pass the following parameters in the "Parameters"-Field in the sensor's settings:

-machine "%host" -processName "processName"

Just keep the "host" parameter as it is as it dynamically gets the IP-Address/FQDN from the parent device.

Created on Jul 15, 2015 12:55:45 PM

Last change on Aug 9, 2018 4:58:53 AM by  Andreas Günther [Paessler Support]



Accepted Answer

Votes:

0

This works for me and i dont get the error message.

param(
[string] $machine,
[string] $processName
)
# Get Process Info
$myargs = @{ ProcessName = $processName }
$processInfo = Invoke-Command -ComputerName $machine -ScriptBlock { 
	PARAM($myargs);
	Get-Process -Name $myargs.ProcessName 
} -argumentList $myargs

# Output PRTG XML Data
write-host "<prtg>"
write-host "<result>"
write-host "<channel>"
write-host $processInfo.ProcessName
write-host "</channel>"
write-host "<unit>BytesMemory</unit>"
write-host "<value>"
write-host $processInfo.WorkingSet64
write-host "</value>"
write-host "</result>"
write-host "</prtg>"

Pramiters to set:"

-machine "%host" -processName "processName"

Created on May 24, 2018 12:16:22 PM

Last change on May 24, 2018 12:47:00 PM by  Luciano Lingnau [Paessler]



Votes:

1

Hi John,

Thank you very much for providing the correction! I will edit the previous answer.


Kind regards
Andreas Günther, Technical Support

Created on May 24, 2018 1:15:50 PM by  Andreas Günther [Paessler Support]



Votes:

0

What would be very handy from PRTG would be a process based on the script above that replicated the wmi process monitor, so it displayed the same information :-)

Created on May 25, 2018 11:56:01 AM



Votes:

0

Hello,

I'm attempting to run the following script from this thread but PRTG is throwing up an error XML: The channel name must not be empty. (code: PE242)

under settings for Sensor Display - Primary Channel I cannot select anything.

PRTG v18.2.40.1683 x64

Created on Aug 8, 2018 10:48:05 PM



Votes:

0

Hi Andrew!

Could you please enable "Write Results to Disk" in the sensor's setting and forward us the logfile after waiting a few minutes? Please find the log in the folder "C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)" on the probe, the sensor is running on. Please find the right files by looking for the numerical sensor ID in the filename. You can find the ID in the sensors "Overview" page on the right.

Please send us the files by email and enter "PAE1074576" in the subject line.

Thank you!


Andreas Günther
Tech Support, Paessler AG

Created on Aug 10, 2018 7:24:55 AM by  Andreas Günther [Paessler Support]




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.