[ltt-dev] Make lttctl use new interface
Zhaolei
zhaolei at cn.fujitsu.com
Sun Nov 30 22:23:27 EST 2008
Mathieu Desnoyers ??:
> * Zhaolei (zhaolei at cn.fujitsu.com) wrote:
>> Hi, Mathieu
>>
>> I modified lttctl for support debugfs-based ltt-trace-control.
>>
>> This patch only modified interior method of control ltt trace,
>> so command args are not changed.
>>
>> We can use this code without modify our user-manual, and lttv need not change
>> too.
>>
>> But personaly, I'd like to design a set of new command arguments for lttctl in
>> next step, for support each-channel buffer and overwrite control.
>> And old cmd-args as -X, -V, -B, -z, -x, -v may be dropped(or change for easy
>> to remember)
>> For example:
>> -c Create a trace
>> -C Create a trace and start
>> -d Destroy trace channels
>> -D Stop and destroy trace channels
>> ...
>> or
>> -c Create a trace
>> -cs Create a trace and start
>> -d Destroy trace channels
>> -td Terminate and destroy trace channels
>> ...
>> But it we do, our unlucky users must read our new manual again : (
>> What is your opinion?
>>
>
> Your patch looks great :) But I'd go directly for a command-line
> breakage so we don't end up keeping legacy options. The sooner the
> better.
>
> I really like the -c, -C, -d, -D approach. Maybe we could have both of
> your suggestions supported as aliases ?
Hello, Mathieu
I consider about following options:
Basic options:
-c, --create tracename
Create a trace
-d, --destroy tracename
Destroy trace channels
-s, --start tracename
Start tracing
-t, --terminate tracename
Terminate tracing
-h, --help
Show help
Advanced options:
--type
Type of trace (ex. relay)
--ltt_root
LTT channels root path. (ex. /mnt/debugfs/ltt)
-o, --option
Set options, following operations are supported:
cpu.bufnum=
cpu.bufsize=
cpu.overwrite=
processes.bufnum=
processes.bufsize=
processes.overwrite=
interrupts.bufnum=
interrupts.bufsize=
interrupts.overwrite=
network.bufnum=
network.bufsize=
network.overwrite=
modules.bufnum=
modules.bufsize=
modules.overwrite=
metadata.bufnum=
metadata.bufsize=
Integration options:
-C, --create_start tracename
Create a trace and start
-D, --stop_destroy tracename
Stop and destroy trace channels
-A, --all_create tracename
All mode: Create trace, spawn a lttd daemon, start tracing.
(optionally, you can set LTT_DAEMON env. var.)
-H, --hybrid_finish
Stop tracing, dump flight recorder trace, destroy channels
-p, --path path
Path for write trace datas. (ex. /root/traces/example_trace)
For -A and -H options
-a, --append
Append to trace
For -A and -H options
-n, --dump_threads number
Number of lttd threads
For -A and -H options
For example, create and start a trace, set cpu channel's subbuf number to 4,
set network channel overwrite, and spawn a lttd daemon is:
lttctl -A trace1 -p /tmp/trace1 -o cpu.bufsize=4 -o network.overwrite=1
Option of -A(--all_create) looks some strange(not very exact), I'd like to
find a word means "Do all things for start a trace", do you have some suggestion?
And option of -H(--hybrid_finish) is not exact too, because I think we should
make it include meaning of both "finish a trace" and "hybrid", but -H only have
meaning of "hybrid".
What is your opinion about options above?
(Because my English is pool, modify of option's comment is also welcome)
>
> If we change this, we should also update the lttv QUICKSTART file
> accordingly.
Yes, lttv also needs little update.
B.R.
Zhaolei
>
> Mathieu
>
>
More information about the lttng-dev
mailing list