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!

Per User Bandwidth

Discussion in 'cPanel Developers' started by Osama Tariq, May 30, 2016.

Tags:
  1. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    Is it possible to check per user bandwidth in cpanel server command line ?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,785
    Likes Received:
    82
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    No, You can not check this with your command line. You will have to check this through WHM >> Account Information >> View Bandwidth Usage
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,660
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    Getting error while run command:

    Code:
    root@server [~]# uapi --user=username Bandwidth query grouping=domain.com interval=daily protocols=http%7Cimap%7Csmtp timezone=America%2FChicago
    ---
    apiversion: 3
    func: query
    module: Bandwidth
    result:
      data: ~
      errors:
        - "Invalid “grouping”: “domain.com”! at /usr/local/cpanel/Cpanel/BandwidthDB/Read.pm line 239, <STDIN> line 1.\n"
      messages: ~
      metadata: {}
    
      status: 0
    
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,660
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have added actual domain name and username instead of domain and username.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,660
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    Now it shows nothing in no result:

    Code:
    # uapi --user=ghckteum Bandwidth query grouping=domain interval=daily protocols=http%7Cimap%7Csmtp timezone=America%2FChicago---
    apiversion: 3
    func: query
    module: Bandwidth
    result:
      data: {}
    
      errors: ~
      messages: ~
      metadata: {}
    
      status: 1
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,660
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You may find a command like this is more useful and easier to formulate for what you need:

    Code:
    uapi --user=$username Bandwidth query grouping=domain interval=daily
    This shows the total bandwidth usage for the account instead of choosing specific protocols.

    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