Skip to content

Services

Functionalities under services are a bunch of standalone features, which are not alarms, metrics and notifications, but aiding devops daily tasks. These features turn WombatOAM to be an active agent. That means users can retrieve live information about running systems (such as the state of a gen_server), recover from outages for instance by forcing GC to save more memory, or fix misconfiguration issues by changing configuration parameters.

The services provided fall into 2 categories:

  • explorer: inspecting the subject on a read-only way,
  • executor: executed for their side-effect.

The scope of each service is either one node or one node family. Each service has zero or more arguments. The started instance of a service is called a request.

The provided services include

  • Etop like process listing.
  • Inspecting processes.
  • Evaluating Erlang/Elixir expressions.
  • Soft purge modules.
  • Garbage Collect Processes.

There are some boolean properties of services worth mentioning:

  • Exclusiveness: if a service is exclusive only one request of the same service can be run on the same node or node family at the same time. This is because the request either uses some global resource or to prevent multiple instances using too much resources that would have impact on the managed node.
  • Periodicity: most services are executed only once with their result shown as output or executed for their side-effects. Periodic services, however, keep running until they are stopped regularly updating their output data (for example Processes list). A Running request can be stopped explicitly by the user or it also terminates if it is left unattended (i.e. no browser is subscribed to display its output). This inactivity timeout is one minute.

Retrieve either static or periodically updated information about a certain process or about the VM. Has none or only a very small side-effect on the managed node.

The following services are available:

  • Process Manager. Presents information about Erlang processes similar to the information presented by “top” in UNIX. See details in the Process Manager section.

  • Process Tree. Presents Erlang processes and its relations (supervison tree) and gives information about the state of the process, like message queue, etc. See details in the Process Tree section.

  • Process info. Shows the process information of the process given by its pid or registere name.

  • Process messages. Shows the message queue of the process given by its pid or registere name.

  • Process stack trace. Shows the stack trace of the process given by its pid or registere name.

  • Process dictionary. Shows the dictionary of the process given by its pid or registere name.

  • Process state. Shows the state (if available) of the process given by its pid or registere name.

  • Table Visualizer. Shows information about the ETS tables and their contents. See details in the Table Visualizer section.

For each process the following information is displayed:

  • Pid. The process identifier.

  • Reds. The number of reductions executed by the process.

  • Memory. The size of the process, in bytes, obtained by a call to process_info(Pid, memory).

  • MsgQ. The length of the message queue of the process.

Configuration possibilities are:

  • Refresh interval in seconds. Time interval (in seconds) between each update of the output.

  • Number of listed processes. Number of rows (processes) to display.

  • Order by column. Identifies what information to sort by.

  • Order direction. Identifies which direction to sort by (Ascending/Descending).

Various information can be retrieved by clicking on any Pid, such as:

  • Process info.

  • Process messages.

  • Process stack trace.

  • Process dictionary.

  • Process state.

In the Process Tree you can see the relationships between different processes in the same Erlang application. To start select one application from the application list

Process tree application list

Note: you might need to wait a bit more, if your application contains a lot of processes, as calculations regarding the creation of the tree can take some time.

After the tree appeared you can explore it.

Drag the tree and its nodes around

Grabbing the tree around with moues

Change between layouts: classical or circular layout

Changing the layout of the tree

Click on one of nodes to get important information about

Showing the poppers

On the bottom right corner you can find the legend for the different colours, but please see this legend too:

Node Description
Root node with yellow background Root node
Big parental node with purple background Big parent
Hidden children legend with dashed border Hidden children
Moderate alert on node with orange border Moderate alert
High alert on node with red border High alert

The Process Tree can also show the messages the processes of the application send to each other. Choose how long to trace for (10 seconds to 5 minutes) in the card on the top left corner and click Trace messages. While tracing, the card shows the time left and a Stop button.

