Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

SysRq debugger

196 bytes added, 08:37, 26 December 2015
Marked this version for translation
<translate>
<!--T:1-->
''SysRq debugger'' can help you to obtain some information from oops-ed kernel. This feature is available since 026test017 kernel.
== Features ==<!--T:2-->
''SysRq debugger'' can do one of the following:
# Dump memory at specified address
# Resolve symbol address by its name
== How to use it ==<!--T:3-->
To enter debug mode press ''SysRq-g''.
After this the following commands will be available:
# ''SysRq-q'' - quit debugger
<!--T:4-->
After entering ''-d'', ''-w'' or ''-r'' state you must enter address to work with (and the value you want to write if you do). Simply do this by pressing according keys while holding ''Alt-StsRq''.
<!--T:5-->
If you need to enter the upper case letter or the underbar (<code>_</code>) while typing a symbol name then you need to press and release ''shift'' and then the letter or minus (<code>-</code>).
<!--T:6-->
At the end press ''enter''.
== Working with proc ==<!--T:7-->There is a ''<code>/proc/sysrq-trigger'' </code> entry which triggers sysrq events. You may send write a string to it to trigger commands one by one.There is one note about it - : the string must end with 'the <icode>\r</icode>' character.
== Examples ==<!--T:8-->
Here are some examples of how to use debugger
=== Dump memory ===<!--T:9-->
<pre>
# echo -n -e 'gd0xc0000000\rq' > /proc/sysrq-trigger
will dump memory region of 512 bytes
<!--T:10-->
<pre>
# echo -n -e 'gxq' > /proc/sysrq-trigger
will dump the next 512 bytes of memory
=== Write to memory ===<!--T:11-->
<pre>
# echo -n -e 'gw0xc0000000-0x12345678\rq' > /proc/sysrq-trigger
will write ''0x12345678'' at ''0xc0000000''
=== Resolve symbol ===<!--T:12-->
<pre>
# echo -n -e 'grschedule\rq' > /proc/sysrq-trigger
will print you an address ''schedule()'' function starts from
<!--T:13-->
<pre>
# echo -n -e 'gxq' > /proc/sysrq-trigger
will dump first 512 bytes of it
<!--T:14-->
Note <i>''-n''</i> and <i>''-e''</i> keys to ''echo'' command.
</translate>
[[Category:HOWTO]]
[[Category:Kernel]]