PROGRAM: C_SDK_example.cpp
SOLE PROPERTY OF APPDYNAMICS, INC. ALL RIGHTS RESERVED.
This program is soley for instructional use. Its purpose is only to indicate how one "might" mplement the C SDK Agent calls. This software will not be supported by AppDynnamics nor isnthere any guarantee, implied or otherwise, that it will work. Use at your own risk.
- The build files (gradle, VC++) expect the appdynamics sdk to unpacked into extlibs, i.e.,
extlibs/appdynamics-sdk-native
- Edit
src/main/cpp/C_SDK_Example.c
and modify cfg structure to reflect your controller connection parameters. Starts around line 94. - Build Executable
- gradle:
- run
gradle wrapper
- run
gradlew build
- run
- VC++:
- open
C-SDK-Example.sln
in Visual Studio - build solution
- gradle:
cd extlibs/appdynamics-sdk-native
- run
chmod 777 logs
- run
./install.sh
- open extlibs\appdynamics-sdk-native in finder
- double-click
install.bat
- cd extlibs/appdynamics-sdk-native
- run
nohup ./runSDKProxy.sh 1>logs/proxy.out 2>&1 &
or, better yet, run ./runSDKProxy.sh in the foreground in it's own terminal window. - run
LD_LIBRARY_PATH=`pwd`/extlibs/appdynamics-sdk-native/sdk-lib/lib ./build/exe/main/debug/C_SDK_Example
- Navigate to extlibs/appdyamics-sdk-native/proxy in file manager
- double click proxy.cmd
- Run in VC++
NOTE: The example requires ports 10101,10102,10103 to be open for localhost in the firewall.
Included in the code are two variables that can change the behavior of the example:
- loop_cnt_total: This controls the number of BTs produced in a single run.
- error_rate_pct: This controller the percentage of the BTs that are registered as an error.
The gradle build should also work on windows with VC++ < 2015. Gradle has not yet added support for Visual Studio 2015