Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 06-02-2014, 10:01 PM   #1
LQ Newbie
Registered: May 2014
Posts: 5

Rep: Reputation: Disabled
How to remotely break a running debuggee like `echo g > /proc/sysrq-trigger`?

When debugging an OS kernel with two machines,if the kernel is NT and the debugger is WinDBG, then the human user can press Ctrl+Break on the host machine to enforce the target machine to break into a debugable state.

However, if the kernel is Linux and the debugger is gdb + kgdb, then the human user cannot do the same like the NT user does. The Linux user can only type the following command on the target machine:

`echo g > /proc/sysrq-trigger`

I think it is not convenient, is there a way to enforce the remote target break into a debugable sate?
Old 06-05-2014, 12:28 PM   #2
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I think it is not convenient, is there a way to enforce the remote target break into a debugable sate?
# a script named "BAM" to trigger kernel crashes
echo g > /proc/sysrg-trigger
Secure shell to the target machine, move the script into /bin chmod it 777 then type
You will not be further inconvenienced.
BTW, if you have kgdb installed properly and your kernel correctly configured, you can put a variation of that script on your own machine and do it from there

Last edited by dijetlo; 06-05-2014 at 12:30 PM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sync; echo 3 > /proc/sys/vm/drop_caches? wstewart90 Linux - Server 6 06-01-2014 11:45 AM
echo 0 /proc/sys/kernel/hung_task_timeout finsh Linux - Server 3 07-18-2013 07:01 AM
missing file??? /proc/sys/kernel/sysrq bad_gui Linux - General 4 08-18-2006 10:37 PM
echo '214748364' > /proc/sys/kernel/shmmax rubendarioportillo SUSE / openSUSE 1 11-03-2005 06:05 PM
echo '214748364' > /proc/sys/kernel/shmmax SwannAnderson Linux - General 2 11-03-2005 02:54 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration