Etop.Report (Etop v0.5.0)
Etop Reporting Helpers.
A set of functions to use to parse and process Etop results.
Example output
===========================================================================================================================
nonode@nohost 08:22:56
Load: cpu 2.9% Memory: total 42812208 binary 197472
procs 92 processes 23093664 code 10223211
runq 0 atom 512625 ets 791672
Pid Name or Initial Func Percent Reds Memory MssQ State Current Function
---------------------------------------------------------------------------------------------------------------------------
<0.9.0> :erlang.apply/2 47.66 901851 284652 0 waiting :erl_prim_loader.loop/3
<0.49.0> :erlang.apply/2 12.57 237834 163492 0 waiting :code_server.loop/1
<0.43.0> :application_controller.start/1 8.13 153862 264396 0 waiting :gen_server.loop/7
<0.1.0> :erts_code_purger.start/0 7.44 140798 25848 0 waiting :erts_code_purger.wait_for_request/0
<0.2.0> :erts_literal_area_collector.start/ 7.11 134526 2688 0 waiting :erts_literal_area_collector.msg_loop/4
<0.57.0> :file_server.init/1 6.18 116917 426596 0 waiting :gen_server.loop/7
<0.64.0> :group.server/3 3.46 65443 10784016 0 waiting :group.more_data/6
<0.79.0> :disk_log.init/2 1.85 34950 197252 0 waiting :disk_log.loop/1
<0.228.0> Etop.init/1 1.77 33584 6781840 0 running Process.info/1
<0.3.0> :erts_dirty_process_signal_handler. 1.26 23850 2688 0 waiting :erts_dirty_process_signal_handler.msg_loop/0
===========================================================================================================================
Link to this section Summary
Functions
Get the column width of the given column number.
Create a report of the given processes list, and summary stats.
Get the data loaded by compiling the output exs file.
Helper to create and output the report.
Map the given list to the given extract fields.
Map the given list.
List the cpu usage values.
List the memory usage fields.
Load the given exs file.
Get the entry with the max load.
Get the entry with the max load from the given entries list.
Print a chart of the given data.
Print a chart of the cpu usage.
Print a chart of the memory usage.
Print a report.
Save a report in Elixir terms format.
Get the top n entries.
Link to this section Functions
column_width(n)
Get the column width of the given column number.
create_report(list, total, stats)
Create a report of the given processes list, and summary stats.
get()
Get the data loaded by compiling the output exs file.
handle_report(state)
Helper to create and output the report.
Output options:
- print to current leader
- save text format to file
- save executable format to exs file
list(entries, fields)
Map the given list to the given extract fields.
list(entries, scope, field)
Map the given list.
list_cpu(entries)
List the cpu usage values.
list_memory(entries, field \\ :total)
List the memory usage fields.
load(path \\ "/tmp/etop.exs")
Load the given exs file.
max()
Get the entry with the max load.
Gets the entries from Etop.Agent
max(entries)
Get the entry with the max load from the given entries list.
plot(list, opts \\ [])
Print a chart of the given data.
plot_cpu(entries, opts \\ [])
Print a chart of the cpu usage.
plot_memory(entries, opts \\ [])
Print a chart of the memory usage.
print(entry, file \\ nil)
Print a report.
Prints a single top entry or a list of top entries to leader or the given file.
save_exs_report(report, path)
Save a report in Elixir terms format.
Saves the report so that it can be later loaded and analyzed.
top(entries, num)
Get the top n entries.