A reseller hits their monthly bandwidth cap on the 28th and suspends all their accounts. Two days later they ask why the bandwidth counter shows 60% used when they’re suspended — the answer is that the counter aggregates several days of stats and the suspension event isn’t where bandwidth accounting stops. Reseller bandwidth in WHM is enforced at the aggregate level, the counters draw from multiple sources, and the reset is calendar-month, not 30-day rolling.
What’s happening
A reseller’s bandwidth cap is set on the reseller account itself, separate from per-account caps in the packages they sell. Both layers apply: an individual account hits its package cap and gets suspended (account-level), or the reseller’s total across all their accounts hits the reseller cap and the whole reseller gets suspended (reseller-level). Bandwidth comes from three sources — Apache access logs, Exim mail logs, and FTP transfer logs — aggregated by cpanellogd into per-account daily files. The counter you see in WHM is the sum of these for the current calendar month.
How to verify
Audit the reseller’s current bandwidth usage and the cap:
whmapi1 get_reseller_data user=acmevpn
whmapi1 listaccts search=acmevpn searchtype=owner --output=json | jq -r '.data.acct[] | "\(.user) \(.diskused) \(.bwlimit)"'
cat /var/cpanel/bandwidth/acme.bw
ls /var/cpanel/bandwidth_cache/
whmapi1 get_bandwidth_usage_for_user user=acme
The get_reseller_data output shows the configured cap and the current usage. Per-account bandwidth is in /var/cpanel/bandwidth/. The reseller’s total should equal the sum of their accounts; if it doesn’t, the cache is stale.
The fix
- Set the reseller cap through
whmapi1 setresellerlimits user=acmevpn bwlimit=10737418240(in bytes; 10 GiB shown). To remove the cap:bwlimit=0. - Per-account caps in packages are independent. A reseller with a 10 GiB cap selling a 5 GiB-per-account package can host two accounts maxed out; the third would hit the reseller cap before its own.
- Force a counter refresh if the cache looks stale:
/usr/local/cpanel/bin/dcpumon-wrapper --forcerecomputes the per-account bandwidth from the daily files. - For mid-month adjustments — granting overage relief for a customer who exceeded — increase both the package cap (so the individual account stays open) and the reseller cap (so the aggregate doesn’t trip):
modifyacct user=acme bwlimit=20000000000andsetresellerlimits user=acmevpn bwlimit=20000000000. - The monthly reset runs on the first of each calendar month at midnight server local time. Set the server timezone to your billing timezone (
timedatectl set-timezone America/Toronto) to avoid the reset firing on the wrong day for some accounts.
Bandwidth budgets across many resellers are a per-account, per-package, per-reseller, per-server problem — Stack Harbor’s agency partner practice aggregates the views into one dashboard so resellers see usage trajectory before they hit the cap, not after.