[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

finding which core file is generated due to system utility crash

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
eshtiaq
Asked:
eshtiaq
2 Solutions
 
tfewsterCommented:
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
 
while_trueCommented:
the command:
file core
will give you the name of the process which was crashed (on most unix/linux platforms)
0
 
stefan73Commented:
Hi while_true,
combine both:

find / name core -follow -local | xargs file

(-local avoids looping into NFS mounts)

Cheers,
Stefan
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!

 
while_trueCommented:
Hi Stefan,

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

Greetings
Rainer
0
 
eshtiaqAuthor Commented:
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
 
while_trueCommented:
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
 
stefan73Commented:
while_true,
> ./core: core dump, generated from 'cat'

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

Stefan
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now