Unix Programming - Dump file / Core

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2004 > Dump file / Core





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Dump file / Core
Marc

2004-04-26, 12:35 pm

I am trying to reproduce a crash in lab environment. I crashes but I
do not see a dump file that should be there.

What is the filename and the extension of a dumpcore file of a program
named 'server'?

If you start the program through a shell script, does the core resides
in the directory where you started the script, in the directory where
the shell started the application, or in the directory where the
executable resides?
Jem Berkes

2004-04-26, 1:34 pm

> I am trying to reproduce a crash in lab environment. I crashes but I
> do not see a dump file that should be there.
>
> What is the filename and the extension of a dumpcore file of a program
> named 'server'?
>
> If you start the program through a shell script, does the core resides
> in the directory where you started the script, in the directory where
> the shell started the application, or in the directory where the
> executable resides?


On my Linux system, under bash the core files are always named 'core' but
are not produced by default. You may have to set your shell's ulimit to a
high value (see man bash for the ulimit command).
ulimit -c unlimited

AFAIK the core files are written to the working directory of your program,
so you have to make sure that your uid has write access to that path.

--
Jem Berkes
http://www.sysdesign.ca/
Rich Teer

2004-04-26, 2:34 pm

On Mon, 26 Apr 2004, Marc wrote:

> I am trying to reproduce a crash in lab environment. I crashes but I
> do not see a dump file that should be there.


Core files are produced in the current working directory of
the process by default (and called "core", unless a ulimit
has been set. Solaris allows you to configure where core
files go.

--
Rich Teer, SCNA, SCSA

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-online.net
Frank Hickman

2004-04-26, 4:35 pm

"Jem Berkes" <jb@users.pc9.org> wrote in message
news:Xns94D781CD1B627jbuserspc9org@130.179.16.24...
>
> On my Linux system, under bash the core files are always named 'core' but
> are not produced by default. You may have to set your shell's ulimit to a
> high value (see man bash for the ulimit command).
> ulimit -c unlimited
>
> AFAIK the core files are written to the working directory of your program,
> so you have to make sure that your uid has write access to that path.
>
> --
> Jem Berkes
> http://www.sysdesign.ca/


Yep this is how both my Linux box and HPUX box do it.

--
Frank


David Schwartz

2004-04-26, 9:39 pm


"Marc" <marc1917@zonnet.nl> wrote in message
news:840f4b5b.0404260836.421b462b@posting.google.com...

>I am trying to reproduce a crash in lab environment. I crashes but I
> do not see a dump file that should be there.


> What is the filename and the extension of a dumpcore file of a program
> named 'server'?


Ask your system administrator. There is no way we could know how that
particular machine is configured. Did you check your resource limit for core
files?

> If you start the program through a shell script, does the core resides
> in the directory where you started the script, in the directory where
> the shell started the application, or in the directory where the
> executable resides?


Usually the directory in which the shell started the application. Note
that you will not get core dumps for setuid/setgid programs on most
machines. Note also that you must appropriately configure your resource
limit. The 'bash' shell allows 'ulimit -c unlimited', other shells do it
different ways.

What operating system? What shell?

DS


Marc

2004-04-27, 12:35 pm

Jem Berkes <jb@users.pc9.org> wrote

> ulimit -c unlimited


Seems to work!!

By the way, it is a very special build unix thingie. If I say what, my
boss read, my boss knows, I do not know how to ... But problems
solved, as said.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com