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.

bandwidth

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

  1. wafaa

    wafaa Well-Known Member

    Joined:
    May 14, 2013
    Messages:
    62
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page