logging when SIGSEGV is processed?
Quoted 2 lines
I found this patch for kernel 2.2 which logs a message when some process receives SIGSEGV.
Why not just do it in userspace? A program which does nothing more than spawn a child and wait for it to terminate, performing some action based on the kind and status of exit, should be fairly trivial?
Admittedly, it might need some shoehorning into some existing setups (i.e., where the daemon you wish to watch isn't started directly, but by something else), but it wouldn't be too tricky, I'd've thought.
[See wait(2), specifically the bits about how to interpret `status']
Mo.
Quoted 3 lines · Mo McKinlay
Admittedly, it might need some shoehorning into some existing setups (i.e., where the daemon you wish to watch isn't started directly, but by something else), but it wouldn't be too tricky, I'd've thought.
init receives that stuff if a process has no other parent, I think, so that might be a great place.
Signature · 2 lines
http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
bert hubert, Sun, Sep 14, 2003 19:17:41 +0200:
Quoted 9 lines · Mo McKinlay
Quoted 4 lines
Admittedly, it might need some shoehorning into some existing setups (i.e., where the daemon you wish to watch isn't started directly, but by something else), but it wouldn't be too tricky, I'd've thought.
init receives that stuff if a process has no other parent, I think, so that might be a great place.
will not work if the signal received by the child of a daemon, which does nothing about its status.
Probably ptrace the daemon (following all its children) would server better. The feature (logging the coredumps) is definitely no needed for everything, just some suspectables.
Quoted 3 lines · Alex Riesen
Probably ptrace the daemon (following all its children) would server better. The feature (logging the coredumps) is definitely no needed for everything, just some suspectables.
accton() will turn on logging and that gives you log records of process termination including if it segfaulted.
Quoted 6 lines · Alex Riesen
Quoted 3 lines
Probably ptrace the daemon (following all its children) would server better. The feature (logging the coredumps) is definitely no needed for everything, just some suspectables.
accton()will turn on logging and that gives you log records of process termination including if it segfaulted.
Sound's good. You probably mean acct()? There's one little problem with that one:
NOTES
No accounting is produced for programs running when a crash occurs. In particular, nonterminating processes are never accounted for.
Folkert van Heusden
+--------------------------------------------------------------------------+ | UNIX sysop? Then give MultiTail ( http://www.vanheusden.com/multitail/ ) | | a try, it brings monitoring logfiles (and such) to a different level! | +---------------------------------------------------= www.vanheusden.com =-+