Solved

Controlling core file location & name

Posted on 1997-12-12
7
215 Views
Last Modified: 2010-04-21
I have a shell script that starts several processes as
background processes.  Currently when one of them cores it
writes the core file to the same location with the core
filename.  Is there a way to force the core to a particular
directory with a specified name?
0
Comment
Question by:jlargent
  • 3
  • 2
  • 2
7 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2008281
cd /name1; process1 &
cd /name2; process2 &

0
 

Author Comment

by:jlargent
ID: 2008282
That's ok for a few processes, but in my situation there
are more than 10 and I would rather not have multiple
directories if there is any other way.  Also, the processes
live in a common directory so the cmd would be:
cd /name1; /path/process1 &
cd /name2; /path/process2 &
I'm not sure if the core file would be dumped in the
"name1" directory or the "path" directory.
thanks
0
 

Author Comment

by:jlargent
ID: 2008283
Adjusted points to 200
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
ID: 2008284
core file is in the name1 directory.
You must patch your kernel to satisfy your goal.
Sorry for bad news.
0
 

Author Comment

by:jlargent
ID: 2008285
Is patching the kernal the standard way to handle this?
Has this problem never been addressed by anyone else. Is
really common practise that all core files are created
in one area with the same name (thus overwriting previous
core files)?
0
 
LVL 84

Expert Comment

by:ozo
ID: 2008286
cd /name1; /path/process1 || mv core core1.$$ &

(assuming that process1 doesn't fail other than by core dump)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2008287
> Has this problem never been addressed by anyone else.
Well, may be that there are millions of coredumps. But it seems that there is noone who whants to fix them simultaneously :)
My answer or ozo's comment.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now