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 reduce space in usr partition : killall -9 httpd

Discussion in 'Workarounds and Optimization' started by sebans, May 13, 2009.

  1. sebans

    sebans Active Member

    Joined:
    Nov 13, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    I have been suggested to try killing all idle session to save space like this

    I also suggest you try killing all idle apache/mysql sessions/open files and then restarting each service like this:

    killall -9 httpd
    killall -9 mysqld
    service httpd restart
    service mysqld restart

    This typically clears up space in /usr




    can somebody tell me how to do it ? Where should I insert the Killall commands ?

    thanks in advance for your help








    Here is the breakdown of files that are over 20 megs inside of your /usr partition:

    /usr/lib64/libgcj.so.7rh.0.0: 42M
    /usr/lib64/xulrunner-1.9/libxul.so: 22M
    /usr/share/frysk/test-core-x8664: 21M
    /usr/share/frysk/test-core-x86: 21M
    /usr/local/cpanel/cpanel: 32M
    /usr/local/cpanel/logs/access_log: 21M
    /usr/local/cpanel/whostmgr/bin/whostmgr: 35M
    /usr/local/cpanel/whostmgr/bin/xml-api: 27M
    /usr/local/cpanel/whostmgr/bin/whostmgr2: 38M
    /usr/local/cpanel/whostmgr/bin/whostmgr5: 29M
    /usr/local/cpanel/bin/wwwacct: 22M
    /usr/local/cpanel/install/core.27426: 87M
    /usr/local/cpanel/install/core.23158: 87M
    /usr/local/cpanel/install/core.21803: 87M
    /usr/local/cpanel/install/core.5713: 88M
    /usr/local/cpanel/install/core.30176: 87M
    /usr/local/cpanel/install/core.22396: 87M
    /usr/local/cpanel/install/core.497: 87M
    /usr/local/cpanel/install/core.7839: 87M
    /usr/local/cpanel/install/core.23881: 87M
    /usr/local/cpanel/install/core.8720: 87M
    /usr/local/cpanel/install/core.2914: 87M
    /usr/local/cpanel/install/core.6652: 87M
    /usr/local/apache/logs/suexec_log: 152M
    /usr/local/apache/logs/access_log: 116M
    /usr/local/apache/logs/error_log: 492M
    /usr/local/apache/domlogs/atoncer.com-smtpbytes_log: 50M
    /usr/lib/locale/locale-archive: 54M
     
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    You can execute these commands from your shell.

    You can also restart the services from your WHM at Main >> Restart Services
     
  3. StingRay2k01

    StingRay2k01 Active Member

    Joined:
    Jun 15, 2003
    Messages:
    31
    Likes Received:
    1
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    How is restarting apache and mysql going to save space as listed??? That doesn't make sense.

    The biggest space saver will be to rotate your logs regularly. Those are taking the most space. Rotate or reduce them. Check httpd.conf and see what level your error log is set at, maybe you don't need to have it so verbose.


    Also, the "/install/core" files I think you can get rid of, someone correct me if I'm wrong. But I thought they were left overs from upgrades to the kernal.
     
  4. sebans

    sebans Active Member

    Joined:
    Nov 13, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    restarting was intended after try killing idle apache/mysql sessions/open fies.

    I didn't do anything yet except set the logs to rotate and the load was reduced to 75%.


    also suggest you try killing all idle apache/mysql sessions/open files and then restarting each service like this:

    killall -9 httpd
    killall -9 mysqld
    service httpd restart
    service mysqld restart
     
  5. lehels

    lehels Well-Known Member

    Joined:
    Jul 10, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    Just move/erase these dump files:

    /usr/local/cpanel/install/core.27426: 87M
    /usr/local/cpanel/install/core.23158: 87M
    /usr/local/cpanel/install/core.21803: 87M
    /usr/local/cpanel/install/core.5713: 88M
    /usr/local/cpanel/install/core.30176: 87M
    /usr/local/cpanel/install/core.22396: 87M
    /usr/local/cpanel/install/core.497: 87M
    /usr/local/cpanel/install/core.7839: 87M
    /usr/local/cpanel/install/core.23881: 87M
    /usr/local/cpanel/install/core.8720: 87M
    /usr/local/cpanel/install/core.2914: 87M
    /usr/local/cpanel/install/core.6652: 87M
     
  6. sebans

    sebans Active Member

    Joined:
    Nov 13, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    lehels,




    what if I remove the logs, instead ?

    /usr/local/apache/logs/access_log: 116M
    /usr/local/apache/logs/error_log: 492M
     
Loading...

Share This Page