Per User Bandwidth
Is it possible to check per user bandwidth in cpanel server command line ?
-
No, You can not check this with your command line. You will have to check this through WHM >> Account Information >> View Bandwidth Usage 0 -
Hello, You can use the Bandwidth::query UAPI function to view an account's bandwidth via the command line. EX: uapi --user=user123 Bandwidth query grouping=domain interval=daily protocols=http%7Cimap%7Csmtp timezone=America%2FChicago
It's documented at: UAPI Functions - Bandwidth::query - Software Development Kit - cPanel Documentation Thank you.0 -
Getting error while run command: 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, line 1.\n" messages: ~ metadata: {} status: 00 -
I have added actual domain name and username instead of domain and username. 0 -
Now it shows nothing in no result: # 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: 10 -
Hello, You may find a command like this is more useful and easier to formulate for what you need: 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.0
Please sign in to leave a comment.
Comments
8 comments