1<?xml version="1.0" encoding="utf-8" ?> 2<!DOCTYPE erlref SYSTEM "erlref.dtd"> 3 4<erlref> 5 <header> 6 <copyright> 7 <year>2002</year> 8 <year>2017</year> 9 <holder>Ericsson AB, All Rights Reserved</holder> 10 </copyright> 11 <legalnotice> 12 Licensed under the Apache License, Version 2.0 (the "License"); 13 you may not use this file except in compliance with the License. 14 You may obtain a copy of the License at 15 16 http://www.apache.org/licenses/LICENSE-2.0 17 18 Unless required by applicable law or agreed to in writing, software 19 distributed under the License is distributed on an "AS IS" BASIS, 20 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 See the License for the specific language governing permissions and 22 limitations under the License. 23 24 The Initial Developer of the Original Code is Ericsson AB. 25 </legalnotice> 26 27 <title>etop</title> 28 <prepared>Siri Hansen</prepared> 29 <responsible></responsible> 30 <docno></docno> 31 <approved></approved> 32 <checked></checked> 33 <date></date> 34 <rev></rev> 35 <file></file> 36 </header> 37 <module since="">etop</module> 38 <modulesummary>Erlang Top is a tool for presenting information about Erlang 39 processes similar to the information presented by "top" in UNIX.</modulesummary> 40 <description> 41 42 <p>Start Erlang Top with the provided scripts 43 <c>etop</c>. This starts a hidden Erlang node 44 that connects to the node to be measured. The measured node is 45 specified with option <c>-node</c>. If the measured node has a 46 different cookie than the default cookie for the user who 47 invokes the script, the cookie must be explicitly specified with 48 option <c>-setcookie</c>.</p> 49 50 <p>Under Windows, batch file <c>etop.bat</c> can be used.</p> 51 52 <p>When executing the <c>etop</c> script, configuration 53 parameters can be specified as command-line options, 54 for example, <c>etop -node testnode@myhost -setcookie MyCookie</c>. 55 The following configuration parameters exist for the 56 tool:</p> 57 <taglist> 58 <tag><c>node</c></tag> 59 <item><p>The measured node.</p> 60 <p>Value: <c>atom()</c></p> 61 <p>Mandatory</p></item> 62 <tag><c>setcookie</c></tag> 63 <item><p>Cookie to use for the <c>etop</c> node. Must be same as the 64 cookie on the measured node.</p> 65 <p>Value: <c>atom()</c></p></item> 66 <tag><c>lines</c></tag> 67 <item><p>Number of lines (processes) to display.</p> 68 <p>Value: <c>integer()</c></p> 69 <p>Default: <c>10</c></p></item> 70 <tag><c>interval</c></tag> 71 <item><p>Time interval (in seconds) between each update of 72 the display.</p> 73 <p>Value: <c>integer()</c></p> 74 <p>Default: <c>5</c></p></item> 75 <tag><c>accumulate</c></tag> 76 <item><p>If <c>true</c>, the execution time and reductions are 77 accumulated.</p> 78 <p>Value: <c>boolean()</c></p> 79 <p>Default: <c>false</c></p></item> 80 <tag><c>sort</c></tag> 81 <item><p>Identifies what information to sort by.</p> 82 <p>Value: <c>runtime | reductions | memory | msg_q</c></p> 83 <p>Default: <c>runtime</c> (<c>reductions</c> if <c>tracing=off</c>)</p></item> 84 <tag><c>tracing</c></tag> 85 <item><p><c>etop</c> uses the Erlang trace facility, and thus no 86 other tracing is possible on the measured node while 87 <c>etop</c> is running, unless this option is set to 88 <c>off</c>. Also helpful if the <c>etop</c> tracing causes too 89 high load on the measured node. With tracing off, runtime is 90 not measured.</p> 91 <p>Value: <c>on | off</c></p> 92 <p>Default: <c>on</c></p></item> 93 </taglist> 94 95 <p>For details about Erlang Top, see the 96 <seeguide marker="etop_ug">User's Guide</seeguide>.</p> 97 98 </description> 99 <funcs> 100 <func> 101 <name since="OTP R15B01">start() -> ok</name> 102 <fsummary>Start etop.</fsummary> 103 <desc> 104 <p>Starts <c>etop</c>. 105 Notice that <c>etop</c> is preferably started with the <c>etop</c> script.</p> 106 </desc> 107 </func> 108 <func> 109 <name since="OTP R15B01">start(Options) -> ok</name> 110 <fsummary>Start etop.</fsummary> 111 <type> 112 <v>Options = [Option]</v> 113 <v>Option = {Key, Value}</v> 114 <v>Key = atom()</v> 115 <v>Value = term()</v> 116 </type> 117 <desc> 118 <p>Starts <c>etop</c>. To view the possible options, use 119 <seemfa marker="#help/0"><c>help/0</c></seemfa>.</p> 120 </desc> 121 </func> 122 <func> 123 <name since="OTP R15B01">help() -> ok</name> 124 <fsummary>Display the etop help.</fsummary> 125 <desc> 126 <p>Displays the help of <c>etop</c> and 127 its options.</p> 128 </desc> 129 </func> 130 <func> 131 <name since="">config(Key,Value) -> Result</name> 132 <fsummary>Change the configuration of the tool.</fsummary> 133 <type> 134 <v>Result = ok | {error,Reason}</v> 135 <v>Key = lines | interval | accumulate | sort</v> 136 <v>Value = term()</v> 137 </type> 138 <desc> 139 <p>Changes the configuration parameters of the tool during runtime. 140 Allowed parameters are <c>lines</c>, <c>interval</c>, <c>accumulate</c>, 141 and <c>sort</c>.</p> 142 </desc> 143 </func> 144 <func> 145 <name since="">dump(File) -> Result</name> 146 <fsummary>Dump the current display to a file.</fsummary> 147 <type> 148 <v>Result = ok | {error,Reason}</v> 149 <v>File = string()</v> 150 </type> 151 <desc> 152 <p>Dumps the current display to a text file.</p> 153 </desc> 154 </func> 155 <func> 156 <name since="">stop() -> stop</name> 157 <fsummary>Terminate etop.</fsummary> 158 <desc> 159 <p>Terminates <c>etop</c>.</p> 160 </desc> 161 </func> 162 </funcs> 163</erlref> 164 165