- Plesk Onyx for Linux
How to find which are the busiest websites for both email and web traffic/workload?
To get email and web traffic statistics for each domain for one month:
- Connect to the server via SSH.
Execute this command to get statistics for December 2017:
Note : change the following values to get statistics for another year/month: YEAR(tr.date) = 2017 AND MONTH(tr.date) = 12
# for id in `plesk db -e "select id from domains;" -N`; do plesk db "SELECT domains.name, SUM(tr.http_in) as HTTP_IN, SUM(tr.http_out) as HTTP_OUT, SUM(tr.ftp_in) as FTP_IN, SUM(tr.ftp_out) as FTP_OUT, SUM(tr.smtp_in) as SMTP_IN, SUM(tr.smtp_out) as SMTP_OUT, SUM(tr.pop3_imap_in) as POP3_IN, SUM(tr.pop3_imap_out) as POP3_OUT FROM DomainsTraffic tr, domains WHERE tr.dom_id =$id AND domains.id =$id AND YEAR(tr.date) = 2017 AND MONTH(tr.date) = 12;" ; done