[lkml]   [1998]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/sys/kernel/corename
On Tue, 22 Dec 1998 wrote:

> I'm working on a "/proc/sys/kernel/corename" used to change
> the filename of a coredump. Ie. you echo something to the above
> file and thats what the corefile will be called.
> This has been discussed in an earlier thread and the idea to
> use %<whatever> came up, for example %p would expand to the coredumping
> process pid. I am also trying to conform to the codes used by /bin/ps.
> My problem is how to get the values for certain of these codes, if
> anyone has any suggestions of an easy way to get the bellow values
> while in elf_core_dump() (in linux/fs/binfmt_elf.c).
> I have been using the values in "task_struct *current" extensively
> so its possible that some (all?) of these values can be found in there.
> If so, please point me in the right direction.
> Problem values:
> coredumping processes: args,elapsed time
> user owning the coredumping processes: username,groupname,tty

I would be astonished if any names (user, group, or tty) were available
within the kernel. (Tty names would probably be available in a devfs
environment, though.) uids and gids, yes.

This core discussion, and your mention of names, leads me to think of a
completely different solution: a user-space daemon that can perform "Just
in time debugging", as NT refers to it: connecting up to an application
that has crashed. The obvious default is a core dump, but it should also
be possible to hook a real debugger up. Once user-space code is performing
the dump (or at least responsible for triggering the dump), gaining access
to usernames and suchlike is trivial.

I'm not sure whether it would be feasible to rewrite the core dumping as a
user-space operation, or just give the daemon the ability to trigger a
dump with a specified name. The debugger connection facility (along with
the rest of this, I suppose) probably belongs in the ptrace system.

Kenneth Albanowski (, CIS: 70705,126)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:46    [W:0.043 / U:1.064 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site