Traffic usage. Technical details. (ISPmanager)

From ISPWiki

Jump to: navigation, search

The /usr/local/ispmgr/sbin/traffic.pl script is used for collecting traffic statistics. The script runs from cron and analyses log files of various services, such as the web-server, FTP-server, incoming and outgoing mail servers. As the log-files of these services only provide information about the data transferred through the TCP-protocol, total traffic consumption may be less than IP statistics of the entire server. Besides, this difference may be caused by incorrect logging or large amount of traffic generated by other applications.

To start collecting traffic, you need to provide the path to the corresponding log file:

path trafficLog_TYPE /path/to/mask-file

TYPE may have the following values:

  • xferlog - xferlog FTP-logs.
  • maillog - maillog logs (Sendmail, Qpopper, Dovecot).
  • exim4 - Exim logs.
  • httpdacct - log for apache: /usr/local/ispmgr/var/httpd-acct.log. We strongly recommend that you use this log instead of apache, as it provides additional information, such as HEAD requests.

You can provide several logs for each type.

/path/to/mask-file is a mask for the full path to the logs and their archives, such as /var/log/maillog*.

The following log path values are used by default:

path trafficLog_maillog /var/log/maillog* path trafficLog_xferlog /var/log/xferlog* path trafficLog_httpdacct /usr/local/ispmgr/var/httpd-acct.log

Was this helpful? Yes | No
Personal tools