statGroup

statGroup - gets the statistics on a set of ports.

SYNOPSIS

statGroup sub-command options

DESCRIPTION

The statGroup command is used to create a group of ports for the purpose of retrieving all of the statistics from the group of ports at the same time. Statistics retrieved through the use of the statGroup get sub-command are accessed through the use of the statList command.

STANDARD OPTIONS
numPorts

Read-only. Indicates the number of ports currently in the list.

COMMANDS

The statGroup command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.

statGroup add chassisID cardID portID

Adds the indicated port to the list of ports in the group.

statGroup del chassisID cardID portID

Deletes the indicated port from the list of ports in the group.

statGroup cget option

Returns the current value of the configuration option given by option. Option may have any of the values accepted by the statGroup command.

statGroup get

Gets all of the valid statistics associated with each of the ports in the group. The group is formed by successive calls to statGroup add. The values of the statistics are available through the use of the statList command.

statGroup setDefault

Resets the list to empty.

EXAMPLES

# add ports to get stats on

statGroup setDefault

foreach port $portList {

scan $port "%d %d %d" c l p

statGroup add $c $l $p

}

# get the stats

if {[statGroup get]} {

ixPuts "Error getting stats for this group"

set retCode 1

}

# read stats

statList setDefault

foreach port $portList {

scan $port "%d %d %d" c l p

if {[statList get $c $l $p]} {

continue

}

ixPuts "Frames transmitted: \

[statList cget -framesSent]"

if {[statList getRate $c $l $p]} {

continue

}

ixPuts "Transmit rate: [statList cget -framesSent]"

}

SEE ALSO

statList, statWatch, stat