Documentation/fault-injection/notifier-error-inject.txt

2024-06-22 07:38

本文主要是介绍Documentation/fault-injection/notifier-error-inject.txt,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

如果想评论或更新本文的内容,请直接联系原文档的维护者。


如果你使用英文交流有困难的话,也可以向中文版维护者求助。


如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。


中文版维护者: 陶莹莉  tyl18768122426@163.com


中文版翻译者:  陶莹莉  tyl18768122426@163.com


中文版校译者:  陶莹莉  tyl18768122426@163.com
Notifier error injection
========================
通知错误注入
========================
Notifier error injection provides the ability to inject artificial errors to
specified notifier chain callbacks. It is useful to test the error handling of
notifier call chain failures which is rarely executed.  There are kernel
modules that can be used to test the following notifiers.


 * CPU notifier
 * PM notifier
 * Memory hotplug notifier
 * powerpc pSeries reconfig notifier


 通知错误注入使能够向指定的通知链回调函数注射人工错误。测试很少执行的通知调用链的故障
 的错误处理是非常有用的。有内核模块可用于测试以下通知。


 * CPU通知
 * PM通知
 *内存热插拔通知
 *PowerPC调和级数重新配置的通知


CPU notifier error injection module
-----------------------------------


CPU通知错误注入模块
-----------------------------------


This feature can be used to test the error handling of the CPU notifiers by
injecting artificial errors to CPU notifier chain callbacks.


If the notifier call chain should be failed with some events notified, write
the error code to debugfs interface
/sys/kernel/debug/notifier-error-inject/cpu/actions/<notifier event>/error


此功能可以用来测试CPU通知的错误处理通过向CPU通知链回调函数注入人工错误。


如果通知调用链对于一些事件通知应该失败,写如下的错误代码的调试接口
/sys/kernel/debug/notifier-error-inject/cpu/actions/<notifier event>/error


Possible CPU notifier events to be failed are:


 * CPU_UP_PREPARE
 * CPU_UP_PREPARE_FROZEN
 * CPU_DOWN_PREPARE
 * CPU_DOWN_PREPARE_FROZEN


 CPU通知可能要失败的事件是:


 * CPU_UP_PREPARE
 * CPU_UP_PREPARE_FROZEN
 * CPU_DOWN_PREPARE
 * CPU_DOWN_PREPARE_FROZEN


Example1: Inject CPU offline error (-1 == -EPERM)


# cd /sys/kernel/debug/notifier-error-inject/cpu
# echo -1 > actions/CPU_DOWN_PREPARE/error
# echo 0 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: Operation not permitted


Example2: inject CPU online error (-2 == -ENOENT)


# echo -2 > actions/CPU_UP_PREPARE/error
# echo 1 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: No such file or directory


例1: 脱机注入CPU错误 (-1 == -EPERM)


# cd /sys/kernel/debug/notifier-error-inject/cpu
# echo -1 > actions/CPU_DOWN_PREPARE/error
# echo 0 > /sys/devices/system/cpu/cpu1/online
bash的回音:写错误:操作不允许


例2: 网上注入CPU错误 (-2 == -ENOENT)


# echo -2 > actions/CPU_UP_PREPARE/error
# echo 1 > /sys/devices/system/cpu/cpu1/online
bash: echo: write error: No such file or directory
bash的回音:写错误:没有这样的文件或目录

PM notifier error injection module
----------------------------------
项目管理通知错误注入模块
----------------------------------
This feature is controlled through debugfs interface
/sys/kernel/debug/notifier-error-inject/pm/actions/<notifier event>/error


此功能是通过内核调试接口控制的
/sys/kernel/debug/notifier-error-inject/pm/actions/<notifier event>/error


Possible PM notifier events to be failed are:


 * PM_HIBERNATION_PREPARE
 * PM_SUSPEND_PREPARE
 * PM_RESTORE_PREPARE


 项目管理通知事件可能要失败是:


 * PM_HIBERNATION_PREPARE
 * PM_SUSPEND_PREPARE
 * PM_RESTORE_PREPARE


Example: Inject PM suspend error (-12 = -ENOMEM)


# cd /sys/kernel/debug/notifier-error-inject/pm/
# echo -12 > actions/PM_SUSPEND_PREPARE/error
# echo mem > /sys/power/state
bash: echo: write error: Cannot allocate memory


例: 注射项目管理延迟错误 (-12 = -ENOMEM)


# cd /sys/kernel/debug/notifier-error-inject/pm/
# echo -12 > actions/PM_SUSPEND_PREPARE/error
# echo mem > /sys/power/state
bash: echo: write error: Cannot allocate memory
bash的回音:写入错误:无法分配内存

Memory hotplug notifier error injection module
----------------------------------------------
内存热插拔通知错误注入模块
----------------------------------------------


This feature is controlled through debugfs interface
/sys/kernel/debug/notifier-error-inject/memory/actions/<notifier event>/error


此功能是通过内核调试接口控制的
/sys/kernel/debug/notifier-error-inject/memory/actions/<notifier event>/error


Possible memory notifier events to be failed are:


 * MEM_GOING_ONLINE
 * MEM_GOING_OFFLINE


 内存通知事件可能要失败的是:


 * MEM_GOING_ONLINE
 * MEM_GOING_OFFLINE


Example: Inject memory hotplug offline error (-12 == -ENOMEM)


