Metrics In Detail

In-depth information on the many application characteristics and metrics that the N|Solid Runtime collects or are calculated and appended by the N|Solid Console Server.

Process Characteristsics

The two primary metrics commands, INFO and METRICS reply with a number of characteristics and values recorded live by the N|Solid Agent. They contain stats related to the system hosting the process, the process as a whole, and the threads that make up the process.

Property Description
app The user-specified application name as set in package.json or the NSOLID_APP environment variable.
appVersion The user-specified application version as set in package.json.
execPath The absolute path of the N|Solid executable running the application.
id The unique N|Solid agent ID. Unique per N|Solid process.
main The absolute path to the root module in the process's module tree.
nodeEnv The user-specified NODE_ENV environment variable.
pid The hosting system's process id for the process. Unique per server.
processStart The epoch timestamp for instant the process started.
tags The user-specified tags as set by the NSOLID_TAGS environment variable.
vulns The number of known vulnerabilities found in the modules of the process. This data is appended by the N

Core Library Versions

The libraries built into the Node.js core and added by N|Solid and their versions are in the versions object of the INFO reply.

versions: {
  acorn: '8.10.0',
  ada: '2.7.2',
  ares: '1.20.1',
  base64: '0.5.0',
  brotli: '1.0.9',
  cjs_module_lexer: '1.2.2',
  cldr: '43.1',
  icu: '73.2',
  llhttp: '8.1.1',
  modules: '115',
  napi: '9',
  nghttp2: '1.57.0',
  nghttp3: '0.7.0',
  ngtcp2: '0.8.1',
  node: '20.10.0',
  nsolid: '5.0.2-pre',
  openssl: '3.0.12+quic',
  simdutf: '3.2.18',
  tz: '2023c',
  undici: '5.26.4',
  unicode: '15.0',
  uv: '1.46.0',
  uvwasi: '0.0.19',
  v8: '11.3.244.8-node.25',
  zlib: '1.2.13.1-motley'
}

System Information

Note: The host system may be actual hardware, a virtual machine, or a container.

Property Description
arch The host system's CPU architecture.
cpuCores The host system's number of CPU cores or hyperthreaded cores as reported by the OS.
cpuModel The host system's CPU model.
hostname The host system's configured hostname.
platform The host system's operating system platform.
totalMem The host system's total available memory. This metric does not change during runtime.

System Data

Property Description
freeMem The host system's amount of free (unused) memory, in bytes.
load1m The average number of processes on the host being executed or waiting for cpu time in in the past 1 minute.
load5m The average number of processes on the host being executed or waiting for cpu time in in the past 5 minutes.
load15m The average number of processes on the host being executed or waiting for cpu time in in the past 15 minutes.
systemUptime The host system's uptime, in seconds.

Note: These numbers are not correlated to which core the process or its threads may be run on.

General Process Stats and Information

Property Description
blockInputOpCount The number of file system input operations performed by the process.
blockOutputOpCount The number of file system output operations performed by the process.
cpuSystemPercent The percent CPU used by the process in system calls. e.g. 4.1
cpuUserPercent The percent CPU used by the process in user code. e.g. 7.4
cpuPercent The percent CPU used by the process. e.g. 11.5 (Should be System + User)
ctxSwitchInvoluntaryCount The number of involuntary context switches away from the process. I.e. a higher priority process needs time or the process has completed its time slice.
ctxSwitchVoluntaryCount The number of voluntary context switches away from the process. I.e. the process yielded back before its time slice was due, usually to wait for an IO resource.
pageFaultHardCount The number of hard page faults triggered by the process. In this case the process attempted to read from memory but the page it was trying to read had been cached to disk. These can be costly for performance.
pageFaultSoftCount The number of soft page faults (page reclaims) triggered by the process. In this case the process attempted to read from its local cache and the page had been moved to another area of memory. Not a great cause for concern.
title The current system title of the process.
uptime The process uptime, in seconds.
user The system user currently running the process. This reflects any changes made during runtime.
rss RSS or "Resident Set Size" is the absolute total of all memory used by this process. All other active memory sections are subsets of the RSS for the process. If this value continually grows and never stabilizes at a consistent value, you likely have some sort of memory leak.

