System Administration Guide: IP Services

Gathering Statistical Information

You can use the kstat command to generate statistical information from the IPQoS modules. Use the following syntax:


/bin/kstat -m ipqos-module-name

You can specify any valid IPQoS module name, as shown in Table 37–5. For example, to view statistics that are generated by the dscpmk marker, you use the following form of kstat:


/bin/kstat -m dscpmk

For technical details, refer to the kstat(1M) man page.


Example 36–1 kstat Statistics for IPQoS

Here is an example of possible results from running kstat to obtain statistics about the flowacct module.


# kstat -m flowacct
module: flowacct                        instance: 3     
name:   Flowacct statistics             class:    flacct 
        bytes_in_tbl                    84
        crtime                          345728.504106363
        epackets                        0
        flows_in_tbl                    1
        nbytes                          84
        npackets                        1
        snaptime                        345774.031843301
        usedmem                         256
class: flacct

Gives the name of the class to which the traffic flows belong, in this example flacct.

bytes_in_tbl

Total number of bytes in the flow table. The total number of bytes is the sum in bytes of all the flow records that currently reside in the flow table. The total number of bytes for this flow table is 84. If no flows are in the table, the value for bytes_in_tbl is 0.

crtime

The last time that this kstat output was created.

epackets

Number of packets that resulted in an error during processing, in this example 0.

flows_in_tbl

Number of flow records in the flow table, which in this example is 1. When no records are in the table, the value for flows_in_tbl is 0.

nbytes

Total number of bytes that are seen by this flowacct action instance, which is 84 in the example. The value includes bytes that are currently in the flow table. The value also includes bytes that have timed out and are no longer in the flow table.

npackets

Total number of packets that are seen by this flowacct action instance, which is 1 in the example. npackets includes packets that are currently in the flow table. npackets also includes packets that have timed out—are no longer in the flow table.

usedmem

Memory in bytes in use by the flow table that is maintained by this flowacct instance. The usedmem value is 256 in the example. The value for usedmem is 0 when the flow table does not have any flow records.