# cd /sys/kernel/debug/notifier-error-inject/memory
# echo -12 > actions/MEM_GOING_OFFLINE/error
# echo offline > /sys/devices/system/memory/memoryXXX/state
bash: echo: write error: Cannot allocate memory


例: 脱机注入内存热插拔的错误 (-12 == -ENOMEM)


# cd /sys/kernel/debug/notifier-error-inject/memory
# echo -12 > actions/MEM_GOING_OFFLINE/error
# echo offline > /sys/devices/system/memory/memoryXXX/state
bash的回音:写入错误:无法分配内存

powerpc pSeries reconfig notifier error injection module
--------------------------------------------------------
POWERPC的调和级数重新配置的通知错误注入模块
--------------------------------------------------------
This feature is controlled through debugfs interface
/sys/kernel/debug/notifier-error-inject/pSeries-reconfig/actions/<notifier event>/error


此功能是通过内核调试接口控制的
/sys/kernel/debug/notifier-error-inject/pSeries-reconfig/actions/<notifier event>/error


Possible pSeries reconfig notifier events to be failed are:


 * PSERIES_RECONFIG_ADD
 * PSERIES_RECONFIG_REMOVE
 * PSERIES_DRCONF_MEM_ADD
 * PSERIES_DRCONF_MEM_REMOVE


 可能的pSeries重新配置通知事件要失败的是:


 * PSERIES_RECONFIG_ADD
 * PSERIES_RECONFIG_REMOVE
 * PSERIES_DRCONF_MEM_ADD
 * PSERIES_DRCONF_MEM_REMOVE


For more usage examples
-----------------------
对于更多的用法示例
-----------------------


There are tools/testing/selftests using the notifier error injection features
for CPU and memory notifiers.


 * tools/testing/selftests/cpu-hotplug/on-off-test.sh
 * tools/testing/selftests/memory-hotplug/on-off-test.sh


 tools/testing/selftests 用通知错误注入功能为CPU和内存发出通知。


 * tools/testing/selftests/cpu-hotplug/on-off-test.sh
 * tools/testing/selftests/memory-hotplug/on-off-test.sh


These scripts first do simple online and offline tests and then do fault
injection tests if notifier error injection module is available.


这些脚本首先做简单的在线和离线测试,然后做故障注入测试,如果通知错误注入模块是可以的。ection module is available.

这篇关于Documentation/fault-injection/notifier-error-inject.txt的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1083678

相关文章

Python脚本:TXT文档行数统计

count = 0 #计数变量file_dirs = input('请输入您要统计的文件根路径:')filename = open(file_dirs,'r') #以只读方式打开文件file_contents = filename.read() #读取文档内容到file_contentsfor file_content in file_contents:

mysql中导入txt文件数据的操作指令

1 表tt的格式:    CREATE TABLE `tt` (   `ind` int NOT NULL auto_increment,   `name` char(100) default NULL,   PRIMARY KEY  (`ind`)  )   2 文件d.txt的内容示例:  1,a  2,b  3,c

编译linux内核出现 arm-eabi-gcc: error: : No such file or directory

external/e2fsprogs/lib/ext2fs/tdb.c:673:29: warning: comparison between : In function 'max2165_set_params': -。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。 。。。。。。。。 host asm: libdvm <= dalvik/vm/mterp/out/Inte

收藏:解决 pip install 出现 error: subprocess-exited-with-error 错误的方法

在使用 pip 安装 Python 包时,有时候会遇到 error: subprocess-exited-with-error 错误。这种错误通常是由于 setuptools 版本问题引起的。本文将介绍如何解决这一问题 当你使用 pip install 安装某个 Python 包时,如果 setuptools 版本过高或过低,可能会导致安装过程出错,并出现类似以下错误信息:error: subpr

Nn criterions don’t compute the gradient w.r.t. targets error「pytorch」 (debug笔记)

Nn criterions don’t compute the gradient w.r.t. targets error「pytorch」 ##一、 缘由及解决方法 把这个pytorch-ddpg|github搬到jupyter notebook上运行时,出现错误Nn criterions don’t compute the gradient w.r.t. targets error。注:我用

src/pyaudio/device_api.c:9:10: fatal error: portaudio.h: 没有那个文件或目录

(venv) shgbitai@shgbitai-C9X299-PGF:~/pythonworkspace/ai-accompany$ pip install pyaudio sounddeviceCollecting pyaudioDownloading PyAudio-0.2.14.tar.gz (47 kB)━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ERROR 2003 (HY000): Can't connect to MySQL server on (10061)

在linux系统上装了一个mysql-5.5,启动后本机都是可以访问的,操作都正常,同时建了一个%的用户(支持远程访问), root@debian:/# mysql -u loongson -pEnter password: Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id

pip install pyaudio sounddevice error: externally-managed-environment

shgbitai@shgbitai-C9X299-PGF:~/pythonworkspace/ai-accompany$ pip install pyaudio sounddeviceerror: externally-managed-environment× This environment is externally managed╰─> To install Python package

C++常见异常汇总(三): fatal error: google/protobuf/port_def.inc

文章目录 1、fatal error : sw/redis++/redis.h2、fatal error: dwarf.h: No such file or directory3、fatal error: elfutils/libdw.h: No such file or directory4、fatal error: libunwind.h: No such file or directo

error while loading shared libraries: libnuma.so.1: cannot open shared object file:

腾讯云CentOS,安装Mysql时: 1.yum remove libnuma.so.1 2.yum install numactl.x86_64