Question

I'm currently struggling with erlang's OTP observer. My application - gen_server, and supervisor - runs fine, but when I'm trying to use an observer to view processes I'm only able to view the "kernel" in the tab "applications" in the observer GUI.

These are the commands leading up to the nodes connecting but nothing more:

------------------------Observer------------------------

/home/erlang# erl -pa ebin/ -sname observer -setcookie tmp -run observer

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed Eshell V6.0 (abort with ^G) (observer@ergo)1> (Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(Erlang:9911): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

------------------------Node to view------------------------

/home/erlang# erl -pa ebin/ -sname worker Eshell V6.0 (abort with ^G)

(worker@ergo)1> nodes().

[]

(worker@ergo)2> net_adm:ping(observer@ergo).

pong

(worker@ergo)3> nodes().

[observer@ergo]


In the observer GUI, "Trace Overview", I've added the node (worker@ergo). However I can only view the kernel in the application-tab, and in Trace overview there are no processes listed.

How can I view the process-tree of my application in the observer GUI?

Was it helpful?

Solution

Does your application follow OTP application behavior? Do you start it with application:start/1?

OTHER TIPS

You do not need to add the worker node in the Trace Overview tab. However, you need to make sure you are observing the worker node by choosing the node from the Nodes menu. The observed node typically appears in the title of the observer window.

The Applications tab lists all running applications with a supervision tree. If your application is not listed, it might not be running or it might not have a supervision tree. You can check it is running with undocumented API application:info(). You can check it has a supervision tree with undocumented API application_controller:get_master(AppName) that returns the pid of the master process of any application with a supervision tree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top