Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/var/cpanel/bandwith BUG ?

Discussion in 'Workarounds and Optimization' started by abdelhost77, Nov 27, 2013.

  1. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hello ,
    i notice that /var consuming a lot of space disk , when i further check i found that /var/cpanel/bandwith taking 2G space !

    and what is strange is that i found also data for terminated accounts , which abnormal i think !!

    Is there any tips to fix that ? it is safe to remove this bandwidth file ? or rotate them ?
     
  2. abdelhost77

    abdelhost77 Well-Known Member

    Joined:
    Apr 25, 2012
    Messages:
    109
    Likes Received:
    2
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    For example can i remove bandwith files that have not be updated during last 3 months trough the below command ? ( it will correspond to terminated accounts ? ) supposing that all active accounts in the server receive at least 1 hit in week ( which supposed be logged to bandwith file )

    find -P /var/cpanel/bandwidth -mindepth 1 -maxdepth 1 -mtime '+90' | while read OLDFile; do
    echo "Now deleting ${OLDFile} ..."
    rm -f "${OLDFile}"
    done
     
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,506
    Likes Received:
    1,964
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    You can remove bandwidth data for terminated accounts if that data still exists, but I do not reccomend removing additional data associated with bandwidth.

    Note that the following commands are helpful if you would like to symlink /var/cpanel/bandwidth to a partition (e.g. /home) with more disk space:

    Code:
    mkdir /home/bwtmp; tar -czvf /root/cp-bandwidth-backup.tar.gz /var/cpanel/bandwidth
    mv /var/cpanel/bandwidth/* /home/bwtmp/; rm -rf /var/cpanel/bandwidth
    ln -s /home/bwtmp /var/cpanel/bandwidth
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    156
    Why is cPanel not cleaning up after itself and removing this data after termination anyway??
     
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,506
    Likes Received:
    1,964
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I recommend opening a bug report if you can reproduce this behavior:

    Submit A Bug Report

    Please post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice