<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:49:51 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-5251] lctl filter does not filter log messages</title>
                <link>https://jira.whamcloud.com/browse/LU-5251</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I&apos;m having trouble filtering the kernel debug logs.The manual says that the command &quot;lctl filter all_types&quot; should remove all lines from the output of the debug log, but it does not filter anything. &lt;/p&gt;

&lt;p&gt;For example, running the following on an MDS:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl filter all_types
Disabling output of type &quot;trace&quot;
Disabling output of type &quot;inode&quot;
Disabling output of type &quot;super&quot;
Disabling output of type &quot;ext2&quot;
Disabling output of type &quot;malloc&quot;
Disabling output of type &quot;cache&quot;
Disabling output of type &quot;info&quot;
Disabling output of type &quot;ioctl&quot;
Disabling output of type &quot;neterror&quot;
Disabling output of type &quot;net&quot;
Disabling output of type &quot;warning&quot;
Disabling output of type &quot;buffs&quot;
Disabling output of type &quot;other&quot;
Disabling output of type &quot;dentry&quot;
Disabling output of type &quot;nettrace&quot;
Disabling output of type &quot;page&quot;
Disabling output of type &quot;dlmtrace&quot;
Disabling output of type &quot;error&quot;
Disabling output of type &quot;emerg&quot;
Disabling output of type &quot;ha&quot;
Disabling output of type &quot;rpctrace&quot;
Disabling output of type &quot;vfstrace&quot;
Disabling output of type &quot;reada&quot;
Disabling output of type &quot;mmap&quot;
Disabling output of type &quot;config&quot;
Disabling output of type &quot;console&quot;
Disabling output of type &quot;quota&quot;
Disabling output of type &quot;sec&quot;
Disabling output of type &quot;lfsck&quot;
Disabling output of type &quot;hsm&quot;
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 3850 lines, 3850 kept, 0 dropped, 0 bad.
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 255 lines, 255 kept, 0 dropped, 0 bad.
# lctl get_param debug
debug=
super ioctl neterror warning dlmtrace error emerg ha rpctrace vfstrace config console lfsck
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some lines from the output should be dropped from the logs.&lt;/p&gt;

&lt;p&gt;Maybe just the &quot;all_types&quot; flag is broken, but specifying individual types does not work:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl filter vfstrace
Disabling output of type &quot;vfstrace&quot;
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 1743 lines, 1743 kept, 0 dropped, 0 bad.
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 66 lines, 66 kept, 0 dropped, 0 bad.
# lctl filter warning
Disabling output of type &quot;warning&quot;
# lctl filter ioctl
Disabling output of type &quot;ioctl&quot;
# lctl filter super
Disabling output of type &quot;super&quot;
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 765 lines, 765 kept, 0 dropped, 0 bad.
# lctl debug_kernel /tmp/log_lfsck_2
Debug log: 66 lines, 66 kept, 0 dropped, 0 bad.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;No messages are dropped from the log output.&lt;/p&gt;

&lt;p&gt;I tried using &quot;lctl debug_daemon start&quot; and lctl debug_daemon stop&quot; and &quot;lctl debug_file&quot; to output and filter the logs, but no lines were filtered:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl debug_daemon start /tmp/log_test1
# lctl filter all_types
Disabling output of type &quot;trace&quot;
Disabling output of type &quot;inode&quot;
...
# lctl show lfsck
Enabling output from subsystem &quot;lfsck&quot;
Enabling output of type &quot;lfsck&quot;
# lctl show trace
Enabling output of type &quot;trace&quot;
# lctl lfsck_start -M scratch-MDT0000 -type layout
Started LFSCK on the device scratch-MDT0000: scrub layout namespace
# lctl debug_daemon stop 
# lctl debug_file /tmp/log_test1 log_filtered
Debug log: 18532 lines, 18532 kept, 0 dropped, 0 bad.
[root@mds01 tmp]# lctl filter lfsck
Disabling output from subsystem &quot;lfsck&quot;
Disabling output of type &quot;lfsck&quot;
[root@mds01 tmp]# lctl debug_file /tmp/log_test1 log_filtered
Debug log: 18532 lines, 18532 kept, 0 dropped, 0 bad.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;No lines are dropped even though I know there are lfsck messages in the log file /tmp/log_test1.&lt;/p&gt;</description>
                <environment>OpenSFS cluster with Lustre 2.5.60 build #2535</environment>
        <key id="25295">LU-5251</key>
            <summary>lctl filter does not filter log messages</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="jamesanunez">James Nunez</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jun 2014 20:36:14 +0000</created>
                <updated>Mon, 31 Jan 2022 04:16:33 +0000</updated>
                                            <version>Lustre 2.6.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="87506" author="adilger" created="Wed, 25 Jun 2014 17:39:01 +0000"  >&lt;p&gt;I think this is just a usage problem, though possibly something that should be fixed in a way that makes lctl easier to use. The lctl command does not save the &quot;filter&quot; and &quot;show&quot; masks across lctl invocations. They are only really useful for interactive lctl use:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# lctl
lctl&amp;gt; filter all_types
lctl&amp;gt; show ldiskfs
lctl&amp;gt; df /tmp/debug /tmp/debug.txt
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;That said, this is not very convenient to use, and adding a &quot;&lt;tt&gt;&amp;#45;&amp;#45;filter&lt;/tt&gt;&quot; and &quot;&lt;tt&gt;&amp;#45;&amp;#45;show&lt;/tt&gt;&quot; options to &lt;tt&gt;debug_kernel&lt;/tt&gt; may be useful. &lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzwpuf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14648</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>