<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Inliniac &#187; debug</title>
	<atom:link href="http://www.inliniac.net/blog/tag/debug/feed" rel="self" type="application/rss+xml" />
	<link>http://www.inliniac.net/blog</link>
	<description>Everything inline.</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:38:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Suricata debugging</title>
		<link>http://www.inliniac.net/blog/2010/01/04/suricata-debugging.html</link>
		<comments>http://www.inliniac.net/blog/2010/01/04/suricata-debugging.html#comments</comments>
		<pubDate>Mon, 04 Jan 2010 14:51:54 +0000</pubDate>
		<dc:creator>Victor Julien</dc:creator>
				<category><![CDATA[Suricata]]></category>
		<category><![CDATA[oisf]]></category>
		<category><![CDATA[debug]]></category>

		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=314</guid>
		<description><![CDATA[If you&#8217;re running into issues with Suricata, it may be worth spending some time looking at the debugging options. To enable the debugging code, pass &#8220;&#8211;enable-debug&#8221; to configure. ./configure &#8211;enable-debug And make &#38; make install again. Make sure that during compilation you see -DDEBUG in the gcc commands. Then to really enable it at runtime, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re running into issues with Suricata, it may be worth spending some time looking at the debugging options.</p>
<p>To enable the debugging code, pass &#8220;&#8211;enable-debug&#8221; to configure.</p>
<blockquote><p>./configure &#8211;enable-debug</p></blockquote>
<p>And make &amp; make install again. Make sure that during compilation you see -DDEBUG in the gcc commands.</p>
<p>Then to really enable it at runtime, pass the SC_LOG_LEVEL</p>
<blockquote><p>SC_LOG_LEVEL=Debug</p></blockquote>
<p>Depending on how you run the engine, this will output massive amounts of debugging info. Thats why we added a pcre regex filter option.</p>
<blockquote><p>SC_LOG_OP_FILTER=regex</p></blockquote>
<p>The regex currently is case sensitive. It will be matched against the full debug line. For example if you want to want to see only output related to the HTP module do something like:</p>
<blockquote><p>SC_LOG_LEVEL=Debug SC_LOG_OP_FILTER=&#8221;htp&#8221; suricata -c suricata.yaml -r /path/to/file.pcap</p></blockquote>
<p>Or maybe you want the stream messages as well:</p>
<blockquote><p>SC_LOG_LEVEL=Debug SC_LOG_OP_FILTER=&#8221;(htp|stream)&#8221; suricata -c suricata.yaml -r /path/to/file.pcap</p></blockquote>
<p>You can also control the logging format by passing the SC_LOG_FORMAT environment variable. By default it&#8217;s set to &#8220;[%i] %t &#8211; (%f:%l) &lt;%d&gt; (%n) &#8212; &#8220;.</p>
<p>The following format specifiers are available:</p>
<blockquote><p>
t timestamp<br />
p process id (pid)<br />
i thread id<br />
m thread module name<br />
d log level<br />
f filename<br />
l line number<br />
n function name
</p></blockquote>
<p>Example:</p>
<blockquote><p>SC_LOG_FORMAT=&#8221;[%i] %t &#8211; (%f:%l) &lt;%d&gt; (%n) &#8212; &#8220;</p></blockquote>
<p>Putting it all together:</p>
<blockquote><p>SC_LOG_LEVEL=Debug SC_LOG_FORMAT=&#8221;[%i] %t &#8211; (%f:%l) &lt;%d&gt; (%n) &#8212; &#8221; SC_LOG_OP_FILTER=&#8221;(htp|stream)&#8221; suricata -c suricata.yaml -r /path/to/file.pcap</p></blockquote>
<p>If you have any questions or suggestions, let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.inliniac.net/blog/2010/01/04/suricata-debugging.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
