Profiler in Service Config
  • Dark
    Light
  • PDF

Profiler in Service Config

  • Dark
    Light
  • PDF

Profiler in a Service Config

To help troubleshoot performance issues resulting in high CPU usage, Itential Automation Platform (IAP) has a built-in profiler based on:

Profiling can be enabled in IAP, along with select applications and adapters in IAP release version 2020.1 and later.

Note: This feature should not impose any security limitations; however, Itential strongly recommends this feature is not enabled for production deployment due to possible performance impacts.

Prerequisites

  • Must have write permission to the working directory to create profiling logs.

How to enable profiling in IAP

To set profiling in IAP:

  1. When running IAP in a Docker environment, use the following to set profiling in the /docker/startContainer.

    set `PHCORE_PROFILING=true`
    
  2. When running IAP directly in shell, use the --prof CLI option.

    sudo -u pronghorn node --prof server.js
    

How to enable profiling for adapters/applications

To enable profiling for adapters and applications running on a development server:

  1. Go to Admin Essentials.
  2. Expand the Applications or Adapters collections menu (left sidebar)and select the appropriate adapter/application.
  3. From the Configuration tab, switch the toggle (upper-right) to turn-on the Advanced View and display the Service Config editor.
  4. Profiling of select applications/adapters can be enabled (and disabled) by directly editing its configuration (see example below).
  5. Once the profiling feature is enabled/disabled, click save and restart the application/adapter for the change to take effect.

Example: Profiling Enabled for NSO Manager

Pictured below is an example of profiling enabled for the NSO Manager application.

01_profilingEnabled.png

How to process profiler logs

The profiler will gather (log) all data in a file that can be found in the working directory as isolate-*-v8.log.

Example: Profiling Logs

02_outputLogs.png

To process the profiler logs into a user-friendly pretty-format, simply use the Node.js --prof-process CLI option.

node --prof-process isolate-0x5589eb9afae0-v8.log > isolate-0x5589eb9afae0-v8-PRETTY.log

Profiling info can then be inspected by opening the log file in your preferred editor/viewer.

How to remove profiler logs

Once you've analyzed all profile data, remember to remove the profiling log files to save disk space.