Counter resource
A Counter resource is a numbered variable, mainly used in Label Format of pools to number volumes.
Examples
Volume numbers that wrap every year
Counter {
Name = Week
Minimum = 1
Maximum = 53
Catalog = MyCatalog
}
Pool {
Name = Weekly
Label Format = "Weekly-${Week+}"
}
Directives
| Directive | Type | Default | Summary | |
|---|---|---|---|---|
| Name | name | required | Name of the counter, used as a variable in Label Format (for example ${Weekly}). | |
| Description | string | Free text describing the counter. | ||
| Minimum | integer | 0 | Value the counter starts with and returns to after Maximum. | |
| Maximum | positive integer | 2147483647 | Highest value; then the counter wraps to Minimum (and increments Wrap Counter). | |
| Wrap Counter | resource | Counter that is incremented whenever this one wraps, for nested numbering such as week within year. | ||
| Catalog | resource | Catalog the value is stored in; without it the counter lives in memory only and restarts at each Director start. |
Name
Key: name · Type: name · Required
Name of the counter, used as a variable in Label Format (for example ${Weekly}).
Counter {
Name = "Weekly"
}
In the console:
configure add counter name=Weekly
Description
Key: description · Type: string
Free text describing the counter.
Counter {
Name = Weekly
Description = "Volume number of the weekly pool"
}
In the console:
configure add counter name=Weekly description="Volume number of the weekly pool"
Minimum
Key: minimum · Type: integer · Default: 0
Value the counter starts with and returns to after Maximum.
Counter {
Name = Weekly
Minimum = 1
}
In the console:
configure add counter name=Weekly minimum=1
Maximum
Key: maximum · Type: positive integer · Default: 2147483647
Highest value; then the counter wraps to Minimum (and increments Wrap Counter).
Counter {
Name = Weekly
Maximum = 52
}
In the console:
configure add counter name=Weekly maximum=52
Wrap Counter
Key: wrapcounter · Type: resource
Counter that is incremented whenever this one wraps, for nested numbering such as week within year.
Counter {
Name = Weekly
Wrap Counter = "Year"
}
In the console:
configure add counter name=Weekly wrapcounter=Year
Catalog
Key: catalog · Type: resource
Catalog the value is stored in; without it the counter lives in memory only and restarts at each Director start.
Counter {
Name = Weekly
Catalog = "MyCatalog"
}
In the console:
configure add counter name=Weekly catalog=MyCatalog
See also: configuration reference, configure, show