Solved

Controlling core file location & name

Posted on 1997-12-12
7
214 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
Comment Utility
cd /name1; process1 &
cd /name2; process2 &

0
 

Author Comment

by:jlargent
Comment Utility
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
Comment Utility
Adjusted points to 200
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 51

Accepted Solution

by:
ahoffmann earned 200 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
> 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
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.

763 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

14 Experts available now in Live!

Get 1:1 Help Now