This is a simple walk-through on using WAAE SDK [C++] to monitor/capture ALARM events, live.
What you need:
- WAAE 11.3.6 [preferably the latest, SP6] SDK installed on a Linux server (I have used SUSE Linux Enterprise Server 12 for this).
- libstdc++.so.6 32bit
# rpm -q --whatprovides /usr/lib/libstdc++.so.6.0.19
- GNU gcc-c++-4.8-6.189 or later. I have used the following version for this tutorial
# /usr/bin/g++ -v
gcc version 4.8.3 20140627 [gcc-4_8-branch revision 212064] (SUSE Linux)
- Last but not the least, loads of patience
I have attached a couple of C++ programs to this post (of course they are subject to the DISCLAIMER mentioned at bottom ). These programs are a skosh improvised versions of the original $AUTOSYS/code/get_auto_event.cpp and test_api.cpp programs shipped with the SDK install.
Download these programs and drop them under $AUTOSYS/code (backup the original get_auto_event.cpp before overwriting).
It's just a stroll from here...
Source the WAAE instance environment file and compile the programs
# source /opt/CA/WorkloadAutomationAE/autouser.SYB/autosys.bash.`hostname`
# cd $AUTOSYS/code
# /usr/bin/g++ -m32 -L$AUTOSYS/lib -las_sdk -ltx_api /usr/lib/libstdc++.so.6 get_auto_event.cpp get_alarms.cpp -o getAutoAlarms -std=gnu++11
If the compilation goes without errors, you will have created an executable getAutoAlarms in $AUTOSYS/code.
# file getAutoAlarms
getAutoAlarms: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 3.0.0, BuildID[sha1]=1eddd81d0e61363f57a8cd11a36eabd41fbae62c, not stripped
You are ready to execute the program, like so:
Happy coding (and debugging)!
The sample programs provided here are not supported under any CA Technologies standard support program or service. All programs are provided AS IS without warranty of any kind. CA Technologies further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample programs and documentation remains with you. In no event shall CA Technologies, its authors, or anyone else involved in the creation, production, or delivery of the programs be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample programs or documentation, even if CA Technologies has been advised of the possibility of such damages.