Which WQL queries are used by PRTG's WMI sensors?

Votes:

0

Your Vote:

Up

Down

I'd like to verify an WMI error/value PRTG is reporting with the WMI Tester. Which fields and classes are used by PRTG for the various sensors?

troubleshooting wmi wql

Created on Sep 13, 2010 10:13:28 AM by  Volker Uffelmann [Paessler Support] (1,547) 2 3

Last change on Sep 13, 2010 1:13:38 PM by  Volker Uffelmann [Paessler Support] (1,547) 2 3



1 Reply

Accepted Answer

Votes:

0

Your Vote:

Up

Down

Here's a list of WQL queries for the following WMI sensors:

  • CPU Load
  • Event Log
  • File
  • Free Disk Space (Multi Drive)
  • Volume (was: Free Disk Space (Single Disk))
  • Memory
  • Network Card
  • Pagefile
  • Process
  • Service
  • Share
  • Uptime

Note: WHERE parameters in chevrons are to be replaced with your specific data, e.g. instead of WHERE name ='<servicename>' you'll have to use WHERE name = 'PRTG Server' if you want to inspect the Server service of PRTG.


CPU Load

Standard query

SELECT Name,Timestamp_Sys100NS, PercentProcessorTime FROM Win32_PerfRawData_PerfOS_Processor WHERE Name <> '_Total'

Alternative query

SELECT Name, PercentProcessorTime FROM Win32_PerfFormattedData_PerfOS_Processor WHERE Name <> '_Total'

Event Log

Note: The WMI Event Log sensor has a rather complex WHERE statement that is assembled according to the various filter inputs. For clarity we leave out this WHERE statement here. But be aware that querying the eventlog class unfiltered can take up considerable amounts of time! SELECT TimeGenerated,Message FROM Win32_NTLogEvent

File

SELECT Lastmodified,Filesize FROM CIM_LogicalFile WHERE Drive ='<driveletter>:' AND Path='<path>' AND Filename = '<filename>' AND Extension = '<ext>'

Free Disk Space (Multi Drive)

All drives

SELECT DriveType,DeviceID,FreeSpace,Size,VolumeName FROM Win32_LogicalDisk WHERE DriveType=3

Specific drive

SELECT DriveType,DeviceID,FreeSpace,Size,VolumeName FROM Win32_LogicalDisk WHERE DeviceID='<driveletter>:'

Volume (was: Free Disk Space (Single Disk))

"Add Sensor" pre-query

SELECT DeviceID, Name, Label, DriveType, FileSystem FROM Win32_Volume

Monitoring query

Select DeviceID, FreeSpace,Capacity FROM Win32_Volume WHERE DeviceID LIKE '<deviceid>'

Memory

Standard query

SELECT FreePhysicalMemory,TotalVisibleMemorySize FROM Win32_OperatingSystem

Alternative query

SELECT AvailableKBytes FROM Win32_PerfFormattedData_PerfOS_Memory and Select TotalPhysicalMemory FROM Win32_LogicalMemoryConfiguration

Network Card

"Add Sensor" pre-query for the names of the adapters

SELECT Name, BytesTotalPerSec FROM Win32_PerfRawData_Tcpip_NetworkInterface

"Add Sensor" pre-query for IPs/MACs of the adapters

SELECT IPAddress,MACAddress FROM Win32_NetworkAdapterConfiguration WHERE Description LIKE '<adaptername>' with <adaptername> being replaced with the name of one of the entries that were found with the name-query.

Monitoring query

SELECT BytesReceivedPersec,BytesSentPerSec,PacketsPerSec FROM Win32_PerfRawData_Tcpip_NetworkInterface WHERE Name = '<adaptername>' with <adaptername> being replaced with the name of one of the entries that were found with the name-query.

Pagefile

SELECT percentusage FROM Win32_PerfFormattedData_PerfOS_PagingFile WHERE Name='_Total'

Process

SELECT ThreadCount,HandleCount,PrivateBytes, WorkingSet,PercentProcessorTime, PageFaultsPerSec,Timestamp_Sys100NS,IDProcess FROM Win32_PerfRawData_PerfProc_Process WHERE Name ='<executablename>'

Service

"Add Sensor" pre-query

SELECT Name,Caption,Description FROM Win32_Service

Monitoring query

SELECT Started,State,Status FROM Win32_Service WHERE Name='<servicename>'

Share

"Add Sensor" pre-query

SELECT Name,Description,Type FROM Win32_Share

Monitoring query

SELECT Status FROM Win32_Share WHERE Name = '<sharename>'

Uptime

SELECT LastBootUpTime,LocalDateTime FROM Win32_OperatingSystem

Created on Sep 13, 2010 10:31:47 AM by  Volker Uffelmann [Paessler Support] (1,547) 2 3

Last change on Nov 17, 2011 3:24:31 PM by  Volker Uffelmann [Paessler Support] (1,547) 2 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