- Only works on Windows.
- Cacti Scheduled Task User must have correct permissions for remote WMI queries.
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.
- Documented in the included readme in the zip file.
1.0: Initial release
Use this forum post