How can I perform mathematical operations in a WQL script?

Votes:

2

Your Vote:

Up

Down

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 by  zbrantley (3) 1

Last change on Feb 25, 2010 10:46:50 AM by  Daniel Zobel [Paessler Support] (24,941) 3 3



1 Reply

Accepted Answer

Votes:

1

Your Vote:

Up

Down

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] (19,480) 3 1

Last change on Feb 25, 2010 10:46:12 AM by  Daniel Zobel [Paessler Support] (24,941) 3 3



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.

PRTG
Network Monitor
Intuitive to Use.
Easy to manage.

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

Visit
www.paessler.com

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