The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to use a core dump file lagigliaivan High Level Programming 2 05-26-2008 09:06 AM
how to view a core dump file vikashtulsiyan High Level Programming 6 01-11-2008 01:15 PM
Core dump in HP-UX.. gyanusoni UNIX for Dummies Questions & Answers 0 09-07-2007 03:29 AM
core dump sudhir patnaik UNIX for Advanced & Expert Users 6 05-26-2006 06:03 AM
help, what is the difference between core dump and panic dump? aileen UNIX for Dummies Questions & Answers 1 06-11-2001 08:08 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-06-2007
pushp.gahlot pushp.gahlot is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 3
core dump file size

Hi All,

is there any way to find out the optimal/would be size of the cor dump file generated by the system while a process got terminated abnormally?

Basically we have been asked to provide the size of the core dump file being generated by the administrators who maintained the UNIX boxes. Currently it is 1GB but it easily exceed this allocated space. So we are looking for bigger suitable size.

Please helo advice.

Thanks,
Pushp.
  #2 (permalink)  
Old 08-06-2007
pushp.gahlot pushp.gahlot is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 3
core dump file size

Hi All,

is there any way to find out the optimal/would be size of the core dump file generated by the system while a process got terminated abnormally?

Basically we have been asked to provide the size of the core dump file being generated by the administrators who maintained the UNIX boxes. Currently it is 1GB but it easily exceeds this allocated space. So we are looking for bigger suitable size.

Please help advice.

Thanks,
Pushp.

Last edited by pushp.gahlot; 08-06-2007 at 09:44 AM..
  #3 (permalink)  
Old 08-06-2007
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,753
How about ensuring that a "limit" won't be gone over?

bash and ksh have a builtin "ulimit" ksh, for example allows you to specify the max possible core size
Code:
ulimit -c <max core size>
on a per process basis.

The size command gives the amount of space the image file (executable) will use
when it is run. If there is a lot of dynamic memory allocation it will not show up.
try: man size

Plus, production code should NOT be dumping core. That is an awful idea. If the code is dumping because of SIGBUS or SIGSEGV, you need to fix it, not allocate more core space. If some admin is terminating the process and forcing core dumps, you might want to look at adopting different procedures.
  #4 (permalink)  
Old 08-06-2007
pushp.gahlot pushp.gahlot is offline
Registered User
  
 

Join Date: Aug 2007
Posts: 3
Thanks Jim.

but i was looking if there is any way we can find out the maximum possible size of generated core file so that we can allocate a 3-4 GB space for core file.

any pointers would be appreciated.

Thanks,
Pushp
  #5 (permalink)  
Old 08-06-2007
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,753
Try instrumenting your code during a couple of test runs:
You can call getrusage() at the end of a run to see the amount of stack and heap memory your program has used. Then you can add the size of the "text" data segment (output of size command).

This sum will be very close to the max core size.

If you are worried only about certain signals causing core, then trap those signals, and in the signal trap call getrusage(). Again we are instrumenting the code.

Remove the instrumentation for production code once you have a handle on the situation.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:03 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0