[an error occurred while processing this directive][an error occurred while processing this directive]

Configuring Class Usage Profiles

To collect class usage statistics, perform the tasks described in these sections:

Configuring a Class Usage Profile

You can configure the class usage profile to collect statistics for particular source and destination classes.

To configure the class usage profile to filter by source classes, include the source-classes statement at the [edit accounting-options class-usage-profile profile-name] hierarchy level:

[edit accounting-options class-usage-profile profile-name]source-classes {source-class-name;}

To configure the class usage profile to filter by destination classes, include the destination-classes statement at the [edit accounting-options class-usage-profile profile-name] hierarchy level:

[edit accounting-options class-usage-profile profile-name]destination-classes {destination-class-name;}

Configuring the File Information

Each accounting profile logs its statistics to a file in the /var/log directory.

To specify which file to use, include the file statement at the [edit accounting-options class-usage-profile profile-name] hierarchy level:

[edit accounting-options class-usage-profile profile-name]file filename;

You must specify a filename for the source class usage profile that has already been configured at the [edit accounting-options] hierarchy level. You can also specify a filename for the destination class usage profile configured at the [edit accounting-options] hierarchy level.

Configuring the Interval

Each interface with a class usage profile enabled has statistics collected once per interval specified for the accounting profile. Statistics collection time is scheduled evenly over the configured interval. To configure the interval, include the interval statement at the [edit accounting-options class-usage-profile profile-name] hierarchy level:

[edit accounting-options class-usage-profile profile-name]interval;

Creating a Class Usage Profile to Collect Source Class Usage Statistics

To create a class usage profile to collect source class usage statistics:

[edit]accounting-options {class-usage-profile scu-profile1;file usage-stats;interval 15;source-classes {gold;silver;bronze;}}

The class usage profile, scu-profile1, writes data to the file usage_stats. The file might look like the following:

#FILE CREATED 976825278 2000-12-14-20:21:18
#profile-layout, scu_profile,epoch-timestamp,interface-name,source-class,
packet-count,byte-count
scu_profile,980313078,xe-1/0/0.0,gold,82,6888
scu_profile,980313078,xe-1/0/0.0,silver,164,13776
scu_profile,980313078,xe-1/0/0.0,bronze,0,0
scu_profile,980313678,xe-1/0/0.0,gold,82,6888
scu_profile,980313678,xe-1/0/0.0,silver,246,20664
scu_profile,980313678,xe-1/0/0.0,bronze,0,0

Creating a Class Usage Profile to Collect Destination Class Usage Statistics

To create a class usage profile to collect destination class usage statistics:

[edit]accounting-options {class-usage-profile dcu-profile1;file usage-statsinterval 15;destination-classes {gold;silver;bronze;}}

The class usage profile, dcu-profile1, writes data to the file usage-stats. The file might look like the following:

#FILE CREATED 976825278 2000-12-14-20:21:18
#profile-layout, dcu_profile,epoch-timestamp,interface-name,destination-class,
packet-count,byte-count
dcu_profile,980313078,xe-1/0/0.0,gold,82,6888
dcu_profile,980313078,xe-1/0/0.0,silver,164,13776
dcu_profile,980313078,xe-1/0/0.0,bronze,0,0
dcu_profile,980313678,xe-1/0/0.0,gold,82,6888
dcu_profile,980313678,xe-1/0/0.0,silver,246,20664
dcu_profile,980313678,xe-1/0/0.0,bronze,0,0
...
#FILE CLOSED 976826178 2000-12-14-20:36:18

Published: 2010-04-27

[an error occurred while processing this directive]