How to measure traffic by reseller plan

Created:

2016-11-16 13:16:26 UTC

Modified:

2017-08-08 13:38:16 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to measure traffic by reseller plan

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

How to measure traffic by specific reseller plan for specific period?

Answer

  1. Log in to Plesk database as described here: #213928465 - How to access Plesk database
  2. Use the following MySQL query:
    SELECT SUM(http_in + ftp_in + smtp_in + pop3_imap_in + http_out + ftp_out + smtp_out + pop3_imap_out) AS `Total traffic usage` FROM `DomainsTraffic` AS `dt`
    LEFT JOIN `domains` AS `d` ON d.id = dt.dom_id
    LEFT JOIN `clients` AS `c` ON c.id = d.vendor_id
    LEFT JOIN `Subscriptions` AS `s` ON s.object_type = "client" AND c.id = s.object_id
    LEFT JOIN `PlansSubscriptions` AS `ps` ON ps.subscription_id = s.id
    LEFT JOIN `Templates` AS `t` ON t.id = ps.plan_id WHERE (c.type = 'reseller') AND (`t`.`name` = 'Plan Example') AND (dt.date between '2016-04-01' and '2016-04-05');

Note : replace Plan Example with actual service plan name and specify the period in last line of the query.

Have more questions? Submit a request
Please sign in to leave a comment.