centos core dump file

Results 1 to 2 of 2
  1. #1
    Proficient Member Revy is offline
    MemberRank
    Oct 2011 Join Date
    164Posts

    angry centos core dump file

    hi
    how to disable centos core dump files?
    it eats up all the free space on a server in the root folder, and home/cabal folder


  2. #2
    Account Upgraded | Title Enabled! luis R is offline
    MemberRank
    Nov 2015 Join Date
    467Posts

    Re: centos core dump file

    You need to execute ulimit -c 0 in the script that starts the webserver, probably /etc/init.d/apache or /etc/init.d/httpd. Place it near the top, but don't make it the first line.




    Alternatively you can change the way the core dump is written, so that subsequent core dumps overwrite the previous instead of creating a new file. Add these lines to /etc/sysctl.conf:




    kernel.core_uses_pid = 0

    kernel.core_pattern = core




    and run sysctl -p. Now the core dumps will be named simply core.




    You could now also create a zero-sized file owned by root with no write permissions; as the core dump is written with the privileges of the process owner, it won't be able to overwrite that file, hence no core dump.


    - - - Updated - - -

    maybe this is better...

    http://thesystemadministrator.net/cpanel/how-to-disable-core-dumps-on-linux-servers



Advertisement