ctctrl subcommand

The ctctrl subcommand displays information related to Component Trace (CT).

Format

ctctrl [ [ -r ] | [ -D ] [ -j Event [, Event ] ] ] [ -l alias name] [ -c component name ] [ -t tid ] [ -v ]

Parameters

Item Description
-c component name Specifies a component by name.
-l alias name Specifies a component by alias.
-r Applies the query recursively to all children components.
-D Displays component trace buffer events of a specified component.
-j Event [, Event] Specifies a hook ID filter. A hook is identified by its hook ID in hexadecimal format. When the ctctrl subcommand is used to display buffer contents, this parameter displays events for the specified hook IDs. You must specify at least one event when you use the -j parameter. You can specify a maximum of 128 hooks. You can specify hook IDs as either three or four hexadecimal digits. Specifying three hexadecimal digits indicates a hook ID of the form 0xhhh0. Specifying four hexadecimal digits indicates a hook ID of the form 0xhhhh.
-t tid Thread ID filter. A thread is identified by its thread ID in hexadecimal format. When the ctctrl command is used to display buffer contents, this parameter is used to display only events related to the specified thread. Otherwise, this parameter is not valid.
-v Displays events using a verbose output format. This option is only valid when displaying trace events of a specified component.

By default, without any parameters, ctctrl displays the settings of the base components. Specific components can be specified with the -l parameter or the -c parameter. To display the trace entries, use the -D parameter. The format used is the same as that of the trace command.

The default trace entry output format is a simplified and short view of the trace record. To view trace entries in a more verbose format, use the -v parameter.

The display of trace entries are not supported in the kdb command on a live system because of synchronization problems (buffers continue to be filled when being read, buffer resize operation can occur, and so on). The kdb command can display trace entries when working on a dump. Moreover, in user space, the memory buffers can be read and examined with the ctctrl command or the trcrpt command.

Other

No aliases.

Examples

The following example displays the events in the net.route component with hook ID 0x617.

KDB(0)> ctctrl -D -c net.route -j 617

The following is the output of a ctctrl command with no arguments. The parameter information of all of the active base components is displayed:

(0)> ctctrl

Component Name: ethernet
Alias: No
Displaying rasp_trace_block at: F100010030247780
rtb_eyec............... 7472636252415361: (EYEC_RAST)
rtb_flags.............. E0: (Memory Trace: ON System Trace: ON)
rtb_memlevel_internal.. 1
rtb_syslevel_internal.. 7
rtb_bufbase............ F1000100305D9000
rtb_bufend............. F1000100305DB7C0
rtb_bufinptr........... F1000100305DA240
rtb_busize............. 10240
rtb_bufwrap_t0......... 0000AB21F43C988A
rtb_bufwrap_t1......... 0000AB2484710118

Component Name: netinet
Alias: No
Displaying rasp_trace_block at: F10001002D35FB00
rtb_eyec............... 7472636252415361: (EYEC_RAST)
rtb_flags.............. E0: (Memory Trace: ON System Trace: ON)
rtb_memlevel_internal.. 1
rtb_syslevel_internal.. 7
rtb_bufbase............ F10001002FE99000
rtb_bufend............. F10001002FE9B7C0
rtb_bufinptr........... F10001002FE99000
rtb_busize............. 10240
rtb_bufwrap_t0......... 0000000000000000
rtb_bufwrap_t1......... 000051E162562E9F

The following example displays the parameter information about the socket component and all of its subcomponents:

(0)> ctctrl -c socket -r

Component Name: socket
Alias: No
Displaying rasp_trace_block at: F10001002D432C80
rtb_eyec............... 7472636252415361: (EYEC_RAST)
rtb_flags.............. E0: (Memory Trace: ON System Trace: ON)
rtb_memlevel_internal.. 1
rtb_syslevel_internal.. 7
rtb_bufbase............ F10001002D646000
rtb_bufend............. F10001002D64FFC0
rtb_bufinptr........... F10001002D647D60
rtb_busize............. 40960
rtb_bufwrap_t0......... 0000A41C5E0A85CE
rtb_bufwrap_t1......... 0000AAEDA153D588

Component Name: socket.so_unix
Alias: No
Displaying rasp_trace_block at: F10001002D432E80
rtb_eyec............... 7472636252415361: (EYEC_RAST)
rtb_flags.............. E0: (Memory Trace: ON System Trace: ON)
rtb_memlevel_internal.. 1
rtb_syslevel_internal.. 7
rtb_bufbase............ F10001002D650000
rtb_bufend............. F10001002D6527C0
rtb_bufinptr........... F10001002D6517E0
rtb_busize............. 10240
rtb_bufwrap_t0......... 0000000000000000
rtb_bufwrap_t1......... 000051DDCBBE793F