Instrumentation programs which use the HP Operations agent APIs
must be developed on a system with an HP Operations agent
installed, so that the HPOM shared libraries and
opcapi.h
header files are both available.
Examples of how to use the API functions from C, Java, and VB Script are available in the following folder on the management server:
%OvInstallDir%\examples\OVOW\DevelopmentKit\Agent
Platforms that support multi-threaded environments, for example
DCE, must also supply reentrant system calls that work in this
environment. Some platforms only supply reentrant libraries which
also work for single-threaded applications. Some have separate
libraries-a standard library and a reentrant library; for example,
libc
and libc_r
, or
libsocket
and libsocket_r
.
On platforms with two sets of libraries, it is important to link
the application using the standard library to the crt0
object file, and the reentrant library using the
crt0_r
object file. crt0
and
crt0_r
contain code that is executed before
main()
and is responsible for setting up or
initializing the environment before calling any of the library
APIs. Mixing reentrant and non-reentrant crt0
and
libraries is not allowed.
The HP Operations agent for DCE is a multi-threaded application
and thus requires and uses reentrant libraries. Consequently, the
HPOM library libopc_r
is using reentrant calls from
various libraries. To use the APIs in the HPOM library, they must
be linked correctly. Applications that use the DCE HPOM library
must be linked as a multi-threaded application; see below for
details for each managed node platform.
Platform
|
Library
|
Link options
|
---|---|---|
Windows |
%OvAgentDir%\lib\opcapi.lib
|
Add library path
$(OvAgentDir)\lib and library module
opcapi.lib to the Microsoft Visual Studio project
file. |
HPUX PA |
/opt/OV/lib/libopc_r.sl
|
-L/opt/OV/lib -lopc_r
-lnsp
|
HPUX IA |
/opt/OV/lib/hpux32/libopc_r.so
|
-L/opt/OV/lib/hpux32
-lopc_r -lnsp
|
Linux |
/opt/OV/lib/libopc_r.so
|
-L/opt/OV/lib -lopc_r
-lnsp
|
Solaris |
/opt/OV/lib/libopc_r.so
|
-L/opt/OV/lib -lopc_r
-lnsp
|
Tru64 |
/opt/OV/lib/libopc_r.sl
|
-L/opt/OV/lib -lopc_r
-lnsp
|
Operating system | Libraries | |
---|---|---|
Windows 1 2 |
32 bit |
%OvInstallDir%\bin\opcapi.dll
|
64 bit |
%OvInstallDir%\bin\win64\opcapi.dll
%OvInstallDir%\bin\win64\libopc.dll |
|
HPUX PA 3 |
|
|
HPUX IA 3 |
/opt/OV/lib/hpux32/libopc_r.so
|
|
Linux 2 3 |
32 bit |
/opt/OV/lib/libopc_r.so
|
64 bit |
/opt/OV/lib64/libopc_r.so
|
|
Solaris 3 |
/opt/OV/lib/libopc_r.so
|
|
Tru64 3 |
/opt/OV/lib/libopc_r.sl
|
|
AIX 3 |
/usr/lpp/OV/lib/libopc_r.a
|
1 On Windows operating
systems, libopc.dll
is the agent library, and
opcapi.dll
is the agent API library.
2 On operating systems for which the agent provides both 64 bit and 32 bit libraries, link the appropriate libraries for your program (for example, link the 32 bit libraries to a 32 bit program, even if the program runs on a 64 bit operating system).
3 On UNIX and Linux operating systems, you must also link the HP BTO Software shared libraries, which are in the same directory as the HTTPS agent library.
To use the HTTPS agent APIs on UNIX and Linux operating systems, you must also link the following shared libraries.
Operating system | Libraries | |
---|---|---|
HPUX PA Tru64 |
|
|
HPUX IA |
/opt/OV/lib/libOvBbc.so
|
|
Linux |
32 bit |
/opt/OV/lib/libOvBbc.so
|
64 bit |
|
|
AIX |
|