accounting-policy policy-id
no accounting-policy policy-id
config>log
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode.
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 subcommands, 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, then accounting records are produced in accordance with the access policy designated as the default. If a default access policy is not specified, then no accounting records are collected other than the records for the accounting policies that are explicitly configured.
Network accounting policies are policies that can be applied to one or more network ports, network IP interfaces and SDPs. Any changes made to an existing policy, using any of the subcommands, will be applied immediately to all network ports, IP interfaces or SDPs where this policy is applied.
If no accounting policy is defined on a network port, network IP interface and SDP, accounting records will be produced in accordance with the default network policy as designated with the default command. If no network default policy is created, then no accounting records will be collected other than the records for the accounting policies explicitly configured.
On the 7210 SAS, a total of 21 accounting records are available. There are five types of accounting policies:
access
access port
network
network interface
SDP (not supported on platforms operating in access-uplink mode)
When creating accounting policies, one access, one access port, one network, one network interface, and one SDP 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.
Specifies the policy ID that uniquely identifies the accounting policy, expressed as a decimal integer.
collection-interval minutes
no collection-interval
config>log>accounting-policy
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode.
This command configures the accounting collection interval.
Specifies the interval between collections, in minutes.
[no] default
config>log>accounting-policy
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode.
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 will be collected other than the records for the accounting policies that are explicitly configured.
When creating accounting policies, one access, one access port, one network, one network interface, and one SDP 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, then 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 will be removed from all access or network object ports that do not have this policy explicitly defined.
[no] record record-name
config>log>accounting-policy
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode.
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.
To configure an accounting policy for SAPs, select the access type accounting records such as service-ingress-packets; for access ports, select access port type records, such as access-egress-packets; for network ports select network type records, such as network-egress-packets; for IP interfaces, select network interface type records, such as network-interface-ingress-packets; and for SDP and SDP bindings select SDP type records, such as complete-sdp-ingress-egress.
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-octets record, to change it to service-ingress-octets, use the no record command under the accounting policy to remove the old record and then enter the service-ingress-octets record.
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.
Specifies the accounting record name.
The following output is an example of show accounting records for 7210 SAS platforms.
Sample output for 7210 SAS-Sx 10/100GE*A:7210SAS>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
14 combined-sdp-ingress-egress 5
15 complete-sdp-ingress-egress 5
32 saa 5
56 complete-pm 5
101 network-interface-ingress-octets 15
102 network-interface-ingress-packets 15
103 combined-network-interface-ingress 15
104 access-egress-packets 5
105 access-egress-octets 5
106 combined-access-egress 5
107 combined-network-egress 15
108 combined-service-egress 5
===========================================================
*A:7210SAS>show>log#
to file file-id
config>log>accounting-policy
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode
This command specifies the destination for the accounting records selected for the accounting policy.
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 only be used 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.
log-memory
[no] log-memory
config>log>accounting-policy
Supported on all 7210 SAS platforms as described in this document, including those configured in the access-uplink operating mode.
If the user specifies use of log-memory, the system allocates 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 when temporary storage location gets full.
The accounting records held in the temporary storage are lost on a reboot (either due to loss of power or due to user action).