The ASL_Trace Model object is used to start and stop a trace from dmctl, the Java API, bootstrap.conf, and ASL. The ASL_Trace model object contains three methods.
-
start() method starts the tracing
-
stop() method stops the tracing
-
isActive() method checks to see if a trace is in progress
interface ASL_Trace start() stop() isActive()
The trace contains timestamps for:
-
Entry into ASL scripts
-
Exit to ASL scripts
-
Exit from ASL scripts
For example, to use the tracing capability from dmctl:
-
Create an instance of the Model object. An instance named ASL-Trace is customary.
dmctl –s serverName create ASL_Trace::ASL-Trace
-
Invoke start/stop/isActive as needed.
dmctl –s serverName invoke ASL_Trace::ASL-Trace start dmctl –s serverName invoke ASL_Trace::ASL-Trace stop
The output will appear similar to the following:
1 2009/02/26 13:26:15.175714600 1 000:00:00.000000000 NoteASLThread ThreadName=adapter 1 2009/02/26 13:26:15.175714600 2 000:00:00.000000000 NoteLayout Record prefix fields: 1 2009/02/26 13:26:15.175714600 3 000:00:00.000000000 NoteLayout Thread id, Date, Time, Seq, 1 2009/02/26 13:26:15.175714600 4 000:00:00.000000000 NoteLayout Delta since prior record in thread, 1 2009/02/26 13:26:15.175714600 5 000:00:00.000000000 NoteLayout RecordType. 1 2009/02/26 13:26:15.175714600 6 000:00:00.000000000 NoteLayout Trace records continue with: 1 2009/02/26 13:26:15.175714600 7 000:00:00.000000000 NoteLayout Entry|Exit|StopExit|ThrowExit|ThrowExit1|ThrowExit2, 1 2009/02/26 13:26:15.175714600 8 000:00:00.000000000 NoteLayout Constructor|Destructor|Initialize|Multiplex, 1 2009/02/26 13:26:15.175714600 9 000:00:00.000000000 NoteLayout this for ASL_Parser, Nest depth, Rule file name. 1 2009/02/26 13:26:15.175714600 10 000:00:00.000000000 StartTrace 1 2009/02/26 13:26:15.186840900 11 000:00:00.011126300 NoteDriver CreationClassName=GA_Driver Name=ASL-Trace1-Driver 1 2009/02/26 13:26:15.187012400 12 000:00:00.000171500 Trace Entry Constructor 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:15.187184600 13 000:00:00.000172200 Trace Exit Constructor 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:15.187535500 14 000:00:00.000350900 Trace Entry Initialize 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:15.187703000 15 000:00:00.000167500 Trace Exit Initialize 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:15.188291200 16 000:00:00.000588200 Trace Entry Destructor 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:15.188457500 17 000:00:00.000166300 Trace Exit Destructor 00000001002CA120 0 tasl_trace1.asl 1 2009/02/26 13:26:45.193438300 18 000:00:30.004980800 StopTrace
The log file is written to BASEDIR/smarts/local/logs as <serverName>.ASL_Trace.log.
-
-
If the BASEDIR/smarts/local/logs directory cannot be found, the log is written to the current working directory.
-
If the <serverName> is not available, the file name becomes ASL_Trace.log_<pid>.
The trace is written chronologically. Thus, traffic for several threads may be intermingled. A sort of the first 4 fields will produce traces for individual threads.
The record layout is noted when the trace is started. The prolog of each record is fixed. After that, each record contains a record type to provide summary program processing.
The ‘this’ pointer is logged, and can be used when tying the ASL trace to pstack samples.
Startup is automatic if the SM_ASL_TRACE environment variable is set to anything that does not lower case to 0, false, no, or off.