[Drbd-dev] How to use dynamic tracing

Philipp Reisner philipp.reisner at linbit.com
Thu Mar 12 11:41:23 CET 2009


On Wednesday 04 March 2009 20:08:51 Guo, Weiping (Jim) wrote:
> Hi All,
>
> I am new to drbd development. Just want to get my foot wet.
>
> One thing I would to do is turn on the tracing so that I may have a
> quicker way to understand drbd. I defined "ENABLE_DYNAMIC_TRACE" in the
> configuration file, but not sure how to use it.
>
> Any documents or suggestions are appreciated!
>

enum {
	TraceLvlAlways = 0,
	TraceLvlSummary,
	TraceLvlMetrics,
	TraceLvlAll,
	TraceLvlMax
};

enum {
	TraceTypePacket = 0x00000001,
	TraceTypeRq	= 0x00000002,
	TraceTypeUuid	= 0x00000004,
	TraceTypeResync = 0x00000008,
	TraceTypeEE	= 0x00000010,
	TraceTypeUnplug = 0x00000020,
	TraceTypeNl	= 0x00000040,
	TraceTypeALExts = 0x00000080,
	TraceTypeIntRq  = 0x00000100,
	TraceTypeMDIO   = 0x00000200,
	TraceTypeEpochs = 0x00000400,
};

echo 1 > /sys/module/drbd/parameters/trace_devs # Bitmask
echo 3 > /sys/module/drbd/parameters/trace_level
echo 4 > /sys/module/drbd/parameters/trace_type

Enables UUID traceing with full verbosity for /dev/drbd0.


-Phil
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.




More information about the drbd-dev mailing list