Erlang / Erlang Basics Interview questions
How do you use the observer tool to inspect a running system?
observer is OTP's built-in GUI for peering into a live BEAM node: process list with memory and
message queue length per process, supervision tree visualization, ETS table browser, and application
overview, all without adding any extra code to the system being inspected.
1> observer:start().
Running that in a shell attached to (or connected to) the node you want to inspect opens the GUI. The Applications tab is often the fastest way to spot trouble: it renders the live supervision tree, so a worker stuck restarting in a crash loop, or a process with a mailbox that keeps growing, is visible at a glance rather than something you have to dig for with ad hoc shell commands.
For headless/remote servers without a GUI, the same information is available via shell functions like
i/0, process_info/2, and ets:i/0, or via the newer
observer_cli terminal-based alternative.
More Related questions...