You can use the extended accounting facility to set up network accounting on the system. Network accounting involves capturing statistics about network traffic in a log file. You can maintain records of traffic for tracking, provisioning, consolidation, and billing purposes. Later, you can see the log file to obtain historical information about network use over a period of time.
To set up network accounting, use the extended accounting facility's acctadm command. For more information, see the acctadm (1M) man page. After you have completed setting up network accounting, use the flowstat command to record traffic statistics.