Settings and Statistics¶
Your plugin might need to know information about Traffic Server's
current configuration and performance. The functions described in this
section read this information from the Traffic Server records.yaml
file. Configuration settings are stored in CONFIG
variables and
statistics are stored in PROCESS
variables.
注意
Not all CONFIG
and PROCESS
variables in records.yaml
are
relevant to Traffic Server's configuration and statistics. Therefore,
retrieve only the records.yaml
variables that are documented in
the Administrator's Guide.
To retrieve a variable, you need to know its type (int
, counter
,
float
, or string
). Plugins store the records.yaml
values
as an TSMgmtInt
, TSMgmtCounter
, TSMgmtFloat
, or
TSMgmtString
. You can look up records.yaml
variable types in
the Administrator's Guide.
Depending on the result type, you'll use TSMgmtIntGet
,
TSMgmtCounterGet
, TSMgmtFloatGet
, or TSMgmtStringGet
to
obtain the variable value (see the example for
TSMgmtIntGet()
.
The TSMgmt*Get
functions are: