Solved

finding which core file is generated due to system utility crash

Posted on 2004-04-05
9
219 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

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

Title # Comments Views Activity
Add content to output file 4 58
java ^ examples 8 57
fix34  challenge 9 97
How to convert MFC::CString to UTF8 wchar_t* 10 96
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.
This video discusses moving either the default database or any database to a new volume.

757 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

23 Experts available now in Live!

Get 1:1 Help Now