Accounting policy commands

accounting-policy

Syntax

accounting-policy policy-id

no accounting-policy policy-id

Context

config>log

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command enables 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 SAPs or access ports.

Changes made to an existing policy, using any of the sub-commands, are applied immediately to all SAPs or access ports where this policy is applied.

If an accounting policy is not specified on a SAP or an access port, accounting records are produced in accordance with the access policy designated as the default. If a default access policy is not specified, no accounting records are collected other than the records for the accounting policies that are explicitly configured.

Network accounting policies can be applied to one or more network ports. Any changes made to an existing policy, using any of the subcommands, are immediately applied to all network ports where this policy is applied.

If no accounting policy is defined on a network port, accounting records are produced in accordance with the default network policy as designated with the default command. If no network default policy is created, no accounting records are collected other than the records for the accounting policies explicitly configured.

A total of 16 accounting records are available on the 7210 SAS-D. A total of 17 accounting records are available on the 7210 SAS-Dxp.

There are three types of accounting policies:

  • access

  • access port

  • network

When creating accounting policies, one access, access port, and network accounting policy can be defined as default. If statistics collection is enabled on an accounting object, and no accounting policy is applied, the respective default accounting policy is used. If no default policy is defined, no statistics are collected unless a specifically defined accounting policy is applied.

The no form of this command deletes the policy from the configuration. The accounting policy cannot be removed unless it is removed from all the SAPs, network ports, or channels where the policy is applied.

Parameters

policy-id

Specifies 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

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the accounting collection interval.

Parameters

minutes

Specifies the interval between collections, in minutes.

Values

5 to 120

A range of 1 to 4 is only allowed when the record type is set to SAA.

default

Syntax

[no] default

Context

config>log>accounting-policy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the default accounting policy to be used with all SAPs that do not have an accounting policy.

If no accounting policy is defined on an access or network object, accounting records are produced in accordance with the default access policy. If no default access policy is created, then no accounting records are collected other than the records for the accounting policies that are explicitly configured.

When creating accounting policies, one access, one access port, and one network accounting policy can be defined as default.

The record name must be specified before assigning 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.

The no form of this command removes the default policy designation from the policy ID. The accounting policy is removed from all access or network object ports that do not have this policy explicitly defined.

record

Syntax

[no] record record-name

Context

config>log>accounting-policy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command adds the accounting record type to the accounting policy to be forwarded to the configured accounting file. A record name can only be used in one accounting policy. To obtain a list of all record types that can be configured, use the show log accounting-records command.

The following is an output sample for the 7210 SAS-D and 7210 SAS-Dxp.

A:7210-SAS>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
10       combined-service-ingress           5
11       combined-network-ing-egr-octets    15
13       complete-service-ingress-egress    5
32       saa                                5
36       access-egress-packets              5
37       access-egress-octets               5
38       combined-access-egress             5
39       combined-network-egress            15
40       combined-service-egress            5
==========================================================
A:7210-SAS>show>log#

The following is an output sample for 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, or 7210 SAS-K 3SFP+ 8C.

*A:7210SASk>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
10       combined-service-ingress           5
11       combined-network-ing-egr-octets    15
13       complete-service-ingress-egress    5
32       saa                                5
58       combined-network-egress            15
59       combined-service-egress            5
===========================================================
*A:7210SASk>show>log#

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

To configure an accounting policy for access ports, select access port type records such as access-egress packets. When changing the record name to another access port record, the record command with the new record name can be entered, and it replaces the old record name.

When configuring an accounting policy for network ports, a network record should be selected. When changing the record name to another network record, the record command with the new record name can be entered and it replaces the old record name.

If the change required modifies the record from one type to another, the old record name must be removed using the no form of this command.

Only one record may be configured in a single accounting policy. For example, if an accounting-policy is configured with an access-egress-packets record, to change it to service-ingress-octets, use the no record command under the accounting-policy to remove the old record and enter the service-ingress-octets record.

Note:

Collecting excessive statistics can adversely affect the CPU utilization and take up large amounts of storage space

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

Parameters

record-name

Specifies the accounting record name.

to

Syntax

to file file-id

Context

config>log>accounting-policy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

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

Parameters

file-id

This option specifies the destination for the accounting records selected for this destination. The characteristics of the file-id must have already been defined in the config>log>file context. A file-id can be used only once.

The file is generated when the file policy is referenced. This command identifies the type of accounting file to be created. The file definition defines its characteristics.

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

log-memory

Syntax

log-memory

[no] log-memory

Context

config>log>accounting-policy

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command enables the system to allocate some RAM (that is, volatile memory) as a temporary storage to write accounting records every collection-interval. The accounting records are moved from the temporary storage to the accounting file on non-volatile memory (that is, flash), when either the rollover-interval expires or the temporary storage location gets full.

Note:

The accounting records held in the temporary storage is lost on a reboot (either as a result of loss of power or as a result of user action).