Legacy POSIX Process Statistics

These POSIX standard values are considered legacy but are kept for potential future re-use.

Property Description
ipcReceivedCount The number of IPC messages received by the process. This is a legacy metric no longer in use on modern platforms.
ipcSentCount The number of IPC messages sent by the process. This is a legacy metric no longer in use on modern platforms.
signalCount The number of signals received by the process. This is a legacy metric no longer in use on modern platforms.
swapCount The number of times the process has been swapped out of memory. This is a legacy metric no longer in use on modern platforms.

Per-Thread Metrics

To fully support Node.js Worker Threads, the Metrics and Informational values that relate to specific threads are broken into a section of the METRICS reply that has an entry for the main thread and any Worker Threads.

Property Description
threadName The name of the thread, if set.
threadId The thread's id, starting with thread 0 as the main thread.

JavaScript Memory Stats

Note that rssis not specific to a thread, so is listed outside of thread metrics, but each Thread's heapTotal and extrernalMem are subset of the entire process' rss.

Property Description
totalAvailableSize The remaining amount of memory the heap can allocate on the process before hitting the maximum heap size, in bytes. It is effectively heapSizeLimit - heapTotal.
totalHeapSizeExecutable The total amount of executable memory (containing code instructions) allocated in the process's heap, in bytes.
totalPhysicalSize The amount of physical memory currently committed for the heap of the process, in bytes.
heapSizeLimit The maximum amount of memory reserved for the JavaScript Heap space for the process. If the allocator requests memory that would grow beyond this configured size limit, V8 will terminate the process with allocation failures.
heapTotal The process's total allocated JavaScript heap size, in bytes. Contains the used portion (heapUsed) of the Heap as well as spare memory to work with. If the heapUsed grows too close to heapTotal, it will allocate more memory and grow. As the Garbage Collector runs and purges items from the Heap, this can reduce.
heapUsed The process's total used JavaScript heap size, in bytes. The memory space storing all JavaScript objects and values. A key value to watch for memory leaks.
externalMem The thread's memory allocated by Node.js outside of V8's heap but represented by a reference inside of the Heap, in bytes. This is where Buffers and native addon memory is located. This may exceed RSS if large Buffers are soft-allocated by V8.
numberOfNativeContexts The number of attached contexts, typically created using the vm module to create additional V8 memory sandboxes.
numberOfDetachedContexts The number of detached contexts that still contain memory and are not being garbage collected.
mallocedMemory The total number of memory currently allocated via malloc for use outside of V8--for example by native modules.
peakMallocedMemory The highest recorded allocation made using malloc over the life of the process.

Node.js Event Loop Stats

Note: To learn more about event loop utilization visit The Event loop utilization blogpost.

Property Description
loopAvgTasks The process's average number of async JavaScript entries per event loop cycle.
loopEstimatedLag The estimated amount of time a I/O response may have to wait in the process, in milliseconds.
loopIdlePercent The percent time that the process is waiting (idle) for I/O or timers.
loopTotalCount The cumulative count of all event loop cycles in the process. Legacy value for backwards compatibility.
loopIterations The total number of event loop iterations since the process started. New name for loopTotalCount.
loopIterWithEvents The total number of event loop iterations since the process started that had events for Node to handle.
loopIdleTime The amount of time the event loop has spent idle since the process started, in nanoseconds.
loopUtilization The ratio of time that the event loop spends processing events rather than being idle. When this number grows you may start to see latency spikes.
eventsProcessed The quantity of events processed by the event handler upon return of the event provider request for a single loop iteration.
eventsWaiting The number of events that were ready to be recieved but still in the queue--these are potentially experiencing some amount of event loop lag.
providerDelay The average delay between an event being put into the event queue and being dequed and operated, in nanoseconds.
processingDelay The amount of time it took to dispatch the event inside the event loop--the time the event was neither waiting nor yet being handled by V8.
res5s A simple moving average of the Event Loop's effective "responsiveness" over the past 5 seconds. This is a ratio of delay to processing time.
res1m ... over the past 1 minute.
res5m ... over the past 5 minutes.
res15m ... over the past 15 minutes.

