?
Solved

Controlling core file location & name

Posted on 1997-12-12
7
Medium Priority
?
225 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 85

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Accepted Solution

by:
ahoffmann earned 600 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 85

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

839 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