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.

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:
    187
    Likes Received:
    1
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    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
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  6. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  8. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    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.
     
Loading...

Share This Page