[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printk in syscall



I might be totally wrong on this, but this is just a thought from my own
experience...

Try doing dmesg before taking the system down and see if your messages are shown for
the invocations you've done in the dmesg output.

Theory - perhaps the printk messages are being buffered by syslog and flushed to
disk on shutdown.  In my experience, dmesg output always shows the most recent
kernel messages accurately.

-Eric

Sourav Sen wrote:

> Hi,
>         I encountered a strange situation!! I implemented a system
> call(This is purely academic and I know that implementing system call is
> not encouraged etc, etc.. :). The call is working fine. I have put one
> printk in the system call routine proper(and  many others in the routines
> in the call chain from the system call), for debugging purpose. The
> printk prints an error situation(obviously!!).
>
>         When the syscall is invoked, and it is working properly, so the
> printk doesn't speak, but while I bring that kernel down, that printk gets
> executed many times (as many as 22 times as per /var/log/messages). No
> other printk among the ones I introduced gets executed.
>
>         I think this is quite strange, anybody have any idea what might be
> happening.
>
> Thanks
> sourav
> --------------------------------------------------------------------------------
>
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/
> IRC Channel:   irc.openprojects.net / #kernelnewbies
> Web Page:      http://www.kernelnewbies.org/

-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/