JavaScript Garbage Collection Stats

Property Description
gcCount The total number of garbage collections of any type done by the process.
gcDurUs99Ptile The process's 99th percentile duration of garbage collections, in microseconds. This represents the cutoff duration of the slowest 1% of GC events.
gcDurUsMedian The process's median duration of garbage collections, in microseconds. These are more typical durations for GC events.
gcForcedCount The process's number of externally forced garbage collections. For example, triggered via a HeapSnapshot being collected.
gcFullCount The number of garbage collections run by the process which collected all available garbage. Usually only observed when the heapTotal is approaching heapSizeLimit.
gcMajorCount The number of significant garbage collections done by the process. An example of a "significant" garbage collection is a "Mark-Sweep".

HTTP and DNS Stats

Property Description
dnsCount The total number of DNS lookups performed since the process started.
dnsMedian The process's median duration of DNS lookups performed, in milliseconds.
dns99Ptile The 99th percentile duration of DNS loops performed by the process.
httpClientCount The total number of outgoing HTTP(S) client requests performed.
httpClientAbortCount The total number of outgoing HTTP(S) client requests made by the node process canceled due to inactivity or by calling the abort method.
httpClientMedian The median duration of outgoing HTTP(S) client requests completed, in milliseconds.
httpClient99Ptile The 99th percentile duration of outgoing HTTP(s) client requests completed, in milliseconds.
httpServerCount The total number of incoming HTTP(s) requests served.
httpServerAbortCount The total number of served incoming HTTP(S) requests to the process that were aborted.
httpServerMedian The median duration of served incoming HTTP(S) requests completed, in milliseconds.
httpServer99Ptile The 99th percentile duration of served incoming HTTP(S) requests completed, in milliseconds. These are your slowest 1% of all requests handled by your http server process.

IO Primitives

As your application creates and uses IO primitives, the cumulative numbers are tracked via these metrics throughout the process' duration. These are good indicators of activity and can reveal sources of memory leaks due to failing to close IO resources.

Property Description
activeHandles The total number of live internal "Handles" which is the name for long-lived asynchronous primitives such as open sockets, child processes, files, etc.
activeRequests The total number of live internal "Requests" which is the name for short-lived asynchronous primitives such as http requests, promises, etc.
pipeServerCreatedCount The total number of server objects created using named pipes.
pipeServerDestroyedCount The total number of pipe server objects that have been torn down and are no longer active.
pipeSocketCreatedCount The number of pipe socket objects created.
pipeSocketDestroyedCount The number of pipe socket objects that have been torn down and are no longer active.
tcpServerCreatedCount The number of TCP network server objects created.
tcpServerDestroyedCount The number of TCP server objects torn down.
tcpSocketCreatedCount The number of TCP client socket objects created.
tcpSocketDestroyedCount The number of TCP client socket objects torn down.
udpSocketCreatedCount UDP network socket objects created
udpSocketDestroyedCount UDP network socket objects destroyed
promiseCreatedCount Total number of Promises created by the process. NOTE: The NSolid Runtime is not configured to track promises by default and must be configured with NSOLID_PROMISE_TRACKING=1 or promiseTracking set to a truthy value in your NSolid configuration.
promiseResolvedCount Total number of Promises resolved during the life of the process. Also requires Promise tracking to be enabled.
fsHandlesOpenedCount Total number of File System handles opened.
fsHandlesClosedCount Total number of File System handles closed.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us