New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


WMI Process 64 Bit OS >4 GB Ram

Votes:

0

Your Vote:

Up

Down

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 by  SDI_Marcel (0) 1



Best Answer

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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 by  Jabba1137 (50) 1

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



7 Replies

Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  waynejessee (0)

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



Accepted Answer

Votes:

0

Your Vote:

Up

Down

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 by  Jabba1137 (50) 1

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



Votes:

1

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  Jabba1137 (50) 1



Votes:

0

Your Vote:

Up

Down

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 by  AndrewH (0)



Votes:

0

Your Vote:

Up

Down

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]



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.