<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- Observer</title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/observer-1.2.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>Observer</strong><br><strong>User's Guide</strong><br><small>Version 1.2</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../../../../doc/js/flipmenu"> <li id="loadscrollpos" title="Observer" expanded="true">Observer<ul> <li><a href="observer_ug.html"> Top of chapter </a></li> <li title="Introduction"><a href="observer_ug.html#id61965">Introduction</a></li> <li title="General"><a href="observer_ug.html#id63021">General</a></li> <li title="Applications"><a href="observer_ug.html#id61978">Applications</a></li> <li title="Processes"><a href="observer_ug.html#id58232">Processes</a></li> <li title="Table Viewer"><a href="observer_ug.html#id61813">Table Viewer</a></li> <li title="Trace Overview"><a href="observer_ug.html#id58317">Trace Overview</a></li> </ul> </li> <li id="no" title="Trace Tool Builder" expanded="false">Trace Tool Builder<ul> <li><a href="ttb_ug.html"> Top of chapter </a></li> <li title="Introduction"><a href="ttb_ug.html#id62654">Introduction</a></li> <li title="Getting Started"><a href="ttb_ug.html#id62682">Getting Started</a></li> <li title="Running the Trace Tool Builder against a remote node"><a href="ttb_ug.html#id62166">Running the Trace Tool Builder against a remote node</a></li> <li title="Additional tracing options"><a href="ttb_ug.html#id59987">Additional tracing options</a></li> <li title="Trace Information and the .ti File"><a href="ttb_ug.html#id62926">Trace Information and the .ti File</a></li> <li title="Wrap Logs"><a href="ttb_ug.html#id61480">Wrap Logs</a></li> <li title="Formatting"><a href="ttb_ug.html#id61519">Formatting</a></li> <li title="Automatically collect and format logs from all nodes"><a href="ttb_ug.html#id62581">Automatically collect and format logs from all nodes</a></li> <li title="History and Configuration Files"><a href="ttb_ug.html#id63031">History and Configuration Files</a></li> <li title="Sequential Tracing"><a href="ttb_ug.html#id63279">Sequential Tracing</a></li> <li title="Example: Multipurpose trace tool"><a href="ttb_ug.html#id63411">Example: Multipurpose trace tool</a></li> </ul> </li> <li id="no" title="Erlang Top" expanded="false">Erlang Top<ul> <li><a href="etop_ug.html"> Top of chapter </a></li> <li title="Introduction"><a href="etop_ug.html#id64602">Introduction</a></li> <li title="Output"><a href="etop_ug.html#id64621">Output</a></li> <li title="Start"><a href="etop_ug.html#id64768">Start</a></li> <li title="Configuration"><a href="etop_ug.html#id64805">Configuration</a></li> <li title="Print to file"><a href="etop_ug.html#id64958">Print to file</a></li> <li title="Stop"><a href="etop_ug.html#id64985">Stop</a></li> </ul> </li> <li id="no" title="Crashdump Viewer" expanded="false">Crashdump Viewer<ul> <li><a href="crashdump_ug.html"> Top of chapter </a></li> <li title="Introduction"><a href="crashdump_ug.html#id65063">Introduction</a></li> <li title="Getting Started"><a href="crashdump_ug.html#id65075">Getting Started</a></li> <li title="Navigating"><a href="crashdump_ug.html#id65156">Navigating</a></li> <li title="Help"><a href="crashdump_ug.html#id65186">Help</a></li> </ul> </li> </ul> </div></div> <div id="content"> <div class="innertube"> <h1>1 Observer</h1> <h3><a name="id61965">1.1 Introduction</a></h3> <p>Observer, is a graphical tool for observing the characteristics of erlang systems. Observer displays system information, application supervisor trees, process information, ets or mnesia tables and contains a frontend for erlang tracing. </p> <h3><a name="id63021">1.2 General</a></h3> <p>Normally observer should be run from a standalone node to minimize the impact of the system being observed. Example: </p> <div class="example"><pre> > erl -sname observer -hidden -setcookie MyCookie -run observer </pre></div> <p> Choose which node to observe via <span class="code">Nodes</span> menu. The <span class="code">View/Refresh Interval</span> controls how frequent the view should be updated. The refresh interval is set per viewer so you can have different settings for each viewer. To minimize the system impact only the active viewer is updated and the other views will be updated when activated. </p> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p>Only R15B nodes can be observed.</p> </p></div> </div> <p> In general the mouse buttons behaves as expected, use left click to select objects, right click to pop up a menu with most used choices and double click to bring up information about the selected object. In most viewers with several columns you can change sort order by left clicking on column header. </p> <h3><a name="id61978">1.3 Applications</a></h3> <p>The <span class="code">Applications</span> view lists application information. Select an application in the left list to display its supervisor tree. </p> <p><span class="code">Trace process</span> will add the selected process identifier to <span class="code">Trace Overview</span> view and the node the process resides on will be added as well. </p> <p><span class="code">Trace named process</span> will add the registered name of the process. This can be useful when tracing on several nodes, then processes with that name will be traced on all traced nodes. </p> <p><span class="code">Trace process tree</span> and <span class="code">Trace named process tree</span> will add the selected process and all processes below, right of, it to the <span class="code">Trace Overview</span> view. </p> <h3><a name="id58232">1.4 Processes</a></h3> <p>The <span class="code">Processes</span> view lists process information. For each process the following information is presented: </p> <dl> <dt><strong>Pid</strong></dt> <dd>The process identifier.</dd> <dt><strong>Reds</strong></dt> <dd>This is the number of reductions that has been executed on the process</dd> <dt><strong>Memory</strong></dt> <dd>This is the size of the process in bytes, obtained by a call to <span class="code">process_info(Pid,memory)</span>.</dd> <dt><strong>MsgQ</strong></dt> <dd>This is the length of the message queue for the process.</dd> </dl> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p><strong>Reds</strong> can be presented as accumulated values or as values since last update.</p> </p></div> </div> <p><span class="code">Trace Processes</span> will add the selected process identifiers to the <span class="code">Trace Overview</span> view and the node the processes reside on will be added as well. <span class="code">Trace Named Processes</span> will add the registered name of processes. This can be useful when tracing is done on several nodes, then processes with that name will be traced on all traced nodes. </p> <h3><a name="id61813">1.5 Table Viewer</a></h3> <p>The <span class="code">Table Viewer</span> view lists tables. By default ets tables are visible and unreadable, private ets, tables and tables created by the OTP applications are not visible. Use <span class="code">View</span> menu to view "system" ets tables, unreadable ets tables or mnesia tables. </p> <p>Double click to view the content of the table. Select table and activate <span class="code">View/Table Information</span> menu to view table information. </p> <p>In the table viewer you can regexp search for objects, edit and delete objects. </p> <h3><a name="id58317">1.6 Trace Overview</a></h3> <p>The <span class="code">Trace Overview</span> view handles tracing. Tracing is done by selecting which processes to be traced and how to trace them. You can trace messages, function calls and events, where events are process related events such as <span class="code">spawn</span>, <span class="code">exit</span> and several others. </p> <p>When you want to trace function calls, you also need to setup <span class="code">trace patterns</span>. Trace patterns selects the function calls that will be traced. The number of traced function calls can be further reduced with <span class="code">match specifications</span>. Match specifications can also be used to trigger additional information in the trace messages. </p> <div class="note"> <div class="label">Note</div> <div class="content"><p><p>Trace patterns only applies to the traced processes.</p></p></div> </div> <p> Processes are added from the <span class="code">Applications</span> or <span class="code">Processes</span> views. A special <span class="code">new</span> identifier, meaning all processes spawned after trace start, can be added with the <span class="code">Add 'new' Process</span> button. </p> <p> When adding processes, a window with trace options will pop up. The chosen options will be set for the selected processes. Process options can be changed by right clicking on a process. </p> <p> Processes added by process identifiers will add the nodes these processes resides on in the node list. Additional nodes can be added by the <span class="code">Add Nodes</span> button. </p> <p> If function calls are traced, trace patterns must be added by <span class="code">Add Trace Pattern</span> button. Select a module, function(s) and a match specification. If no functions are selected, all functions in the module will be traced. A few basic match specifications are provided in the tool, and you can provide your own match specifications. The syntax of match specifications are described in the <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','erts','match_spec.html');">ERTS User's Guide</a></span>. To simplify the writing of a match specification they can also be written as <span class="code">fun/1</span> see <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','ms_transform.html');">ms_transform manual page</a></span> for further information. </p> <p>Use the <span class="code">Start trace</span> button to start the trace. By default trace output is written to a new window, tracing is stopped when the window is closed, or with <span class="code">Stop Trace</span> button. Trace output can be changed via <span class="code">Options/Output</span> menu. The trace settings, including match specifications, can be saved to, or loaded from, a file. </p> <p>More information about tracing can be found in <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','runtime_tools','dbg.html');">dbg</a></span> and in the chapter "Match specifications in Erlang" in <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','erts','match_spec.html');">ERTS User's Guide</a></span> and the <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','ms_transform.html');">ms_transform manual page</a></span>. </p> </div> <div class="footer"> <hr> <p>Copyright © 2002-2012 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>