Configuring and Starting trace Data Collection

You can start trace from the command line or with a trcstart subroutine call. The trcstart subroutine is in the librts.a library.

The trace command configures the trace facility and starts data collection. The syntax of the trcstart subroutine is:

int trcstart(char *args)

where args is simply the options list desired that you would enter using the trace command if starting a system trace (channel 0). If starting a generic trace, include a -g option in the args string. On successful completion, trcstart returns the channel ID. For generic tracing this channel ID can be used to record to the private generic channel.

For an example of the trcstart routine, see Examples of Coding Events and Formatting Events.

When compiling a program using this subroutine, you must request the link to the librts.a library. Use -l rts as a compile option.