Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
on
05-31-2023
07:20 PM
- edited on
05-31-2023
07:30 PM
by
Claudia.Landiva
This article describes an issue where the Machine Agent on Windows OS shows gaps on the Controller, presents the likely cause, and provides steps for troubleshooting as well as two test scripts. The scripts can be found below the text portion of this article.
By default, the Machine Agent invokes collector scripts to gather hardware stats once every 30 seconds (this limit can be increased to a maximum of 60 seconds). At the end of every minute, the Machine Agent aggregates the data received and publishes it to the Controller. Hence, the Controller expects data every minute, and if not received, it will show a gap for that respective minute.
The Machine Agent uses open source OSHI libraries and collector scripts to gather hardware statistics. CPU, Memory and Process statistics are collected via OSHI libraries, and the rest of the metrics are gathered via collector script. The collector script Machine Agent executes on Windows OS is sim-collector.vbs (added to this article as an attachment). The collector scripts get the data directly via Windows WMI calls and OSHI, as well relying internally on similar Windows WMI java APIs to get the data. This Machine Agent functionality is also applicable for Windows OS.
The administrator observes intermittent gaps from a Machine Agent installed on Windows OS. This can happen across single or multiple servers.
Gaps appear as follows:
We created collect-sample.vbs to mimic the functionality of the Machine Agent.
NOTE | You can find the collect-sample.vbs and sim-collector.vbs scripts below the text of this article, just above and to the left of the comment buttons.
objFile.WriteLine("Script Start Time")
objFile.WriteLine(Now())
Set WshShellExec = objShell.Exec("cscript sim-collector.vbs")
Function runCollector()
Wscript.Echo "runCollector start", Now()
Explanation of the collector script’s sample output :
SCRIPT |
LINES CAPTURED |
collect-sample.vbs |
Script Start Time |
sim-collector.vbs |
Microsoft (R) Windows Script Host Version 5.8 |
The expected difference in the two timestamps described above should be a few seconds—ideally less than 5 - 10 seconds— since it is just a timestamp print operation happening on both sides, and no other operations that would consume more time are taking place between them.
Script Start Time
2023-05-17 12:39:01 PM
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
runCollector start 2023-05-17 12:43:31 PM
The gap in the snippet above shows that the script is getting stuck during this time, and that something on the OS is blocking the sim-collector.vbs script invoked by collect-sample.vbs.
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form