The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to disable core files?

Discussion in 'General Discussion' started by zigzam, Mar 10, 2009.

  1. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    How can you disable core files from being created on linux (centos+redhat)?

    I saw methods using the apache config file, but that only works with apache 1 and I haven't found one that works with apache 2.
     
  2. WebHostDog

    WebHostDog Well-Known Member

    Joined:
    Sep 3, 2006
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    Hello Zigzam.
    Add this in /etc/sysctl.conf


    kernel.core_uses_pid = 0
    kernel.core_pattern = /dev/null


    and:

    sysctl -p
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    It's probably better to use a trailing slash and then you only need the one directive:

    kernel.core_pattern = /dev/null/

    A couple of caveats:

    1. This won't work on a Virtuozzo VPS
    2. You should really inspect the core dump and fix the underlying problem
     
  4. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    So all that's needed is:

    It is a shared server with a few hundred accounts. Too difficult to investigate every core file.
     
  5. WebHostDog

    WebHostDog Well-Known Member

    Joined:
    Sep 3, 2006
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Website Owner
    Hello,
    Yes on a Virtuozzo should be enabled for the Hardware Node.
     
Loading...

Share This Page