::nx::Object ::nx::Object __default_accessor __default_method_call_protection __object_configureparameter __resolve_method_path contains copy delete object method delete object property delete object variable destroy_on_cleanup info consts info info info lookup parameters info lookup slots info lookup syntax info lookup variables info object method args info object method body info object method callprotection info object method debug info object method definition info object method definitionhandle info object method deprecated info object method exists info object method handle info object method origin info object method parameters info object method registrationhandle info object method returns info object method submethods info object method syntax info object method type info object slots info object variables info variable definition info variable name info variable parameter move object alias object forward object method object property object variable private protected public qn require namespace require object method require private object method require protected object method require public object method serialize ::ns::stats::Collector ::ns::stats::Collector cpuCapacity cpuListCount describe mountPath selectServer snapshot systemText ::ns::stats::Collector->::nx::Object ::ns::stats::Sampler ::ns::stats::Sampler calculate delta init locked retainSample sample sampling history sampling start sampling status sampling stop sampling tick ::ns::stats::Sampler->::ns::stats::Collector ::ns::ns_stats ::ns::ns_stats history persist startup ::ns::ns_stats->::ns::stats::Sampler

Class ::ns::stats::Collector

::ns::stats::Collector[i] create ...

Defined in

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nx::Object[i]
  • subclass: ::ns::stats::Sampler[i]

Methods (to be applied on instances)

  • cpuCapacity (scripted, public)

     <instance of ns::stats::Collector[i]> 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[i]> 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[i]> 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.