LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-16-2006, 08:02 PM   #1
bad_gui
LQ Newbie
 
Registered: Mar 2003
Distribution: vector, Debian
Posts: 17

Rep: Reputation: 0
missing file??? /proc/sys/kernel/sysrq


I'm trying to get an error message from a total system freeze due to my
wireless card driver. It causes a total lockup - flashing caps and scroll lock. I need to submit the output of Magic SysRq but I don't seem to have
a file /proc/sys/kernel/sysrq so that I can use this feature.


~$ cat /proc/sys/kernel/sysrq
cat: /proc/sys/kernel/sysrq: No such file or directory

~$ ls /proc/sys/kernel
acct domainname osrelease real-root-dev shmmni
cad_pid hostname ostype rtsig-max tainted
cap-bound hotplug overflowgid rtsig-nr threads-max
core_pattern modprobe overflowuid sem version
core_setuid_ok msgmax panic sg-big-buff
core_uses_pid msgmnb printk shmall
ctrl-alt-del msgmni random/ shmmax



I configured my kernel 2.4.33-rc3 to enable MagicSysRq

from .config:


# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_HIGHMEM is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_IOVIRT is not set
CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_FRAME_POINTER is not set
CONFIG_LOG_BUF_SHIFT=0

What setting am I missing?
 
Old 08-16-2006, 08:47 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,307
Blog Entries: 54

Rep: Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857
What setting am I missing?
As far as I can see none. Way stupid question but did you actually install and are you running that kernel? To make up for that stupid question, if you have /proc/sysrq-trigger but not sysrq, then maybe you could reconfigure the "ca::ctrlaltdel:" line in /etc/inittab to read "ca::ctrlaltdel:/bin/echo p > /proc/sysrq-trigger", which is the equivalent of doing alt+sysrq+p, then "telinit q" to have it reread inittab. I don't know though if it will work if your box is frozen but if it works using the keycombo ctrl+alt+del should now print the CPU registers.
 
Old 08-17-2006, 07:19 PM   #3
bad_gui
LQ Newbie
 
Registered: Mar 2003
Distribution: vector, Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Good to check everything.

~$ uname -a
Linux desktop 2.4.33-rc3 #1 Sat Jul 29 23:07:41 EDT 2006 i686 unknown

I don't have the file /proc/sysrq-trigger either

~$ ls /proc/
1/ 1689/ 1726/ 2/ cpuinfo iomem mounts@ sysvipc/
135/ 1690/ 1749/ 3/ crypto ioports mtrr tty/
1473/ 1692/ 1756/ 4/ devices irq/ net/ uptime
157/ 1693/ 1758/ 5/ dma kcore partitions version
1629/ 1703/ 1759/ 6/ driver/ kmsg pci
1633/ 1715/ 1760/ 7/ execdomains ksyms scsi/
1638/ 1716/ 1761/ 8/ fb loadavg self@
1643/ 1720/ 1778/ acpi/ filesystems locks slabinfo
1666/ 1722/ 1779/ asound/ fs/ meminfo stat
1687/ 1724/ 1828/ bus/ ide/ misc swaps
1688/ 1725/ 1841/ cmdline interrupts modules sys/



The goof that I discovered was that /usr/src/linux was a symlink to a previous kernel that
didn't have kernel debugging or MagicSysrq selected. But the new kernel build should have just
created the special file in /proc regardless, no?

I can recompile the kernel and cross my fingers but I'd like to do something to increase the
chance of success. I couln't find anything obvious in /usr/src/linux/kernel/sysctl.c to suggest that the kernel compilation creates the special file or whether the /proc entries
come from the distro (Vector 4.0)?
 
Old 08-18-2006, 03:31 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,307
Blog Entries: 54

Rep: Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857Reputation: 2857
The goof that I discovered was that /usr/src/linux was a symlink to a previous kernel that didn't have kernel debugging or MagicSysrq selected. But the new kernel build should have just created the special file in /proc regardless, no?
If it's in the .config yes (which apparently it is not).


I can recompile the kernel and cross my fingers but I'd like to do something to increase the
chance of success.

Symlink to the right kernel source directory, load the right config and check the settings before you compile. There's nothing more to do AFAIK: sysrq has been in the kernel virtually unchanged for ages now so it's highly unlikely something is blocking it unless you have added kernel patches that could for instance unset CONFIG_DEBUG_KERNEL so CONFIG_MAGIC_SYSRQ gets unset as well.
 
Old 08-18-2006, 10:37 PM   #5
bad_gui
LQ Newbie
 
Registered: Mar 2003
Distribution: vector, Debian
Posts: 17

Original Poster
Rep: Reputation: 0
It worked!

I recompiled the kernel after correcting the symlink error and now I have the correct
sysrq files in /proc

Thanks for your help.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't create file using echo: /proc/sys/net/ipv4/ip_local_port_change rsumbeling Linux - General 4 07-17-2013 04:20 AM
/proc/sys/fs/file-nr ?? jharris Linux - General 5 07-27-2009 06:07 PM
/proc/sys/fs/file-max vaginismus Linux - General 1 10-31-2005 11:34 PM
/proc/sys/kernel/hostname quesiton caps_phisto Linux - General 1 12-14-2004 07:22 AM
/proc/sys/fs/file-max Opinions Glover Linux - General 1 07-02-2002 09:52 PM


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

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