How to get a traffic usage report for a custom period in Plesk?




  • Avatar
    Nan Dee

    Base on query #2, how can we specify to only display sites with 0 traffic from all cases (http_in, http_out, ftp_in, ftp_out, smtp_in, smtp_out, pop3_impa_in, pop3_imap_out) of a required period?

    Comment actions Permalink
  • Avatar
    Nikita Nikushkin

    Hi @Nan Dee,

    Domains with all 0 stats for the specific period are not present in the "DomainsTraffic" table. If the domain receives any kind of traffic, then after Daily Task execution, the "DomainsTraffic" table is updated with the corresponding traffic type for the required date

    So, to get a list of domains which have no any kind of traffic for the required period, the next request can be used:

    # plesk db "select name from domains where id not in (select distinct dom_id from DomainsTraffic where date>='2017-03-01' AND date<='2019-03-20')"

    Do not forget to change the dates to the correct one

    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request