Every pair of processes that exchanged messages gets an arrow from the sender to the receiver:

  • The thicker and darker the arrow, the more messages per second. The legend lists the rate ranges: below 1, 1-10, 10-100, 100-1000 and above 1000 messages per second.
  • Dots move along the arrows while messages flow. A busier arrow carries more dots. The dots show the rate, not individual messages.
  • Hover an arrow to see its current rate and the number of messages since the tracing started.
  • An arrow without messages in the last few seconds becomes dashed and faded. It stays visible until the next tracing starts, so you can still see its total.
  • Messages to and from processes outside the tree are shown on extra nodes in a column left of the tree:
    • one node per other application involved, named after the application;
    • one node per other Erlang node involved, named after the node;
    • a node named after the traced application with (not in tree), for its processes that are not part of the tree (for example processes started with a plain spawn);
    • one node per kind of port, for example tcp_inet ports for TCP sockets, or the program name for external programs;
    • No application for processes that don’t belong to any application, such as processes started from the shell;
    • Unknown when the other side can’t be identified.
  • Messages of hidden children are shown on their big parent.

The rates are updated every 3 seconds, together with the tree.

Tracing stops on its own when the chosen time is over. To protect the node, it also stops early when the application sends too many messages (200,000 during one tracing), or when the node can’t keep up with them. The card then tells you why it stopped.

Note: a process is matched to its application while it is alive. Messages from a process that ends right after sending them may be shown on Unknown.

Note: message tracing requires Erlang/OTP 27 or later on the monitored node. It uses its own trace session, so it doesn’t interfere with other tracing on the node. Only the number of messages is collected, not their content.

Note: tracing adds some work to every message the traced processes send or receive. On a busy production node, prefer short tracing durations.

For each ETS table the following information is displayed:

  • Id. The identifier of the table.

  • Name. The name of the table.

  • Type. The table type (set, ordered_set, bag or duplicate_bag).

  • Objects. The number of objects inserted in the table.

  • Size (words). The number of words allocated to the table.

  • Owner pid. The pid of the owner of the table.

  • Owner name. The registered name of the owner process of the table.

Configuration possibilities are:

  • Refresh interval in seconds. Time interval (in seconds) between each update of the output.

  • Order by column. Identifies what information to sort by.

  • Order direction. Identifies which direction to sort by (Ascending/Descending).

By clicking on the id of the ETS table, the contents of the table can be retrieved.

This service limits the size of the data that it displays. By default:

  • Only the first 200 ETS tables are shown.
  • Only the first 100 rows are shown in an ETS table.
  • Only the first 10 columns are shown in an ETS table.

These values can be modified in wombat.config:

{set, wo_plugins, plugins, observer_ets, table_count_limit, 200}.
{set, wo_plugins, plugins, observer_ets, row_limit, 100}.
{set, wo_plugins, plugins, observer_ets, col_limit, 10}.

Real commands (e.g. Garbage Collect Processes, Evaluate Erlang/Elixir expressions). Executed for their side-effects. May not have any meaningful result as output. As these services give much freedom to the WombatOAM users to modify the monitored nodes for safety reasons it might be useful to disable all executors by adding the following line to the wombat.config.

{set, wo_services, enable_executor, false}.

The following services are provided:

  • Evaluate Erlang expression. It evaluates the user given Erlang expression on the managed node and returns the result.

  • Soft purge modules. Soft purge all modules from the managed node (see code:soft_purge/1).

  • Garbage Collect Processes . Force garbage collection on all processes in a controlled way. It asks the VM to perform garbage collection on GcGroupSize processes sequentially. Then, it sleeps for GcSleepTime milliseconds to weaken the negative effect of GC on the managed node.

  • Terminate process. Sends an exit signal with the given exit Reason to a process. The process can be given by PID or registered name.

  • Terminate shell processes. Sends an exit signal with the kill reason to all processes currently executing a function from the shell module. This kills all shells and the processes linked to them.

  • Recover from partitioned mnesia. If mnesia running on the current managed node is partitioned, this service restarts mnesia on all other nodes running this distributed mnesia and configures those nodes to load the table data from the current managed node to achieve consistent data in the tables.

The following additional service is provided on Elixir nodes:

  • Evaluate Elixir expression. It evaluates the user given Elixir expression on the managed node and returns the result.