Re: crash: savecore - saves core dump every day?

2006-03-10 Thread Nick Holland

Stefan Drexleri wrote:

2006/3/10, Nick Holland <[EMAIL PROTECTED]>:

I'm not entirely sure I understand your question, the subject and the
body of your message don't seem to be completely related.

However, I think you may find the answers to your questions in
   man 8 crash

Third paragraph (more or less, depending what one counts) tells what
conditions cause the in-RAM image to be written to disk in the swap
partition.  If that happens, an attempt will be made to dump it to
physical disk upon reboot.


Will try to ask more clearly: How does savecore work in sense of
detecting that condition to save core dump to swap space has been
accomplished?
Does it get message from kernel (which IPC technique?) or does it
something like polling for special event (eg. newly created file)?


Savecore is running after a reboot.  It isn't getting a message from the 
now dead kernel through traditional techniques.  After a kernel panic, 
it is generally not a great idea to write a normal file to a normal file 
system.


As man 8 savecore indicates, it looks at the swap space to see if it 
looks like a valid core dump.  If so, it dumps to disk.  If you need 
more info on how it determines that, I'd suggest a read of the source 
code.  If you really need that kind of information, you will probably 
have no problem with the source code (pretty small and contained, too -- 
about 16k in size).


I suspect there is a question you are trying not to ask.  What is 
prompting your questions?  Are you having a problem?  Trying to 
accomplish something?


Nick.



Re: crash: savecore - saves core dump every day?

2006-03-10 Thread Stefan Drexleri
2006/3/10, Nick Holland <[EMAIL PROTECTED]>:
>
> I'm not entirely sure I understand your question, the subject and the
> body of your message don't seem to be completely related.
>
> However, I think you may find the answers to your questions in
>man 8 crash
>
> Third paragraph (more or less, depending what one counts) tells what
> conditions cause the in-RAM image to be written to disk in the swap
> partition.  If that happens, an attempt will be made to dump it to
> physical disk upon reboot.

Will try to ask more clearly: How does savecore work in sense of
detecting that condition to save core dump to swap space has been
accomplished?
Does it get message from kernel (which IPC technique?) or does it
something like polling for special event (eg. newly created file)?

regards



Re: crash: savecore - saves core dump every day?

2006-03-09 Thread Nick Holland

Stefan Drexleri wrote:

Hi,

from the faq: "Upon reboot, savecore(8)will attempt to save the
contents of the swap partition to a file in /var/crash"

savecore would be called by /etc/rc.
So which criterias must be fulfilled to make core dump upon reboot?
Does savecore look for special file names at special places? Who makes
the rule?


I'm not entirely sure I understand your question, the subject and the 
body of your message don't seem to be completely related.


However, I think you may find the answers to your questions in
  man 8 crash

Third paragraph (more or less, depending what one counts) tells what 
conditions cause the in-RAM image to be written to disk in the swap 
partition.  If that happens, an attempt will be made to dump it to 
physical disk upon reboot.


Note that on a modern system, /var is very often not large enough to 
hold a core dump.  If this is something you care about, you will need to 
deal with it accordingly.  (aren't we all glad that attachments are 
stripped from misc@ postings now?  "Hi, here's my 2G core dump.  why did 
it happen?")


Nick.