Editing SysRq debugger

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
<translate>
 
<translate>
<!--T:1-->
 
 
''SysRq debugger'' can help you to obtain some information from oops-ed kernel. This feature is available since 026test017 kernel.
 
''SysRq debugger'' can help you to obtain some information from oops-ed kernel. This feature is available since 026test017 kernel.
  
== Features == <!--T:2-->
+
== Features ==
 
''SysRq debugger'' can do one of the following:
 
''SysRq debugger'' can do one of the following:
 
# Dump memory at specified address
 
# Dump memory at specified address
Line 9: Line 8:
 
# Resolve symbol address by its name
 
# Resolve symbol address by its name
  
== How to use it == <!--T:3-->
+
== How to use it ==
 
To enter debug mode press ''SysRq-g''.
 
To enter debug mode press ''SysRq-g''.
 
After this the following commands will be available:
 
After this the following commands will be available:
Line 21: Line 20:
 
# ''SysRq-q'' - quit debugger
 
# ''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''.
 
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>).
 
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''.
 
At the end press ''enter''.
  
== Working with proc == <!--T:7-->
+
== Working with proc ==
 
There is a <code>/proc/sysrq-trigger</code> entry which triggers sysrq events.  
 
There is a <code>/proc/sysrq-trigger</code> entry which triggers sysrq events.  
 
You may write a string to it to trigger commands one by one.
 
You may write a string to it to trigger commands one by one.
 
There is one note: the string must end with the <code>\r</code> character.
 
There is one note: the string must end with the <code>\r</code> character.
  
== Examples == <!--T:8-->
+
== Examples ==
 
Here are some examples of how to use debugger
 
Here are some examples of how to use debugger
  
=== Dump memory === <!--T:9-->
+
=== Dump memory ===
 
<pre>
 
<pre>
 
# echo -n -e 'gd0xc0000000\rq' > /proc/sysrq-trigger
 
# echo -n -e 'gd0xc0000000\rq' > /proc/sysrq-trigger
Line 44: Line 40:
 
will dump memory region of 512 bytes
 
will dump memory region of 512 bytes
  
<!--T:10-->
 
 
<pre>
 
<pre>
 
# echo -n -e 'gxq' > /proc/sysrq-trigger
 
# echo -n -e 'gxq' > /proc/sysrq-trigger
Line 50: Line 45:
 
will dump the next 512 bytes of memory
 
will dump the next 512 bytes of memory
  
=== Write to memory === <!--T:11-->
+
=== Write to memory ===
 
<pre>
 
<pre>
 
# echo -n -e 'gw0xc0000000-0x12345678\rq' > /proc/sysrq-trigger
 
# echo -n -e 'gw0xc0000000-0x12345678\rq' > /proc/sysrq-trigger
Line 56: Line 51:
 
will write ''0x12345678'' at ''0xc0000000''
 
will write ''0x12345678'' at ''0xc0000000''
  
=== Resolve symbol === <!--T:12-->
+
=== Resolve symbol ===
 
<pre>
 
<pre>
 
# echo -n -e 'grschedule\rq' > /proc/sysrq-trigger
 
# echo -n -e 'grschedule\rq' > /proc/sysrq-trigger
Line 62: Line 57:
 
will print you an address ''schedule()'' function starts from
 
will print you an address ''schedule()'' function starts from
  
<!--T:13-->
 
 
<pre>
 
<pre>
 
# echo -n -e 'gxq' > /proc/sysrq-trigger
 
# echo -n -e 'gxq' > /proc/sysrq-trigger
Line 68: Line 62:
 
will dump first 512 bytes of it
 
will dump first 512 bytes of it
  
<!--T:14-->
 
 
Note <i>''-n''</i> and <i>''-e''</i> keys to ''echo'' command.
 
Note <i>''-n''</i> and <i>''-e''</i> keys to ''echo'' command.
 
</translate>
 
</translate>

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)