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

How can I perform mathematical operations in a WQL script?

Votes:

2

We are trying to monitor the Page File Usage on a Windows 2000 Server box, but the built in sensor says it can't understand the WMI class. I wrote my own as follows, but it can't be parsed. As you can see from the example below, I am trying to perform a division operation on the queried values. What am I doing wrong, or how could I go about resolving this issue?

Thanks, Zack

((SELECT CurrentUsage FROM Win32_PageFileUsage)/(SELECT AllocatedBaseSize FROM Win32_PageFileUsage))

custom-sensor math operations operator prtg wmi wql

Created on Feb 24, 2010 4:12:34 PM

Last change on Feb 25, 2010 10:46:50 AM by  Daniel Zobel [Product Manager]



1 Reply

Accepted Answer

Votes:

1

Hello,

I'm very much afraid the Custom WQL-Sensors are not capable of mathematical operations, as you already experienced. However, it should be possible to use the Sensor Factory as a work-around. Please create two Custom WQL Sensors, one with SELECT CurrentUsage FROM Win32_PageFileUsage and the second with SELECT AllocatedBaseSize FROM Win32_PageFileUsage Then please perform the devision with one Sensor Factory sensor.

Best Regards

Created on Feb 24, 2010 4:53:43 PM by  Torsten Lindner [Paessler Support]

Last change on Feb 25, 2010 10:46:12 AM by  Daniel Zobel [Product Manager]




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.