Results 1 to 5 of 5

Thread: How to enable core dump

  1. #1
    Join Date
    Feb 2010
    Beans
    51

    How to enable core dump

    To get core dump from my program, I execute the following commands from the terminal:

    ulimit -c unlimited
    myprogram

    After program crash, I see core file in the home directory. How can I make this mode persistent, to have code dump always?

  2. #2
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to enable core dump

    Quote Originally Posted by Alex Farber View Post
    To get core dump from my program, I execute the following commands from the terminal:

    ulimit -c unlimited
    myprogram

    After program crash, I see core file in the home directory. How can I make this mode persistent, to have code dump always?
    hi
    you can find the file limits.conf in /etc/security
    as super user you can edit this file ( at end of the file insert )

    your_username soft core 100000
    your_username hard core 500000

    the values are only an example !
    have a look at --> man limits.conf
    you have to logout and login again to get the new configuration of your limits.

    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  3. #3
    Join Date
    Feb 2010
    Beans
    51

    Re: How to enable core dump

    Thank you. Maybe I can add the command
    ulimit -c unlimited
    to some file which is executed upon login? If it is possible, what file exactly?

    Also, how to write "unlimited" value to limits.conf?
    Last edited by Alex Farber; May 27th, 2010 at 11:46 AM.

  4. #4
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: How to enable core dump

    Try adding it to $HOME/.profile.

  5. #5
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to enable core dump

    Quote Originally Posted by Alex Farber View Post
    Thank you. Maybe I can add the command
    ulimit -c unlimited
    to some file which is executed upon login? If it is possible, what file exactly?

    Also, how to write "unlimited" value to limits.conf?
    hi
    ---> man limits.conf
    All items support the values -1, unlimited or infinity indicating no limit, except for priority and nice.

    it's possible to add the command "ulimit -c unlimited" into your .bashrc.
    but this is not the right place !
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •