Messages in this thread | | | From | "Albert D. Cahalan" <> | Subject | Re: core files (was Re: 2.1.131: some quality thoughts) | Date | Sat, 19 Dec 1998 03:26:49 -0500 (EST) |
| |
CaT writes: > Albert D. Cahalan wrote the following:
>> 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. :)
Sorry, I don't care enough to add the feature. It doesn't seem like it would be hard at all though.
>> 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.
Trying to avoid future conflict here... if anyone has AIX, please try "ps -o '%p %c %d'" and report the results. Also look for other possibly undocumented format options.
Perhaps %D would be a safe choice. Also %S for a single-digit serial number. (or %H for "hash")
> 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)
Oh, this would be great:
/proc/sys/kernel/usercore "core" Normal stuff /proc/sys/kernel/rootcore "core" Daemons mostly /proc/sys/kernel/suidcore "" Currently undumpable
I don't see why we don't just dump setuid cores with mode 000 and owner root, restricted to unix-like filesystems.
> 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. :)
Give it a try if you want the feature. Kernel programming is no worse than DOS programming. If you crash, hit the reset button.
- 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/
| |