| Collect statistics on Agent operation.
This Plugin should be included in each Agent for which you want to collect statistics.
Note that some statistics are per-Node however.
This plugin is driven by control tasks, sent from a single instance of the
MetricsInitializerPlugin .
Statistics are written to the standard log file, and also written, one line per sample,
to a separate statistics results file.
The file written is named _results.txt.
If provided, the first parameter indicates the directory
in which to write the file. By default, it is written
in the working directory.
The following statistics are always written:
Sample length in seconds
CPU seconds used by Node during sample
(NOTE: This CPU statistic required the separate CpuClock shared library,
included with the this module. If you do not compile and install
this library, you will see a warning exception, which can be ignored.
x1
Memory used by Node in Megabytes
Total memory allocated to the Node in megabytes
Then come some statistics recorded only if the MessageStatisticsService was requested,
which is the default setting:
Message Queue Length (a per-Node statistic)
MessageBytes Sent (per-Node)
Messages sent (per-Node)
Then this statistic is always written:
Count of non-Metrics related Tasks with an associated high-confidence AllocationResult
Optional argument, statistics: If a second optional parameter is given, the
plugin will count the tasks with the given Verb that go by.
It will also count the time since the first task with that Verb went by.
For example, use this to count the Transport tasks, or to see how long
after a DetermineRequirements Task things get busy.
So this optional argument results in 3 additional statistics:
Time since first Task with the Verb
Number of Tasks in this interval with the verb
Total Tasks seen with the verb
Other statistics are gathered from the various services which provide
measurements.
These statistics can be turned on/off via additional optional 1/0 arguments.
By default however, only the basic set of statistics is gathered.
First, Blackboard statistics (off by default):
Count of Assets on this Agent's Blackboard
PlanElements on this Blackboard
Tasks on the Blackboard
Total Objects on this Blackboard
Prototype Registry (off by default):
Cached Prototypes
Property Providers
Prototype Providers
Node Metrics (off by default):
Active threads in the COUGAAR group (a per-Node stat)
Free memory (bytes) in this Node's allocation
Total memory (bytes) in this Node's allocation
Message Watcher (off by default):
Directives received by this Agent
Directives sent
Notifications received by this Agent
Notifications sent by this Agent
So the full usage is:
MetricsPlugin Usage: [[],[],
[<1 or 0>], [<1 or 0>],[<1 or 0>],[<1 or 0>],[<1 or 0>]] -- where the [1/0] indicates
turning on or off the following services for Metrics collection: BlackboardService,
PrototypeRegistryService, NodeMetricsService, MessageStatsService, and
MessageWatcherService. Default is to use only the MessageStatsService
See Also: CSMARTPlugin See Also: MetricsConstants See Also: MetricsInitializerPlugin |