Aprobe Troubleshooting

From OC Systems Wiki!
Jump to: navigation, search

Running Aprobe with libdal.so and APO Files

You can link your program with libdal.so so that it will automatically load Aprobe, using parameters from an APO file, every time the application runs. See "Loading Probes Without Aprobe".

When you use libdal.so and APO files you must include the path $APROBE/lib in your library path environment variable (LIBPATH (AIX) or LD_LIBRARY_PATH (Linux)) using something like this:

export LIBPATH=$APROBE/lib:$LIBPATH

or this:

export LD_LIBRARY_PATH=$APROBE/lib:$LD_LIBRARY_PATH

Aprobe also includes a "stub" version of libdal.so which can be used to "turn off" Aprobe in the application that is linked with libdal.so. To do this, you will typically soft-link the $APROBE/lib/libdal.so.stub to a local directory and include that directory path in you library path (LIBPATH or LD_LIBRARY_PATH) using something like this:

ln -sf $APROBE/lib/libdal.so.stub ./libdal.so
export LIBPATH=`pwd`:$LIBPATH
export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH

If you run your application linked with libdal.so and you don't get any probes running or data logged to an APD file, then you may have a stub version of libdal.so in your library path. Check your library path (LIBPATH or LD_LIBRARY_PATH)) for files with the name "libdal.so" and verify that they come from the the $APROBE/lib directory in your Aprobe installation. You might also want to verify that size matches the size of libdal.so. If you find an "errant" libdal.so stub, you can either move that path segment from your library path or add the current path segment $APROBE/lib) to the head of library path like this:

export LIBPATH=$APROBE/lib:$LIBPATH

or

export LD_LIBRARY_PATH=$APROBE/lib:$LD_LIBRARY_PATH