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!

bandwidth

Discussion in 'General Discussion' started by wafaa, Jun 20, 2014.

  1. wafaa

    wafaa Well-Known Member

    Joined:
    May 14, 2013
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Reseller Owner
    Hello;

    How can i know exactly with ssh, the five cpanel accounts that have a bandwidth consumption more than others.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    There are no native scripts that will output bandwidth usage in an easily readable format from the command line. However, you may find the following command helpful when ran from the /var/cpanel/bandwidth directory:

    Code:
    ls | grep -v "\." | xargs -n 1 -izzz sh -c "echo -n zzz \" = \"; egrep \"^$1\..*\.$2-all\" zzz | awk -F'=' 'START {bytes=0} { bytes+=\$2 } END {print bytes/1024/1024 \" MB\"}'"
    It's referenced from an earlier thread created a few years ago. You would have to adjust if you want it to only output the five accounts with the most usage.

    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