System Administration Guide: IP Services

ProcedureHow to Create a File for Flow-Accounting Data

Before you add a flowacct action to the IPQoS configuration file, you must create a file for flow records from the flowacct module. You use the acctadm command for this purpose. acctadm can record either basic attributes or extended attributes in the file. All flowacct attributes are listed in Table 37–4. For detailed information about acctadm, refer to the acctadm(1M) man page.

  1. Assume the Primary Administrator role, or become superuser, on the IPQoS-enabled system.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Create a basic flow-accounting file.

    The following example shows how to create a basic flow-accounting file for the premium web server that is configured in Example 34–1.

    # /usr/sbin/acctadm -e basic -f /var/ipqos/goldweb/ flow
    acctadm -e

    Invokes acctadm with the -e option. The -e option enables the arguments that follow.


    States that only data for the eight basic flowacct attributes is to be recorded in the file.


    Specifies the fully qualified path name of the file to hold the flow records from flowacct.


    Instructs acctadm to enable flow accounting.

  3. View information about flow accounting on the IPQoS system by typing acctadm without arguments.

    acctadm generates the following output:

    Task accounting: inactive
           Task accounting file: none
         Tracked task resources: none
       Untracked task resources: extended
             Process accounting: inactive
        Process accounting file: none
      Tracked process resources: none
    Untracked process resources: extended,host,mstate
                Flow accounting: active
           Flow accounting file: /var/ipqos/goldweb/
         Tracked flow resources: basic
       Untracked flow resources: dsfield,ctime,lseen,projid,uid

    All entries but the last four are for use with the Solaris Resource Manager feature. The next table explains the entries that are specific to IPQoS.



    Flow accounting: active

    Indicates that flow accounting is turned on. 

    Flow accounting file: /var/ipqos/goldweb/

    Gives the name of the current flow-accounting file. 

    Tracked flow resources: basic

    Indicates that only the basic flow attributes are tracked. 

    Untracked flow resources: dsfield,ctime,lseen,projid,uid

    Lists the flowacct attributes that are not tracked in the file.

  4. (Optional) Add the extended attributes to the accounting file.

    # acctadm -e extended -f /var/ipqos/goldweb/ flow
  5. (Optional) Return to recording only the basic attributes in the accounting file.

    # acctadm -d extended -e basic -f /var/ipqos/goldweb/

    The -d option disables extended accounting.

  6. View the contents of a flow-accounting file.

    Instructions for viewing the contents of a flow-accounting file are in Perl Interface to libexacct in System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones.

See Also