Gathering diagnostic tracing from a FlexNet inventory agent process on Unix-like operating systems
Overview
This article provides a quick cheat sheet illustrating an approach to gathering diagnostic tracing from a FlexNet inventory agent process running on a Unix-like operating system.
Diagnostic tracing may be helpful to gather when troubleshooting various types of problems that can occur in the agent.
Steps
Here is a set of Unix shell commands to enable FlexNet inventory agent tracing, run an agent process, and restore tracing configuration to its original state:
cp /opt/managesoft/etcp.trace /opt/managesoft/etcp.trace.orig​
sed -e 's/filename=.*/filename=\/tmp\/ndtrack-trace.log/g' -e 's/flush_freq=[0-9]\+/flush_freq=0/g' /opt/managesoft/etcp.trace.orig >/opt/managesoft/etcp.trace​
echo '+Inventory' >>/opt/managesoft/etcp.trace​
/opt/managesoft/bin/ndtrack -t Machine -o LogFile=/tmp/ndtrack-log.log -o DebugOracleEnv=true >/tmp/ndtrack-output.log 2>&1
cp /opt/managesoft/etcp.trace.orig /opt/managesoft/etcp.trace
In more detail, the above commands do the following things:
- Make a backup copy of the etcp.trace file that is used to configure/enable tracing.
- Update the filename and flush_freq settings in the etcp.trace file to appropriate values for troubleshooting. In this example, filename is updated so trace output will be saved to the file /tmp/ndtrack-trace.log.
- Append line(s) to the end of the etcp.trace file to enable the relevant trace class(es) for the functional areas to generate tracing for. In this example, the Inventory trace class is being enabled.
- Run the relevant command required for troubleshooting. In this example, and ndtrack command is executed. Stdout/stderr output generated is saved to the file /tmp/ndtrack-output.log. Logging is saved to /tmp/ndtrack-log.log. The DebugOracleEnv preference is enabled to gather some additional details about environment variables used when connecting to Oracle instances.
- Restore the original etcp.trace configuration file.
After these steps, in this example the following files will be generated containing information for further inspection in the troubleshooting process:
- /tmp/ndtrack-trace.log
- /tmp/ndtrack-output.log
- /tmp/ndtrack-log.log
- /var/tmp/fnms_oracle_debug_for_user_oracle.txt (this file may be relevant if troubleshooting issues related to gathering Oracle Database inventory)
Additional considerations
Trace files that are generated can be very large, depending on what trace classes are enabled and what traced processes do. If filesystem space is limited then you may need to watch out for these files filling up the filesystem. When sending trace files to somebody it is generally recommend to compress them - they will normally compress very well.
More Information
See the following pages for additional information about configuring and using diagnostic tracing with the FlexNet inventory agent: