Skip to content

Node information REST interface

Get system information about a node

Retrieve information about the software and hardware environment of the Erlang node including operating system and Erlang versions, processor bit size, etc.

Definition

1
GET /api/node-infos/node/NODE_ID/node-info

Example request

1
curl -X GET "http://127.0.0.1:8080/api/node-infos/node/956549c6-89bb-4ee0-a34b-c5a772ef78fa/node-info"

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "os_type": "unix",
  "os_descr": "Debian GNU/Linux 8.7 (jessie)",
  "kernel_version": "3.16.0",
  "n_cores": "2",
  "otp_version": "17",
  "system_version": "Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:2:2] [async-threads:30] [kernel-poll:true]\n",
  "ets_limit": "2053",
  "process_limit": "1048576",
  "port_limit": "65536",
  "driver_version": "3.1",
  "machine": "BEAM",
  "smp_support": "true",
  "wordsize": "64",
  "compat_rel": "17",
  "hostname": "debian",
  "ip": "127.0.1.1",
  "architecture": "x86_64-pc-linux-gnu",
  "release_name": "Erlang/OTP",
  "release_version": "17"
}

Arguments

Argument Description
node ID Required. The identifier of the node to be retrieved.

Returns

A nodeInfo object if a valid identifier was provided. The values of the attributes are strings.

Get application information about a node

Retrieve information about the applications loaded on the Erlang node.

Definition

1
GET /api/node-infos/node/NODE_ID/node-app-info"

Example request

1
curl -X GET "http://127.0.0.1:8080/api/node-infos/node/956549c6-89bb-4ee0-a34b-c5a772ef78fa/node-app-info"

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "name": "kernel",
  "description": "ERTS  CXC 138 10",
  "version": "3.0.3",
  "running": "<0.9.0>",
  "type": "permanent",
  "config":[
    {"name": "inet_dist_listen_min", "value": "25672"},
    {"name": "inet_dist_listen_max", "value": "25672"},
    {"name": "included_applications", "value": "[]"},
    {"name": "error_logger", "value": "tty"},
    {"name": "inet_default_connect_options", "value": "[{nodelay, true}]"}
  ],
  "modules": "application, application_controller, application_master, application_starter, auth, code, code_server, disk_log, disk_log_1, disk_log_server, disk_log_sup, dist_ac, dist_util, erl_boot_server, erl_ddll, erl_distribution, erl_epmd, erl_reply, error_handler, error_logger, erts_debug, file, file_io_server, file_server, gen_sctp, gen_tcp, gen_udp, global, global_group, global_search, group, heart, hipe_unified_loader, inet, inet6_sctp, inet6_tcp, inet6_tcp_dist, inet6_udp, inet_config, inet_db, inet_dns, inet_gethost_native, inet_hosts, inet_parse, inet_res, inet_sctp, inet_tcp, inet_tcp_dist, inet_udp, kernel, kernel_config, net, net_adm, net_kernel, os, pg2, ram_file, rpc, seq_trace, standard_error, user, user_drv, user_sup, wrap_log_reader"
}

Arguments

Argument Description
node ID Required. The identifier of the node to be retrieved.

Returns

An array of nodeAppInfo objects if a valid identifier was provided. There's one nodeAppInfo object for each application. The possible values of the type attribute are

  • permanent: see application:start/2 in Erlang/OTP documentation
  • transient: see application:start/2 in Erlang/OTP documentation
  • temporary: see application:start/2 in Erlang/OTP documentation
  • unknown: the application is loaded, but not started
  • Error: application running, but not started!

The possible values for the running attribute are

  • the process identifier (PID) of the application master process in the application
  • library: if the application is started, but has no master process (e.g. stdlib doesn't have one)
  • Loaded, but not started: the application is loaded, but not started
  • crashed: the application is started, but is not running
  • unknown: the application is not started but is running and there's no application master process for the application

The modules attribute contains the list of Erlang modules in this application. The config attribute contains the application environment variables. The name, description and version attributes are strings.

Get module information about a node

Retrieve information about the modules loaded on the Erlang node.

Definition

1
GET /api/node-infos/node/NODE_ID/module-info"

Example request

1
curl -X GET "http://127.0.0.1:8080/api/node-infos/node/956549c6-89bb-4ee0-a34b-c5a772ef78fa/module-info"

Example response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[{
  "module": "lists",
  "md5": "5efb7bdbe5ffcf963142304f7d0b648d",
  "vsn": "[126253210273804497200583865567816672397]",
  "cmp_version": "\"5.0.2\"",
  "time": 1428156234000,
  "source": "/tmp/buildd/erlang-17.3-dfsg/lib/stdlib/src/lists.erl",
  "native": "false",
  "beam_location": "/usr/lib/erlang/lib/stdlib-2.2/ebin/lists.beam",
  "sticky": "true",
  "application": "stdlib",
  "binary_size": 2980,
  "exported_funcs": [
    {
      "name": "module_info",
      "arity": 1
    }
  ],
  "compile_info": {
    "outdir": "/Users/user/.kerl/builds/17.5/otp_src_17.5/lib/kernel/ebin",
    "include_paths": [
      "/Users/user/.kerl/builds/17.5/otp_src_17.5/lib/kernel/src/../include"
    ],
    "options": [
      "warnings_as_errors",
      "debug_info",
      "{parse_transform,lager_transform}"
    ],
    "defines": [
      { "key": "otp_17", "value": "true" }
    ]
  }
}]

Arguments

Argument Description
node ID Required. The identifier of the node to be retrieved.

Returns

An array of module objects if a valid identifier was provided. There's one module object for each Erlang module.

  • The time attribute contains the time when the module was compiled, in milliseconds since 1970-01-01 00:00:00.
  • cmp_version is the version of the Erlang compiler application used to compile this module.
  • vsn is the version of the Erlang module (see beam_lib:version/1 in Erlang/OTP documentation).
  • md5 is the MD5 checksum of the module code (see beam_lib:md5/1 in Erlang/OTP documentation).
  • source is the full path of the source file used to compile this module.
  • beam_location is the full path of the compiled object file.
  • native is "true" if the module has native compiled code, "false" otherwise.
  • sticky is "true" if module that has been loaded from a sticky directory, "false" otherwise.
  • application is the name of the application that contains this module or undefined if the module doesn't belong to any application.
  • binary_size the size of the compiled binary (.beam) file in bytes
  • exported_funcs the module's exported function in an array containing objects whith keys name and arity
  • compile_info is an object containing compile time information
    • outdir: the compiled object's directory
    • include_paths: array of paths which were used as include paths during compilation
    • options: array of strings containing compile time options
    • defines: an array of objects having key and value properties containing the macros defined at compile time

Get the metric limits for a node

Retrieve all the available metric limits of the Erlang node.

Definition

1
GET /api/node-infos/node/NODE_ID/metric-limits"

Example request

1
curl -X GET "http://127.0.0.1:8080/api/node-infos/node/956549c6-89bb-4ee0-a34b-c5a772ef78fa/metric-limits"

Example response

1
2
3
4
5
6
7
{
  "atom_count": "1048576",
  "cpu_avg_1": "8",
  "ets_count": "2053",
  "open_ports": "65536",
  "process_count": "262144"
}

Arguments

Argument Description
node ID Required. The identifier of the node to be retrieved.

Returns

An array of tuples with every metric associated to its limit value.