ustctl manpage: document get/set-sock-path
[ust.git] / doc / man / ustctl.1
CommitLineData
3af38436 1.\" generated with Ronn/v0.6.6
43550d37
JB
2.\" http://github.com/rtomayko/ronn/
3.
3af38436 4.TH "USTCTL" "1" "June 2010" "" ""
43550d37
JB
5.
6.SH "NAME"
3af38436 7\fBustctl\fR \- a program to control the tracing of userspace applications
43550d37
JB
8.
9.SH "SYNOPSIS"
3af38436 10\fBustctl\fR [\fIcommand\fR] [\fIPIDs\fR]\.\.\.
43550d37
JB
11.
12.SH "DESCRIPTION"
3af38436 13\fBustctl\fR is a program to control the tracing of userspace applications\. It can list markers, start the tracing, stop the tracing, enable/disable markers, etc\.
43550d37
JB
14.
15.SH "OPTIONS"
3af38436 16These programs follow the usual GNU command line syntax, with long options starting with two dashes(`\-\')\. A summary of options is included below\.
43550d37
JB
17.
18.TP
19\fB\-h\fR, \fB\-\-help\fR
3af38436 20Show summary of options\.
43550d37
JB
21.
22.TP
23\fB\-\-create\-trace\fR
3af38436 24Create trace\.
43550d37
JB
25.
26.TP
27\fB\-\-alloc\-trace\fR
3af38436 28Allocate trace\.
43550d37
JB
29.
30.TP
31\fB\-\-start\-trace\fR
3af38436 32Start tracing\.
43550d37
JB
33.
34.TP
35\fB\-\-stop\-trace\fR
3af38436 36Stop tracing\.
43550d37
JB
37.
38.TP
39\fB\-\-destroy\-trace\fR
3af38436 40Destroy the trace\.
43550d37
JB
41.
42.TP
43\fB\-\-set\-subbuf\-size\fR \fICHANNEL\fR/\fIbytes\fR
3af38436 44Set the size of subbuffers in CHANNEL\.
43550d37
JB
45.
46.TP
47\fB\-\-set\-subbuf\-num\fR \fICHANNEL\fR
3af38436
AH
48Set the number of subbuffers per buffer for CHANNEL\. Must be a power of 2\.
49.
50.TP
51\fB\-\-set\-sock\-path\fR
52Set the path of the daemon socket\.
43550d37
JB
53.
54.TP
55\fB\-\-get\-subbuf\-size\fR \fICHANNEL\fR
3af38436 56Print the size of subbuffers per buffer for CHANNEL\.
43550d37
JB
57.
58.TP
59\fB\-\-get\-subbuf\-num\fR \fICHANNEL\fR
3af38436
AH
60Print the number of subbuffers per buffer for CHANNEL\.
61.
62.TP
63\fB\-\-get\-sock\-path\fR
64Get the path of the daemon socket\.
43550d37
JB
65.
66.TP
67\fB\-\-enable\-marker\fR \fICHANNEL\fR/\fIMARKER\fR
3af38436 68Enable a marker\.
43550d37
JB
69.
70.TP
71\fB\-\-disable\-marker\fR \fICHANNEL\fR/\fIMARKER\fR
3af38436 72Disable a marker\.
43550d37
JB
73.
74.TP
75\fB\-\-list\-markers\fR
3af38436 76List the markers of the process, their state and format string\.
43550d37 77.
c3947c25 78.SH "LIFE CYCLE OF A TRACE"
3af38436 79Typically, the first step is to enable markers with \fB\-\-enable\-marker\fR\. An enabled marker generates an event when the control flow passes over it (assuming the trace is recording)\. A disabled marker produces nothing\. Enabling and disabling markers may however be done at any point, including while the trace is being recorded\.
c3947c25
PMF
80.
81.P
3af38436 82In order to record events, a trace is first created with \fB\-\-create\-trace\fR\. At this point, the subbuffer count and size may be changed with \fB\-\-set\-subbuf\-num\fR and \fB\-\-set\-subbuf\-size\fR\.
c3947c25
PMF
83.
84.P
3af38436 85Afterward, the trace may be allocated with \fB\-\-alloc\-trace\fR\. This allocates the buffers in memory, so once this is done, the subbuffer size and count can not be changed\. Trace allocation also causes the daemon to connect to the trace buffers and wait for data to arrive\. Explicit allocation is optional, as it is done automatically at trace start\.
c3947c25
PMF
86.
87.P
3af38436 88The trace may then be started with \fB\-\-start\-trace\fR\. This results in events being recorded in the buffer\. The daemon automatically collects these events\.
c3947c25
PMF
89.
90.P
3af38436 91The trace may be stopped with \fB\-\-stop\-trace\fR, either definitely after all the wanted information is collected, or temporarily, before being started again with \fB\-\-start\-trace\fR\. This results in effectively \"pausing\" the recording\.
c3947c25
PMF
92.
93.P
3af38436 94Finally, when \fB\-\-destroy\-trace\fR is used, the trace buffers are unallocated\. However, the memory may not be effectively freed until the daemon finishes to collect them\.
c3947c25
PMF
95.
96.SH "STRUCTURE OF A TRACE"
3af38436 97Each instrumentation point that is added in a program is associated to a channel\.
c3947c25
PMF
98.
99.P
3af38436 100Trace events are put in buffers\. There is one buffer per channel, per cpu\. For example, on a system with 4 cores and tracing an application with 3 channels, there will be 12 buffers in total\. The content of each of these buffers is put in a distinct file in the trace directory\. For example, the \fBmetadata_2\fR file contains the data that was extracted from the buffer that contained the events from the metadata channel and having occurred on cpu 2\.
c3947c25
PMF
101.
102.P
3af38436 103In memory, each buffer is divided in subbuffers\. Subbuffers are equally\-sized, contiguous parts of a buffer\. The size of a buffer is equal to the number of subbuffers it contains times the size of each subbuffer\. When a subbuffer is full, it is collected by the daemon while the others are filled\. If, however, the buffer size is too small, buffer overflows may occur and result in event loss\. By default, the number of subbuffers per buffer is 2\. Subbuffer size for a given channel may be chosen with \fB\-\-set\-subbuf\-size\fR while the subbuffer count is set with \fB\-\-set\-subbuf\-num\fR\.
c3947c25
PMF
104.
105.SH "SEE ALSO"
106usttrace(1), ustd(1)
107.
43550d37 108.SH "AUTHOR"
3af38436 109\fBustctl\fR was written by Pierre\-Marc Fournier\.
43550d37
JB
110.
111.P
3af38436 112This manual page was written by Jon Bernard <jbernard@debian\.org>, for the Debian project (and may be used by others)\. It was updated by Pierre\-Marc Fournier\.
This page took 0.02748 seconds and 4 git commands to generate.