Solved

finding which core file is generated due to system utility crash

Posted on 2004-04-05
9
222 Views
Last Modified: 2013-12-26
I want to find out the all the core files in my unix system that are generated by the system utilities.

now i know how to find the files with name 'core'. but how to find the file that are specifically the result of some system util crash.

thanx in advance
eshtiaq.
0
Comment
Question by:eshtiaq
9 Comments
 
LVL 20

Expert Comment

by:tfewster
ID: 10763584
core files are owned by the user who was running the process, so `find / -name core  -user root  -print`  might give you what you need
0
 
LVL 1

Accepted Solution

by:
while_true earned 25 total points
ID: 10763826
the command:
file core
will give you the name of the process which was crashed (on most unix/linux platforms)
0
 
LVL 12

Assisted Solution

by:stefan73
stefan73 earned 25 total points
ID: 10764251
Hi while_true,
combine both:

find / name core -follow -local | xargs file

(-local avoids looping into NFS mounts)

Cheers,
Stefan
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:while_true
ID: 10764330
Hi Stefan,

that's exactly what I wanted to propose (but didn't articulate)

Greetings
Rainer
0
 

Author Comment

by:eshtiaq
ID: 10765279
Its all gr8 but how m i going to know that this file is generated by a system util or not. a system util like cat can be invoked by any user. if cat is crashed a core file is generated. how to identify that file.

thanx guys
eshtiaq
0
 
LVL 1

Expert Comment

by:while_true
ID: 10765454
It's like it is described in the comments above:
You can find a core file and you can examine it with the command 'file'. This will give you a printout like

./core: core dump, generated from 'cat'

and the ownership of the file 'core' gives you the user name which was executing 'cat' when it crashed.

BTW, system utils are normally not crashing that much. Why do you need to identify core files produced by crashed system commands ?
0
 
LVL 12

Expert Comment

by:stefan73
ID: 10765848
while_true,
> ./core: core dump, generated from 'cat'

Yes, file is basically reading out argv[0] of a core file.

Stefan
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

830 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