Cacti (home)ForumsDocumentation

Performance Monitor Query

type:
user_template_data
usertemplate:
typeperf
author:
bsod2600
version:
1.0
script:
Batch Script
description:
Queries single Windows performance counter
Cacti:
0.8.7e
date:
2010-01-28
includes:
yes
templates:
windows,
performance counter,
typeperf

Download

Requirements

  • Only works on Windows.
  • Cacti Scheduled Task User must have correct permissions for remote WMI queries.

Background

This script is merely a wrapper around the Microsoft tool typeperf which is designed to query a single performance counter at a time. Typeperf leverages WMI, which requires user authentication, correct permission levels and of course only works from Windows. In the case of Cacti, typeperf will be executed with the permissions of the Cacti Scheduled Task. The query format typeperf requires can be somewhat confusing to figure out. The link above lists all the nitty-gritty details. Some simple examples though are below:

Check your Total CPU usage:
C:\>typeperf "\processor(_Total)\% Processor Time"
Check your available memory in bytes:
C:\>typeperf "\memory\Available Bytes"

Another method to figuring out the correct format is to look how the Windows Performance Monitor (perfmon.msc) formats the counters you're interested in. After the counters have been added and successfully retrieving data, right click on the graph and select Properties. Click on the Data Tab. You now can copy down the paths which are used.

Sample images

Installation

  1. Documented in the included readme in the zip file.

Change Log

1.0: Initial release

Support

Use this forum post






Personal Tools