[sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget1/translations/zh_CN/trace/rv/runtime-verificationmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/zh_TW/trace/rv/runtime-verificationmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/it_IT/trace/rv/runtime-verificationmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ja_JP/trace/rv/runtime-verificationmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ko_KR/trace/rv/runtime-verificationmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/sp_SP/trace/rv/runtime-verificationmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hRuntime Verificationh]hRuntime Verification}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhK/var/lib/git/docbuild/linux/Documentation/trace/rv/runtime-verification.rsthKubh paragraph)}(hRuntime Verification (RV) is a lightweight (yet rigorous) method that complements classical exhaustive verification techniques (such as *model checking* and *theorem proving*) with a more practical approach for complex systems.h](hRuntime Verification (RV) is a lightweight (yet rigorous) method that complements classical exhaustive verification techniques (such as }(hhhhhNhNubhemphasis)}(h*model checking*h]hmodel checking}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh and }(hhhhhNhNubh)}(h*theorem proving*h]htheorem proving}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh5) with a more practical approach for complex systems.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hInstead of relying on a fine-grained model of a system (e.g., a re-implementation at instruction level), RV works by analyzing the trace of the system's actual execution, comparing it against a formal specification of the system behavior.h]hInstead of relying on a fine-grained model of a system (e.g., a re-implementation at instruction level), RV works by analyzing the trace of the system’s actual execution, comparing it against a formal specification of the system behavior.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXThe main advantage is that RV can give precise information on the runtime behavior of the monitored system, without the pitfalls of developing models that require a re-implementation of the entire system in a modeling language. Moreover, given an efficient monitoring method, it is possible to execute an *online* verification of a system, enabling the *reaction* for unexpected events, avoiding, for example, the propagation of a failure on safety-critical systems.h](hX1The main advantage is that RV can give precise information on the runtime behavior of the monitored system, without the pitfalls of developing models that require a re-implementation of the entire system in a modeling language. Moreover, given an efficient monitoring method, it is possible to execute an }(hhhhhNhNubh)}(h*online*h]honline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh( verification of a system, enabling the }(hhhhhNhNubh)}(h *reaction*h]hreaction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubhg for unexpected events, avoiding, for example, the propagation of a failure on safety-critical systems.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hRuntime Monitors and Reactorsh]hRuntime Monitors and Reactors}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhKubh)}(hA monitor is the central part of the runtime verification of a system. The monitor stands in between the formal specification of the desired (or undesired) behavior, and the trace of the actual system.h]hA monitor is the central part of the runtime verification of a system. The monitor stands in between the formal specification of the desired (or undesired) behavior, and the trace of the actual system.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj-hhubh)}(hXNIn Linux terms, the runtime verification monitors are encapsulated inside the *RV monitor* abstraction. A *RV monitor* includes a reference model of the system, a set of instances of the monitor (per-cpu monitor, per-task monitor, and so on), and the helper functions that glue the monitor to the system via trace, as depicted below::h](hNIn Linux terms, the runtime verification monitors are encapsulated inside the }(hjLhhhNhNubh)}(h *RV monitor*h]h RV monitor}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubh abstraction. A }(hjLhhhNhNubh)}(h *RV monitor*h]h RV monitor}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLubh includes a reference model of the system, a set of instances of the monitor (per-cpu monitor, per-task monitor, and so on), and the helper functions that glue the monitor to the system via trace, as depicted below:}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj-hhubh literal_block)}(hX<Linux +---- RV Monitor ----------------------------------+ Formal Realm | | Realm +-------------------+ +----------------+ +-----------------+ | Linux kernel | | Monitor | | Reference | | Tracing | -> | Instance(s) | <- | Model | | (instrumentation) | | (verification) | | (specification) | +-------------------+ +----------------+ +-----------------+ | | | | V | | +----------+ | | | Reaction | | | +--+--+--+-+ | | | | | | | | | +-> trace output ? | +------------------------|--|----------------------+ | +----> panic ? +-------> h]hX<Linux +---- RV Monitor ----------------------------------+ Formal Realm | | Realm +-------------------+ +----------------+ +-----------------+ | Linux kernel | | Monitor | | Reference | | Tracing | -> | Instance(s) | <- | Model | | (instrumentation) | | (verification) | | (specification) | +-------------------+ +----------------+ +-----------------+ | | | | V | | +----------+ | | | Reaction | | | +--+--+--+-+ | | | | | | | | | +-> trace output ? | +------------------------|--|----------------------+ | +----> panic ? +-------> }hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j~hhhK$hj-hhubh)}(hX*In addition to the verification and monitoring of the system, a monitor can react to an unexpected event. The forms of reaction can vary from logging the event occurrence to the enforcement of the correct behavior to the extreme action of taking a system down to avoid the propagation of a failure.h]hX*In addition to the verification and monitoring of the system, a monitor can react to an unexpected event. The forms of reaction can vary from logging the event occurrence to the enforcement of the correct behavior to the extreme action of taking a system down to avoid the propagation of a failure.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hj-hhubh)}(hX In Linux terms, a *reactor* is an reaction method available for *RV monitors*. By default, all monitors should provide a trace output of their actions, which is already a reaction. In addition, other reactions will be available so the user can enable them as needed.h](hIn Linux terms, a }(hjhhhNhNubh)}(h *reactor*h]hreactor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh% is an reaction method available for }(hjhhhNhNubh)}(h *RV monitors*h]h RV monitors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh. By default, all monitors should provide a trace output of their actions, which is already a reaction. In addition, other reactions will be available so the user can enable them as needed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK;hj-hhubh)}(h]For further information about the principles of runtime verification and RV applied to Linux:h]h]For further information about the principles of runtime verification and RV applied to Linux:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj-hhubh block_quote)}(hXBartocci, Ezio, et al. *Introduction to runtime verification.* In: Lectures on Runtime Verification. Springer, Cham, 2018. p. 1-33. Falcone, Ylies, et al. *A taxonomy for classifying runtime verification tools.* In: International Conference on Runtime Verification. Springer, Cham, 2018. p. 241-262. De Oliveira, Daniel Bristot. *Automata-based formal analysis and verification of the real-time Linux kernel.* Ph.D. Thesis, 2020. h](h)}(hBartocci, Ezio, et al. *Introduction to runtime verification.* In: Lectures on Runtime Verification. Springer, Cham, 2018. p. 1-33.h](hBartocci, Ezio, et al. }(hjhhhNhNubh)}(h'*Introduction to runtime verification.*h]h%Introduction to runtime verification.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhE In: Lectures on Runtime Verification. Springer, Cham, 2018. p. 1-33.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjubh)}(hFalcone, Ylies, et al. *A taxonomy for classifying runtime verification tools.* In: International Conference on Runtime Verification. Springer, Cham, 2018. p. 241-262.h](hFalcone, Ylies, et al. }(hjhhhNhNubh)}(h8*A taxonomy for classifying runtime verification tools.*h]h6A taxonomy for classifying runtime verification tools.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhX In: International Conference on Runtime Verification. Springer, Cham, 2018. p. 241-262.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKFhjubh)}(hDe Oliveira, Daniel Bristot. *Automata-based formal analysis and verification of the real-time Linux kernel.* Ph.D. Thesis, 2020.h](hDe Oliveira, Daniel Bristot. }(hj$hhhNhNubh)}(hP*Automata-based formal analysis and verification of the real-time Linux kernel.*h]hNAutomata-based formal analysis and verification of the real-time Linux kernel.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$ubh Ph.D. Thesis, 2020.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKJhjubeh}(h]h ]h"]h$]h&]uh1jhhhKChj-hhubeh}(h]runtime-monitors-and-reactorsah ]h"]runtime monitors and reactorsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOnline RV monitorsh]hOnline RV monitors}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhhhhhKNubh)}(hXMonitors can be classified as *offline* and *online* monitors. *Offline* monitor process the traces generated by a system after the events, generally by reading the trace execution from a permanent storage system. *Online* monitors process the trace during the execution of the system. Online monitors are said to be *synchronous* if the processing of an event is attached to the system execution, blocking the system during the event monitoring. On the other hand, an *asynchronous* monitor has its execution detached from the system. Each type of monitor has a set of advantages. For example, *offline* monitors can be executed on different machines but require operations to save the log to a file. In contrast, *synchronous online* method can react at the exact moment a violation occurs.h](hMonitors can be classified as }(hjchhhNhNubh)}(h *offline*h]hoffline}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh and }(hjchhhNhNubh)}(h*online*h]honline}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh monitors. }(hjchhhNhNubh)}(h *Offline*h]hOffline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh monitor process the traces generated by a system after the events, generally by reading the trace execution from a permanent storage system. }(hjchhhNhNubh)}(h*Online*h]hOnline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh_ monitors process the trace during the execution of the system. Online monitors are said to be }(hjchhhNhNubh)}(h *synchronous*h]h synchronous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh if the processing of an event is attached to the system execution, blocking the system during the event monitoring. On the other hand, an }(hjchhhNhNubh)}(h*asynchronous*h]h asynchronous}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubhp monitor has its execution detached from the system. Each type of monitor has a set of advantages. For example, }(hjchhhNhNubh)}(h *offline*h]hoffline}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubho monitors can be executed on different machines but require operations to save the log to a file. In contrast, }(hjchhhNhNubh)}(h*synchronous online*h]hsynchronous online}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjcubh9 method can react at the exact moment a violation occurs.}(hjchhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKPhjRhhubh)}(hXAnother important aspect regarding monitors is the overhead associated with the event analysis. If the system generates events at a frequency higher than the monitor's ability to process them in the same system, only the *offline* methods are viable. On the other hand, if the tracing of the events incurs on higher overhead than the simple handling of an event by a monitor, then a *synchronous online* monitors will incur on lower overhead.h](hAnother important aspect regarding monitors is the overhead associated with the event analysis. If the system generates events at a frequency higher than the monitor’s ability to process them in the same system, only the }(hjhhhNhNubh)}(h *offline*h]hoffline}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh methods are viable. On the other hand, if the tracing of the events incurs on higher overhead than the simple handling of an event by a monitor, then a }(hjhhhNhNubh)}(h*synchronous online*h]hsynchronous online}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh' monitors will incur on lower overhead.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hjRhhubh)}(h"Indeed, the research presented in:h]h"Indeed, the research presented in:}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjRhhubj)}(hDe Oliveira, Daniel Bristot; Cucinotta, Tommaso; De Oliveira, Romulo Silva. *Efficient formal verification for the Linux kernel.* In: International Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. p. 315-332. h]h)}(hDe Oliveira, Daniel Bristot; Cucinotta, Tommaso; De Oliveira, Romulo Silva. *Efficient formal verification for the Linux kernel.* In: International Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. p. 315-332.h](hLDe Oliveira, Daniel Bristot; Cucinotta, Tommaso; De Oliveira, Romulo Silva. }(hjEhhhNhNubh)}(h5*Efficient formal verification for the Linux kernel.*h]h3Efficient formal verification for the Linux kernel.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEubhk In: International Conference on Software Engineering and Formal Methods. Springer, Cham, 2019. p. 315-332.}(hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehjAubah}(h]h ]h"]h$]h&]uh1jhhhKehjRhhubh)}(hX4Shows that for Deterministic Automata models, the synchronous processing of events in-kernel causes lower overhead than saving the same events to the trace buffer, not even considering collecting the trace for user-space analysis. This motivated the development of an in-kernel interface for online monitors.h]hX4Shows that for Deterministic Automata models, the synchronous processing of events in-kernel causes lower overhead than saving the same events to the trace buffer, not even considering collecting the trace for user-space analysis. This motivated the development of an in-kernel interface for online monitors.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjRhhubh)}(hTFor further information about modeling of Linux kernel behavior using automata, see:h]hTFor further information about modeling of Linux kernel behavior using automata, see:}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjRhhubj)}(hDe Oliveira, Daniel B.; De Oliveira, Romulo S.; Cucinotta, Tommaso. *A thread synchronization model for the PREEMPT_RT Linux kernel.* Journal of Systems Architecture, 2020, 107: 101729. h]h)}(hDe Oliveira, Daniel B.; De Oliveira, Romulo S.; Cucinotta, Tommaso. *A thread synchronization model for the PREEMPT_RT Linux kernel.* Journal of Systems Architecture, 2020, 107: 101729.h](hDDe Oliveira, Daniel B.; De Oliveira, Romulo S.; Cucinotta, Tommaso. }(hjhhhNhNubh)}(hA*A thread synchronization model for the PREEMPT_RT Linux kernel.*h]h?A thread synchronization model for the PREEMPT_RT Linux kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh4 Journal of Systems Architecture, 2020, 107: 101729.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhhhKrhjRhhubeh}(h]online-rv-monitorsah ]h"]online rv monitorsah$]h&]uh1hhhhhhhhKNubh)}(hhh](h)}(hThe user interfaceh]hThe user interface}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKwubh)}(hnThe user interface resembles the tracing interface (on purpose). It is currently at "/sys/kernel/tracing/rv/".h]hrThe user interface resembles the tracing interface (on purpose). It is currently at “/sys/kernel/tracing/rv/”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjhhubh)}(h4The following files/folders are currently available:h]h4The following files/folders are currently available:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubh)}(h**available_monitors**h]hstrong)}(hjh]havailable_monitors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK~hjhhubh bullet_list)}(hhh]h list_item)}(h2Reading list the available monitors, one per line h]h)}(h1Reading list the available monitors, one per lineh]h1Reading list the available monitors, one per line}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]bullet-uh1jhhhKhjhhubh)}(h For example::h]h For example:}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h!# cat available_monitors wip wwnrh]h!# cat available_monitors wip wwnr}hj4sbah}(h]h ]h"]h$]h&]jjuh1j~hhhKhjhhubh)}(h**available_reactors**h]j)}(hjDh]havailable_reactors}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]j)}(h4Reading shows the available reactors, one per line. h]h)}(h3Reading shows the available reactors, one per line.h]h3Reading shows the available reactors, one per line.}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ubah}(h]h ]h"]h$]h&]uh1jhjYhhhhhNubah}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h For example::h]h For example:}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h)# cat available_reactors nop panic printkh]h)# cat available_reactors nop panic printk}hjsbah}(h]h ]h"]h$]h&]jjuh1j~hhhKhjhhubh)}(h**enabled_monitors**:h](j)}(h**enabled_monitors**h]henabled_monitors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(h0Reading lists the enabled monitors, one per lineh]h)}(hjh]h0Reading lists the enabled monitors, one per line}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h%Writing to it enables a given monitorh]h)}(hjh]h%Writing to it enables a given monitor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h4Writing a monitor name with a '!' prefix disables ith]h)}(hjh]h8Writing a monitor name with a ‘!’ prefix disables it}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h2Truncating the file disables all enabled monitors h]h)}(h1Truncating the file disables all enabled monitorsh]h1Truncating the file disables all enabled monitors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h For example::h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h# cat enabled_monitors # echo wip > enabled_monitors # echo wwnr >> enabled_monitors # cat enabled_monitors wip wwnr # echo '!wip' >> enabled_monitors # cat enabled_monitors wwnr # echo > enabled_monitors # cat enabled_monitors #h]h# cat enabled_monitors # echo wip > enabled_monitors # echo wwnr >> enabled_monitors # cat enabled_monitors wip wwnr # echo '!wip' >> enabled_monitors # cat enabled_monitors wwnr # echo > enabled_monitors # cat enabled_monitors #}hj&sbah}(h]h ]h"]h$]h&]jjuh1j~hhhKhjhhubh)}(hFNote that it is possible to enable more than one monitor concurrently.h]hFNote that it is possible to enable more than one monitor concurrently.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h**monitoring_on**h]j)}(hjDh]h monitoring_on}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hqThis is an on/off general switcher for monitoring. It resembles the "tracing_on" switcher in the trace interface.h]huThis is an on/off general switcher for monitoring. It resembles the “tracing_on” switcher in the trace interface.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(h Writing "0" stops the monitoringh]h)}(hjlh]h$Writing “0” stops the monitoring}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjjubah}(h]h ]h"]h$]h&]uh1jhjghhhhhNubj)}(h$Writing "1" continues the monitoringh]h)}(hjh]h(Writing “1” continues the monitoring}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjghhhhhNubj)}(h5Reading returns the current status of the monitoring h]h)}(h4Reading returns the current status of the monitoringh]h4Reading returns the current status of the monitoring}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjghhhhhNubeh}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(hNote that it does not disable enabled monitors but stop the per-entity monitors monitoring the events received from the system.h]hNote that it does not disable enabled monitors but stop the per-entity monitors monitoring the events received from the system.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h**reacting_on**h]j)}(hjh]h reacting_on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(h,Writing "0" prevents reactions for happeningh]h)}(hjh]h0Writing “0” prevents reactions for happening}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hWriting "1" enable reactionsh]h)}(hjh]h Writing “1” enable reactions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h3Reading returns the current status of the reaction h]h)}(h2Reading returns the current status of the reactionh]h2Reading returns the current status of the reaction}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h **monitors/**h]j)}(hj,h]h monitors/}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hEach monitor will have its own directory inside "monitors/". There the monitor-specific files will be presented. The "monitors/" directory resembles the "events" directory on tracefs.h]hEach monitor will have its own directory inside “monitors/”. There the monitor-specific files will be presented. The “monitors/” directory resembles the “events” directory on tracefs.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h For example::h]h For example:}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hl# cd monitors/wip/ # ls desc enable # cat desc wakeup in preemptive per-cpu testing monitor. # cat enable 0h]hl# cd monitors/wip/ # ls desc enable # cat desc wakeup in preemptive per-cpu testing monitor. # cat enable 0}hj]sbah}(h]h ]h"]h$]h&]jjuh1j~hhhKhjhhubh)}(h**monitors/MONITOR/desc**h]j)}(hjmh]hmonitors/MONITOR/desc}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh]j)}(h5Reading shows a description of the monitor *MONITOR* h]h)}(h4Reading shows a description of the monitor *MONITOR*h](h+Reading shows a description of the monitor }(hjhhhNhNubh)}(h *MONITOR*h]hMONITOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubah}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h**monitors/MONITOR/enable**h]j)}(hjh]hmonitors/MONITOR/enable}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(h"Writing "0" disables the *MONITOR*h]h)}(hjh](hWriting “0” disables the }(hjhhhNhNubh)}(h *MONITOR*h]hMONITOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h!Writing "1" enables the *MONITOR*h]h)}(hjh](hWriting “1” enables the }(hjhhhNhNubh)}(h *MONITOR*h]hMONITOR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(h3Reading return the current status of the *MONITOR* h]h)}(h2Reading return the current status of the *MONITOR*h](h)Reading return the current status of the }(hjhhhNhNubh)}(h *MONITOR*h]hMONITOR}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h**monitors/MONITOR/reactors**h]j)}(hjCh]hmonitors/MONITOR/reactors}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hhh](j)}(hList available reactors, with the select reaction for the given *MONITOR* inside "[]". The default one is the nop (no operation) reactor.h]h)}(hList available reactors, with the select reaction for the given *MONITOR* inside "[]". The default one is the nop (no operation) reactor.h](h@List available reactors, with the select reaction for the given }(hj_hhhNhNubh)}(h *MONITOR*h]hMONITOR}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_ubhD inside “[]”. The default one is the nop (no operation) reactor.}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj[ubah}(h]h ]h"]h$]h&]uh1jhjXhhhhhNubj)}(h?Writing the name of a reactor enables it to the given MONITOR. h]h)}(h>Writing the name of a reactor enables it to the given MONITOR.h]h>Writing the name of a reactor enables it to the given MONITOR.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjXhhhhhNubeh}(h]h ]h"]h$]h&]j$j%uh1jhhhKhjhhubh)}(h For example::h]h For example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h# cat monitors/wip/reactors [nop] panic printk # echo panic > monitors/wip/reactors # cat monitors/wip/reactors nop [panic] printkh]h# cat monitors/wip/reactors [nop] panic printk # echo panic > monitors/wip/reactors # cat monitors/wip/reactors nop [panic] printk}hjsbah}(h]h ]h"]h$]h&]jjuh1j~hhhKhjhhubeh}(h]the-user-interfaceah ]h"]the user interfaceah$]h&]uh1hhhhhhhhKwubeh}(h]runtime-verificationah ]h"]runtime verificationah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjOjLjjjju nametypes}(jjOjjuh}(jhjLj-jjRjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.