Accounting Policy Commands

accounting-policy

Syntax

accounting-policy acct-policy-id

no accounting-policy acct-policy-id

Context

config>log

Description

This command creates an access or network accounting policy. An accounting policy defines the accounting records that are created.

Access accounting policies are policies that can be applied to one or more service access points (SAPs). Changes made to an existing policy, using any of the sub-commands, are applied immediately to all SAPs where this policy is applied.

Network accounting policies are policies that can be applied to one or more network ports. Changes made to an existing policy, using any of the sub-commands, are applied immediately to all network ports where this policy is applied.

If an accounting policy is not specified on a SAP or network port, accounting records are produced in accordance with the access or network policy designated as the default. For more information, see the default command.

The no form of the command deletes the policy from the configuration. The accounting policy cannot be deleted unless it is removed from all the SAPs or network ports where the policy is applied. Use the show>log>accounting-policy command to see where an accounting policy is used and which accounting policy is the default policy.

Default

n/a

Parameters

acct-policy-id

the policy ID that uniquely identifies the accounting policy, expressed as a decimal integer

Values

1 to 99

collection-interval

Syntax

collection-interval minutes

no collection-interval

Context

config>log>accounting-policy

Description

This command configures the interval between collection of accounting records.

Parameters

minutes

the interval, in minutes, at which accounting records are collected

Values

1 to 120

default

Syntax

[no] default

Context

config>log>accounting-policy

Description

This command configures the accounting policy specified by acct-policy-id to be the default accounting policy that is used by all SAPs or network ports that do not have a specified accounting policy.

For a SAP or network port, if no accounting policy is explicitly specified and a default policy is defined, records are produced as per the default accounting policy. If no default policy is defined, no records are collected. However, if an accounting policy is explicitly defined for a SAP or network port, records are collected for that SAP or network port.

Only one access accounting policy ID can be designated as the default access policy. Similarly, only one network accounting policy ID can be designated as the default network accounting policy.

The record-name must be specified before configuring an accounting policy as default.

If a policy is configured as the default policy, a no default command must be issued before a new default policy can be configured.

Default accounting policies cannot be explicitly applied. For example, if default is set for accounting-policy 10, policy 10 cannot be assigned.

The no form of the command removes the default pol icy designation from the policy ID. The accounting policy is removed from all SAPs or network ports that do not have a policy explicitly defined. If there is no policy defined as the default policy, no accounting policy is applied to those entities.

record

Syntax

record record-name

no record

Context

config>log>accounting-policy

Description

This command adds the record name to the accounting policy, specifying which records to forward to the configured accounting file (identified by log-file-id). Each accounting policy can only contain one record name. To obtain a list of all record types that can be configured, use the show>log>accounting-records command.

ALU-12>config>log# show log accounting-records
==========================================================
Accounting Policy Records
==========================================================
Record # Record Name                        Def. Interval
----------------------------------------------------------
1        service-ingress-octets             5
2        service-egress-octets              5
3        service-ingress-packets            5
4        service-egress-packets             5
5        network-ingress-octets             15
6        network-egress-octets              15
7        network-ingress-packets            15
8        network-egress-packets             15
11       combined-network-ing-egr-octets    15
12       combined-service-ing-egr-octets    5
13       complete-service-ingress-egress    5
32       saa                                5
54       complete-network-ing-egr           15
==========================================================
ALU-12>config>log#

The record-name must be specified before configuring an accounting policy as default.

To configure an accounting policy for access ports, select a service record (for example, service-ingress-octets). To change the service record to another service record, re-enter the record command with the new record-name to replace the old record-name.

When configuring an accounting policy for network ports, select a network record. To change the network record to another network record, re-enter the record command with the new record-name to replace the old record-name.

Only one record may be configured in a single accounting policy. If changing the record switches it from network to service, or from service to network, the old record-name must be removed using the no form of this command. For example, to change an accounting policy configuration from a network-egress-octets record to a service-ingress-octets record, use the no record command and then enter the service-ingress-octets record.

Note:

Collecting excessive statistics can adversely affect CPU usage and take up large amounts of storage space.

The no form of the command removes the record from the policy.

Default

n/a

Parameters

record-name

the accounting record name

to

Syntax

to file log-file-id

to no-file

Context

config>log>accounting-policy

Description

This command specifies the destination for the accounting records selected for the accounting policy.

Default

No destination is specified

Parameters

log-file-id

the log file ID specifies the destination for the accounting records associated with this accounting policy. The characteristics of the log file ID, such as rollover and retention intervals, must have already been defined in the config>log>file-id context. A log file ID can only be used once.

The file is generated when the log file ID is first referenced. This command identifies the type of accounting file to be created. If the to command is executed while the accounting policy is in operation, it becomes active during the next collection interval.

Values

1 to 99