Usage

<< Click to Display Table of Contents >>

Navigation:  Monitoring Tools > perfquery >

Usage

Command Line Parameters

 

perfquery /n:<count> /l /m <query path | oid>

 

<query path>

Performance counter to read, e.g. "Processor(_Total)\% Processor Time"

/n:<count>

Repeat query <count> times

/l

Loop indefinitely

/i:<seconds>

When looping, sleep <milliseconds> between iterations, default is 500ms

/m

Minimal output, only show counter value

/s

Query SNMP instead of a local performance counter

/f

Display values as floating point (windows performance counters only)

/host:<remote host>

Host name to send SNMP GET request to

/instance:<instance>

When returning table data through SNMP, specify the OID which describes each instance

/u:<community | user>

SNMP v1/v2c community name or SNMP v3 user name

/a:<MD5 or SHA>

SNMP v3 authentication algorithm

/passauth:<password>

SNMP v3 authentication password

/c:<DES | 3DES | AES>

SNMP v3 encryption algorithm

/passcrypto:<password>

SNMP v3 encryption password

 

 

Examples

 

Example 1: Query performance counter "Processor(_Total)\% Processor Time" 5 times with regular output:

 

perfquery.exe "Processor(_Total)\% Processor Time" /n:5

 

Processor(_Total)\% Processor Time: [_Total] now=8, min=0, max=8, avg=7.61

Processor(_Total)\% Processor Time: [_Total] now=1, min=1, max=1, avg=4.45

Processor(_Total)\% Processor Time: [_Total] now=1, min=1, max=1, avg=3.46

Processor(_Total)\% Processor Time: [_Total] now=8, min=1, max=8, avg=4.61

Processor(_Total)\% Processor Time: [_Total] now=1, min=1, max=8, avg=3.95

 

Summary

=======

Iterations: 5

Duration: 3 seconds

 

Processor(_Total)\% Processor Time: [_Total] min=1, max=8, avg=3.95

 

Example 2: Query CPU usage from SNMP host 192.168.10.1 with SNMP community "secret" 5 times, wait 250ms between each query

 

perfquery.exe /s /host:192.168.10.1 /u:secret "1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0" /n:5 /i:250

 

1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0: now=1, min=0, max=1, avg=1.00

1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0: now=0, min=0, max=0, avg=0.67

1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0: now=0, min=0, max=0, avg=0.50

1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0: now=0, min=0, max=0, avg=0.40

1.3.6.1.4.1.2021.11.9.0+1.3.6.1.4.1.2021.11.10.0: now=0, min=0, max=0, avg=0.33