- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::ns::stats::Collector
::ns::stats::Collectorcreate ...
Defined in
Class Relations
Methods (to be applied on instances)
cpuCapacity (scripted, public)
<instance of ns::stats::Collector> cpuCapacity
Inspect host logical CPUs, process affinity and visible cgroup v1/v2 CPU quotas, cpusets and throttling counters. effectiveCores is the minimum known ceiling, not reserved or guaranteed CPU capacity. Missing probes remain unknown and are reflected in constraint completeness and reasons. Counters can include other processes or sibling cgroups; do not sum ancestor counters as independent process usage. Does not change limits.
- Returns:
- Dictionary of visible CPU ceilings, effectiveCores, constraint completeness, cumulative cgroup throttling counters and limitations; unavailable values are empty.
- Testcases:
- No testcase defined.
describe (scripted, public)
<instance of ns::stats::Collector> describe [ -server server ]
Return a dictionary describing the NaviServer process, virtual servers, connection pools and network drivers. An optional server argument restricts virtual-server data; process-wide information retains its process scope. Availability fields identify optional information that could not be collected. Does not start sampling or modify the sampling baseline.
- Switches:
- -server (optional)
- Optional virtual-server name; empty selects all configured servers. Process and driver information remain process-wide.
- Returns:
- Topology dictionary with schemaVersion, scope, process, servers, drivers and availability information.
- Testcases:
- No testcase defined.
snapshot (scripted, public)
<instance of ns::stats::Collector> snapshot [ -server server ]
Collect current gauges, cumulative counters, allocator statistics and thread CPU times into a timestamped dictionary. The timestamp is in epoch microseconds; collectionSeconds records collection duration. The observations are collected sequentially and do not constitute an atomic snapshot of the entire process. An optional server argument restricts virtual-server data. Does not publish a sample or advance the sampling baseline.
- Switches:
- -server (optional)
- Optional virtual-server name; empty selects all configured servers. Process metrics remain process-wide.
- Returns:
- Timestamped dictionary of gauges, cumulative counters, thread CPU counters, units and availability; timestamp is in epoch microseconds.
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)