aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/admin-guide/clearing-warn-once.rst
blob: 8d058bbc0859d020ded12072b1c919384c36af1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Clearing WARN_ONCE
------------------

WARN_ONCE / WARN_ON_ONCE / printk_once only emit a message once.

echo 1 > /sys/kernel/debug/clear_warn_once

clears the state and allows the warnings to print once again.
This can be useful after test suite runs to reproduce problems.

Values greater than one set a timer for a periodic state reset; e.g.

echo 60 > /sys/kernel/debug/clear_warn_once

will establish an hourly state reset, effectively turning WARN_ONCE
into a long period rate-limited warning.

Writing a value of zero (or one) will remove any previously set timer.