public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Non keyboard trigger of Alt-SysRQ-S-U-B
@ 2001-03-25 16:27 Nathan Neulinger
  2001-03-25 22:16 ` Keith Owens
  2001-04-04 13:54 ` Boris Pisarcik
  0 siblings, 2 replies; 4+ messages in thread
From: Nathan Neulinger @ 2001-03-25 16:27 UTC (permalink / raw)
  To: linux-kernel

Is there any way that this can be triggered remotely? I frequently get
into situations with a particular machine where 'reboot' or 'reboot -f'
just plain won't work, and would like to be able do a 'filesystem clean'
forcible reboot, but don't particularly care about services being shut
down cleanly. Of course, the key is, I'm not at the keyboard of the
server in question.

I figured there may be some way to have a module do this, but if anyone
has any ideas, I'd appreciate it. I did see the example sent not too
long ago about triggering a panic, but that won't cleanly unmount the
filesystems. 

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
CIS - Systems Programming                Fax: (573) 341-4216

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Non keyboard trigger of Alt-SysRQ-S-U-B
  2001-03-25 16:27 Non keyboard trigger of Alt-SysRQ-S-U-B Nathan Neulinger
@ 2001-03-25 22:16 ` Keith Owens
  2001-04-04 11:21   ` Boris Pisarcik
  2001-04-04 13:54 ` Boris Pisarcik
  1 sibling, 1 reply; 4+ messages in thread
From: Keith Owens @ 2001-03-25 22:16 UTC (permalink / raw)
  To: Nathan Neulinger; +Cc: linux-kernel

On Sun, 25 Mar 2001 10:27:28 -0600, 
Nathan Neulinger <nneul@umr.edu> wrote:
>Is there any way that this can be triggered remotely? I frequently get
>into situations with a particular machine where 'reboot' or 'reboot -f'
>just plain won't work, and would like to be able do a 'filesystem clean'
>forcible reboot, but don't particularly care about services being shut
>down cleanly. Of course, the key is, I'm not at the keyboard of the
>server in question.

If you have a serial console on the server, you can get sysrq by
sending a serial break followed by the character.  See
drivers/char/serial.c on any 2.4 kernel.  Otherwise you could hack up a
module that calls handle_sysrq() directly.  Unless you are sending a
character that needs regs ('p'), kbd ('r') or tty ('k'), you can set
those parameters to NULL.  Any unrecognised character will try to use
kbd and tty parameters.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Non keyboard trigger of Alt-SysRQ-S-U-B
  2001-03-25 22:16 ` Keith Owens
@ 2001-04-04 11:21   ` Boris Pisarcik
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Pisarcik @ 2001-04-04 11:21 UTC (permalink / raw)
  To: linux-kernel

> If you have a serial console on the server, you can get sysrq by
> sending a serial break followed by the character. 

Hi,

i've tried it with minicom and functioned : ctrl+a+F and key for function
as in normal sysrq.

This approach will probably not help you a lot thought, since you wouldn't
have access to your serial console too.

If you don't get your problems solved till now, i could make a simple
single-purpos module which will export a syscall to priviledged process
to call sysrq functions.

Gonna to have a look...

Bye                                                                     B.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Non keyboard trigger of Alt-SysRQ-S-U-B
  2001-03-25 16:27 Non keyboard trigger of Alt-SysRQ-S-U-B Nathan Neulinger
  2001-03-25 22:16 ` Keith Owens
@ 2001-04-04 13:54 ` Boris Pisarcik
  1 sibling, 0 replies; 4+ messages in thread
From: Boris Pisarcik @ 2001-04-04 13:54 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 937 bytes --]

    Hi Nathan,

I've just made an experimental module which offers syscall to privileged
process, which internally translates itself into real sysrq handler
(handle_sysrq) defined in drivers/char/sysrq.c. It occupates itself 
one of unussed linux system calls (concretely stty - no. 31). 
Makefile and patch for that sysrq.c are included in attached archive. 
(I stronly believe i didn't made it reversed :). 
The patch itself only exports 1 variable and 1 function from sysrq.c, 
that normally aren't.

You can make a daemon, which listens on socket and triggers commands
send by clients. Dont call sysrq+boot until a while needed to sync and
unmount. This check, if sync and/or umount were finished before boot,
should be really done, but it would require more changes in kernel
source. And of course, the security is to be taken in client/server
into account.

Bye                                                                   B.

[-- Attachment #2: srq.tar.gz --]
[-- Type: application/octet-stream, Size: 1925 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-04-04 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-25 16:27 Non keyboard trigger of Alt-SysRQ-S-U-B Nathan Neulinger
2001-03-25 22:16 ` Keith Owens
2001-04-04 11:21   ` Boris Pisarcik
2001-04-04 13:54 ` Boris Pisarcik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox