Messages in this thread | | | From | CaT <> | Subject | Re: core files (was Re: 2.1.131: some quality thoughts) | Date | Sat, 19 Dec 1998 18:33:43 +1100 (EST) |
| |
Albert D. Cahalan wrote the following: > > Once upon a time Linux did dump core into "core.NAME" with the > > appropriate executable NAME, but that was changed because the > > assumption that a core file is named "core" is about as deeply > > entrenched in Un*x minds as the assumption that SIGKILL==9. > > > > IOW, too many complaints that "it breaks other stuff". > > Yes, nobody knows what core.tar is. Prefixes are just bad.
Doing them that way WOULD bite.
> Considering the millions of real users out there, "program.bug" would > be a much better name. The discovery of a file named "core" is not > likely to generate a bug report. > > If anyone cares enough, support this: > > echo "core.%c" > /proc/sys/kernel/corename
This I love. For a second I thought it was already there and went to check. :)
> For admin compatibility with the new /bin/ps, you should use these codes: > > CODE NORMAL HEADER > %C pcpu %CPU > %G group GROUP > %P ppid PPID > %U user USER > %a args COMMAND > %c comm COMMAND > %g rgroup RGROUP > %n nice NI > %p pid PID > %r pgid PGID > %t etime ELAPSED > %u ruser RUSER > %x time TIME > %y tty TTY > %z vsz VSZ
I'd like the adition to this list of %d to stand for the cwd the command was started in. ie this would be the directory the corefile would normally go to.
I could then do something like:
echo "/tmp/cores/%d/%c.core" > /proc/sys/kernel/corename
or
echo "/tmp/cores/%u/%d/%c.core" > /proc/sys/kernel/corename
(to keep the files behind a nicely permissioned dir)
And keep all corefiles in the one directory if I wanted to. (good for systems without multiple users and makes both cleaning them up AND keeping them simple).
I'd code this up myself but a. it would take me a while and b. someone would have to give me starting information. While I've programmed in C I've not done so to this extent or have I ever touched the kernel. If someone with more knowledge/experience wants to do do this then more power to them. :)
-- CaT (cat@zip.net.au) URL: http://www.zip.com.au/dev/null
There was farting in the air that night, It lit so bright, Fernando...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |