From e2d565532d25024c1c0552d8eaaddf90eed88629 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 11 Jul 2013 11:27:29 +0200 Subject: observer: add wx version of crashdump_viewer The old web base crashdump_viewer is now removed. --- lib/observer/doc/src/Makefile | 10 +- lib/observer/doc/src/cdv.xml | 60 +++++ lib/observer/doc/src/crashdump.xml | 23 +- lib/observer/doc/src/crashdump_help.html | 307 ---------------------- lib/observer/doc/src/crashdump_ug.xml | 427 +++++++++++++++++++++++++------ lib/observer/doc/src/ref_man.xml | 1 + 6 files changed, 431 insertions(+), 397 deletions(-) create mode 100644 lib/observer/doc/src/cdv.xml delete mode 100644 lib/observer/doc/src/crashdump_help.html (limited to 'lib/observer/doc/src') diff --git a/lib/observer/doc/src/Makefile b/lib/observer/doc/src/Makefile index 0f564d3299..c2f5aff5a0 100644 --- a/lib/observer/doc/src/Makefile +++ b/lib/observer/doc/src/Makefile @@ -34,6 +34,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) # Target Specs # ---------------------------------------------------- XML_APPLICATION_FILES = ref_man.xml +XML_REF1_FILES = \ + cdv.xml XML_REF3_FILES = \ crashdump.xml \ observer.xml \ @@ -59,7 +61,7 @@ BOOK_FILES = book.xml XML_FILES = \ $(BOOK_FILES) $(XML_CHAPTER_FILES) \ - $(XML_PART_FILES) $(XML_REF3_FILES) \ + $(XML_PART_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) \ $(XML_APPLICATION_FILES) $(XML_REF6_FILES) ONLY_HTML_FILE = \ @@ -81,6 +83,7 @@ HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \ INFO_FILE = ../../info +MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1) MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6) @@ -110,6 +113,7 @@ html: gifs $(HTML_REF_MAN_FILE) $(ONLY_HTML_FILE:%=$(HTMLDIR)/%) clean clean_docs: rm -rf $(HTMLDIR)/* + rm -f $(MAN1DIR)/* rm -f $(MAN3DIR)/* rm -f $(MAN6DIR)/* rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo) @@ -119,7 +123,7 @@ clean clean_docs: $(HTMLDIR)/$(ONLY_HTML_FILE): $(INSTALL_DATA) $(ONLY_HTML_FILE) $@ -man: $(MAN3_FILES) $(MAN6_FILES) +man: $(MAN1_FILES) $(MAN3_FILES) $(MAN6_FILES) gifs: $(GIF_FILES:%=$(HTMLDIR)/%) @@ -139,6 +143,8 @@ release_docs_spec: docs $(INSTALL_DATA) $(HTMLDIR)/* \ "$(RELSYSDIR)/doc/html" $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" + $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1" + $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1" $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3" $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3" $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6" diff --git a/lib/observer/doc/src/cdv.xml b/lib/observer/doc/src/cdv.xml new file mode 100644 index 0000000000..fc8f16bc4e --- /dev/null +++ b/lib/observer/doc/src/cdv.xml @@ -0,0 +1,60 @@ + + + + +
+ + 2013 + Ericsson AB. All Rights Reserved. + + + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + + + The cdv program + Siri Hansen + Siri Hansen + + + + 2013-10-015 + PA1 + cdv.xml +
+ cdv + Script used for starting the Crashdump Viewer from the + OS command line. + + + +

The cdv shell script can be found under the priv + directory of the observer application. The script is used + for starting the Crashdump Viewer tool from the OS command + line.

+

For Windows users, cdv.bat can be found in the same + location.

+
+ + + + cdv [file] + Start the Crashdump Viewer and load the given file. + +

The file arguments is optional. If not given, a file + dialog will pop up allowing the user to select a crashdump + from the file system.

+
+
+
+ +
diff --git a/lib/observer/doc/src/crashdump.xml b/lib/observer/doc/src/crashdump.xml index 5b58a52739..27e42e83b7 100644 --- a/lib/observer/doc/src/crashdump.xml +++ b/lib/observer/doc/src/crashdump.xml @@ -31,13 +31,14 @@ 2003-03-10 PA1 - crashdump.sgml + crashdump.xml crashdump_viewer - A HTML based tool for browsing Erlang crashdumps. + A WxWidgets based tool for browsing Erlang + crashdumps. -

The Crashdump Viewer is an HTML based tool for browsing Erlang - crashdumps. Crashdump Viewer runs under the WebTool application.

+

The Crashdump Viewer is a WxWidgets based tool for browsing Erlang + crashdumps.

See the user's guide for more information about how to get started with the Crashdump @@ -46,16 +47,26 @@ start() -> ok + start(File) -> ok Start the crashdump_viewer + + File = string() + The file name of the crashdump. + -

This function starts the crashdump_viewer.

+

This function starts the crashdump_viewer GUI and + loads the given crashdump.

+ +

If File is not given, a file dialog will be opened + where the crashdump can be selected.

stop() -> ok Stop the crashdump_viewer -

This function stops the crashdump_viewer.

+

This function stops the crashdump_viewer and closes + all GUI windows.

diff --git a/lib/observer/doc/src/crashdump_help.html b/lib/observer/doc/src/crashdump_help.html deleted file mode 100644 index 268b9495d6..0000000000 --- a/lib/observer/doc/src/crashdump_help.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - -Crashdump Viewer help - - -
-[Erlang Systems] -
-
-

Information pages

- -

Each menu item points to an information page. If no information - is found for an item, the page will simply say "No information - found". The reason for not finding any information about an item - can be that the dump is truncated, that it is a dump from an old - OTP release in which this item was not written or that the item - simply wasn't present in the system at the point of failure. - -

If the dump was truncated, a warning is displayed. - -

Even if some information about an item exists, there might be - empty fields if the dump originates from an old OTP release. - -

The value "-1" in any field means "unknown", and in most cases - it means that the dump was truncated somewhere around this field. - -

Only some of the fields in the different information pages are - described here. These are fields that to not exist in the raw - crashdump, or in some way differs from the fields in the raw - crashdump. Details about other field can be found in the user's - guide for the Erlang runtime system, in the chapter "How to - interpret the Erlang crash dumps". A link to this chapter can be - found in the Crashdump Viewer's menu under documentation, and - there are also direct links from the specific sections below to - related information in "How to interpret the Erlang crash dumps". - - -

General information

- -

This is the first page shown when a new dump is loaded into - the system. It shows a very short overview of the dump. - -

'Node name' will only exist in dumps originating from OTP R9C - and later. - -

The following fields are not described in the Erlang runtime - system user's guide: - -

-
Crashdump created on
-
Time of failure.
- -
Memory allocated
-
The total number of bytes allocated, equivalent to - c:memory(total). This will only be present in - dumps from OTP R9C and later.
- -
Memory maximum
-
The maximum number of bytes that has been allocated - during the lifetime of the originating node. This will not be - present in dumps older than OTP R9C, and even in newer - releases it is only shown if the Erlang runtime system was run - instrumented.
- -
Atoms
-
If at all available in the dump, this is the total - number of atoms in the atom table. If the size of the atom - table is not available, the number of atoms visible in the - dump is presented.
- -
Processes, ETS tables and Funs
-
The number of processes, ETS tables and funs visible in - the dump.
-
- -
- - More... -
- - - -

Processes

- -

The Process Information page shows a list of all processes - found in the crashdump, including some short information about - each process. By default the processes are sorted by their - pids. To sort by other topic, click any heading in the process - table. - -

Detailed information about a specific process is shown when - the pid is clicked. - -

- - More... -
- - - - -

Ports

- -

The port information page shows all port information found in - the dump. - -

- - More... -
- - - - -

ETS tables

- -

The ETS table information page shows all ETS table - information found in the dump. The 'Id' is the same as the - 'Table' field found in the raw crashdump, and 'Memory' is the - 'Words' field from the raw crashdump translated into - bytes. 'Type' is the type of table, and it can be either "hash" - or "tree". For tree tables there will be no value in the - 'Bucket' field. - -

Clicking a pid in the 'Owner' column takes you to the - detailed information about the process owning the ETS table. - -

- - More... -
- - - -

Timers

- -

The timer information page shows all timer information found - in the dump. - -

Clicking a pid in the 'Owner' column takes you to the - detailed information about the process owning the timer. - -

- - More... -
- - - - -

Fun table

- -

The Fun table information page shows all Fun information - found in the dump. Fun information will only exist in dumps from - OTP R8B or later. - -

- - More... -
- - - - -

Atoms

- -

The atoms information page lists all atoms found in the - dump. The last created atom is listed first. - -

Note that if the dump is from OTP R8B or earlier, the raw - dump lists the atoms in the opposite order and the Crashdump - Viewer reverses them. This means that there is no problem if the - dump is not truncated. However, if the dump is truncated, the - last atoms might not be shown at all!! - -

- - More... -
- - - -

Distribution information

- -

The distribution information page shows all distribution - information found in the dump. - -

If the page shows "Not alive", it means that the node was not - distributed. - -

It the node was distributed, all connected nodes are - shown. Visible nodes are alive nodes with a living connection to - the originating node. Hidden nodes are the same as visible - nodes, except they are started with the "-hidden" flag. Not - connected nodes are nodes that are not connected to the - originating node anymore, but references (i.e. process or port - identitifiers) exist. - -

'Links/Monitors' may contain information about links or - monitors between processes on the originating node and the - connected node. - -

'Extra Info' may contain debug information (i.e. special - information written if the emulator is debug compiled) or error - information. - -

- - More... -
- - - -

Loaded modules

- -

The loaded modules information page shows all modules that - were loaded on the originating node, and the current size of the - code. If old code exsits, the old size is also shown. - -

Detailed information about a specific module is shown when - the module name is clicked. - -

- - More... -
- - - -

Internal tables

- -

Internal tables are shown in two information pages: hash - tables and index tables. - -

- - More... -
- - - -

Memory

- -

Memory information is divided into three pages. - -

The first page, Memory, shows information - similar to what you can obtain on a living node with - c:memory(). This will only be present in dumps from - OTP R9C and later. - More... - -

The Allocated areas page shows information - similar to what you can obtain on a living node with - erlang:system_info(allocated_areas). - More... - -

The Allocator information page shows - information about allocators. The contents of the page will vary - with the version. - More... - -

- -
- - -

Documentation

- -

'Crashdump Viewer help' is this document. - -

'How to interpret Erlang crashdumps' is a document from the - Erlang runtime system describing details in the raw - crashdumps. Here you will also find information about each - single field in the different information pages. - -

-
-
- - -Copyright © 1991-2003 -Ericsson Utvecklings AB
- -
-
- - diff --git a/lib/observer/doc/src/crashdump_ug.xml b/lib/observer/doc/src/crashdump_ug.xml index fd4405df09..d22fb4cc40 100644 --- a/lib/observer/doc/src/crashdump_ug.xml +++ b/lib/observer/doc/src/crashdump_ug.xml @@ -13,12 +13,11 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - Crashdump Viewer @@ -31,9 +30,9 @@
Introduction -

The Crashdump Viewer is an HTML based tool for browsing Erlang - crashdumps. Crashdump Viewer runs under the WebTool application. -

+

The Crashdump Viewer is a WxWidgets based tool for browsing + Erlang crashdumps. +

@@ -42,93 +41,357 @@

The easiest way to start Crashdump Viewer is to use the provided shell script named cdv with the full path to the erlang crashdump as an argument. The script can be found in the - priv directory of the observer application. This starts - WebTool, Crashdump Viewer and a web browser, and loads the given - file. The browser should then display a page named General - Information which shows a short summary of the information in - the crashdump.

- -

The default browser is Internet Explorer on Windows, open on Mac OS X, - or else Firefox. To use another browser, give the browser's start command - as the second argument to cdv. If the given browser name is - not known to Crashdump Viewer, the browser argument is executed as - a command with the start URL as the only argument.

+ priv directory of the observer application. This starts the + Crashdump Viewer GUI and loads the given file. If no file name is + given, a file dialog will be opened where the file can be + selected.

Under Windows the batch file cdv.bat can be used.

It is also possible to start the Crashdump Viewer from within an erlang node by calling crashdump_viewer:start/0. This - will automatically start WebTool and display the web address where - WebTool can be found. See the documentation for the WebTool - application for further information about how to use WebTool.

- -

Point your web browser to the address displayed, and you should - now see the start page of WebTool. At the top of the page, you - will see a link to "CrashDumpViewer". Click this link to get to - the start page for Crashdump Viewer. (Note that if webtool is on - localhost, you must configure your web browser to have direct - connection to the internet, or you must set no proxy for - localhost.) -

-

From the start page of Crashdump Viewer, push the "Load - Crashdump" button to load a crashdump into the tool. Then enter - the filename of the crashdump in the entry field and push the - "Ok" button. This will bring you to the General Information - page, i.e. the same page as the cdv script will open in - the browser. -

-

Crashdumps generated by OTP R9C and later are loaded directly - into the Crashdump Viewer, while dumps from earlier releases first - are translated by the Crashdump Translater. The Crashdump - Translater creates a new file with the same name as the original - crashdump, but with the extension .translated. If there is - no write access to the directory of the original file, you will be - asked to enter a new path and filename for the translated file. -

+ marker="crashdump_viewer#start/0">crashdump_viewer:start/0 + or crashdump_viewer:start/1.

- Navigating -

The lefthand frame contains a menu. Menu folders can be - expanded and collapsed by clicking the folder picture. When a menu - item is clicked, the item information is shown in the big - information frame. -

-

The filename frame above the information frame shows the full - name of the currently viewed Erlang crashdump. -

-

To load a new crashdump, click the "Load New Crashdump" button - in the menu frame. -

-

The various information shown in the information frame will - contain links to process identifiers (PIDs) and port - identifiers. Clicking one of these links will take you to the - detailed information page for the process or port in question. Use - the "Back" button in your browser to get back to the - startingpoint. If the process or port resided on a remote node, - there will be no information available. Clicking the link will - then take you to the information about the remote node. -

+ The graphical interface + +

The main window is opened when Crashdump Viewer has loaded a + crashdump. It contains a title bar, a menu bar, a number of + information panels and a status bar.

+ +

The title bar shows the name of the currently loaded + crashdump.

+ +

The menu bar contains a File menu and a Help + menu. From the File menu a new crashdump can be loaded or the tool + can be terminated. From the Help menu this user's guide and the + chapter "How to interpret the Erlang crash dumps" from the user's + guide for Erlang runtime system can be opened. "How to interpret + the Erlang crash dumps" describes the raw crashdumps in + detail. Here you will also find information about each single + field in the different information pages. This document can also + be found directly in the OTP online documentation, via the Erlang + runtime system user's guide.

+ +

The status bar at the bottom of the window will show a warning + if the currently loaded dump is truncated.

+ +

The centre area of the main window contains the information + panels. Each panel displays information about a specific item or a + list of items. A panel is selected by clicking the title of the + tab.

+ +

From panels that display lists of items, for example the + Processes- or the Ports panel, a new window with further + information can be opened by double clicking a row or by right + clicking the row and selecting an item from the drop down + menu. The new window is called a detail window. Detail windows can + be opened for processes, ports, nodes and modules.

+ +

The various information shown in a detail window might contain + links to processes or ports. Clicking one of these links will open + the detail window for the process or port in question. If the + process or port resided on a remote node, there will be no + information available. Clicking the link will then pop up a dialog + where you can choose whether to open the detail window for the + remote node or not. +

+ +

Some of the panels contain a left hand menu where sub items of + the panel's information area can be selected. Click on one of the + rows, and the information will be displayed in the right hand + information area.

- Help -

Further help on how to use the Crashdump Viewer tool can be - found in the tool's menu under 'Documentation': -

-

'Crashdump Viewer help' is a short document describing each - information page and any additional information that might occur, - compared to the raw dump described in 'How to interpret Erlang - crashdumps'. -

-

'How to interpret Erlang crashdumps' is a document from the - Erlang runtime system describing details in the raw - crashdumps. Here you will also find information about each single - field in the different information pages. This document can also - be found directly in the OTP online documentation, via the Erlang - runtime system user's guide. -

+ Data content + +

Each panel in the main window contains an information + page. If no information is found for an item, the page will be + empty. The reason for not finding any information about an item + can be that the dump is truncated, that it is a dump from an old + OTP release in which this item was not written or that the item + simply wasn't present in the system at the point of failure.

+ +

If the dump was truncated, a warning is displayed in the + status bar of the main window.

+ +

Even if some information about an item exists, there might be + empty fields if the dump originates from an old OTP release.

+ +

The value "-1" in any field means "unknown", and in most + cases it means that the dump was truncated somewhere around this + field.

+ +

The sections below describe some of the fields in the + different information panels. These are fields that do not exist + in the raw crashdump, or in some way differ from the fields in + the raw crashdump. Details about other fields can be found in + the user's guide for the Erlang runtime system, in the chapter + "How to interpret the Erlang crash dumps". That chapter can also + be opened from the Help menu in the Crashdump Viewer's main + window, and there are also direct links from the specific + sections below to related information in "How to interpret the + Erlang crash dumps".

- +
+ + General information + +

The General information panel shows a short overview + of the dump.

+ +

The following fields are not described in the Erlang runtime + system user's guide:

+ + + Crashdump created on + Time of failure. + + Memory allocated + The total number of bytes allocated, equivalent to + c:memory(total). + + Memory maximum + The maximum number of bytes that has been allocated during + the lifetime of the originating node. This will only be shown if + the Erlang runtime system was run instrumented. + + Atoms + If available in the dump, this is the total number of + atoms in the atom table. If the size of the atom table is not + available, the number of atoms visible in the dump is + presented. + + Processes, ETS tables and Funs + The number of processes, ETS tables and funs visible in + the dump. + + +

+ More... +

+
+ +
+ + Processes + +

The Processes panel shows a list of all processes + found in the crashdump, including some short information about + each process. By default the processes are sorted by their + pids. To sort by other topic, click the desired column + heading.

+ +

The Memory column shows the 'Memory' field which was + added to crashdumps in R16B01. This is the total amount of memory + used by the process. For crashdumps from earlier releases, this + column shows the 'Stack+heap' field. The value shown is always in + bytes.

+ +

To view detailed information about a specific process, double + click the row in the list or right click the row and select + "Properties for <pid>".

+ +

+ More... +

+
+ +
+ + Ports + +

The Ports panel is similar to the Processes + panel, except it lists all ports found in the crashdump.

+ +

To see more details about a specific port, dobule click the row + or right click it and select "Properties for <port>". From + the right click menu you can also select "Properties for + <pid>", where <pid> is the process connected to the + port.

+ +

+ + More... +

+
+ +
+ + ETS tables + +

The ETS Tables panel shows all ETS table information + found in the dump. The 'Id' is the same as the 'Table' field found + in the raw crashdump, and 'Memory' is the 'Words' field from the + raw crashdump translated into bytes. 'Type' is the type of table, + and it can be either "hash" or "tree". For tree tables there will + be no value in the 'Bucket' field.

+ +

To open the detailed information page about the owner process + of an ETS table, right click the row and select "Properties for + <pid>".

+ +

Double clicking a row in the ETS Tables panel has no + effect.

+ +

From the left hand menu you can also select to see internal ETS + tables.

+ +

+ + More... +

+
+ +
+ + Timers + +

The Timers panel shows all timer information found in + the dump.

+ +

To open the detailed information page about the owner process + of a timer, right click the row and select "Properties for + <pid>".

+ +

Double clicking a row in the Timers panel has no effect.

+ +

+ More... +

+
+ +
+ + Funs + +

The Funs panel shows all Fun information found in the + dump.

+ +

To open the detailed information page about the module to which + the fun belongs, right click the row and select "Properties for + <mod>".

+ +

Double clicking a row in the Funs panel has no effect.

+ +

+ More... +

+
+ +
+ + Atoms + +

The Atoms panel lists all atoms found in the dump. By + default the atoms are sorted in creation order from first to + last. This is opposite of the raw crashdump where atoms are listed + from last to first, meaning that if the dump was truncated in the + middle of the atom list only the last created atoms will be seen + in the Atoms panel.

+ +

+ More... +

+
+ +
+ + Nodes + +

The Nodes panel shows a list of all external erlang + nodes which are referenced from the crashdump.

+ +

If the page is empty it either means that the crashed node was + not distributed, that it was distributed but had no references to + other nodes or that the dump was truncated.

+ +

If the node was distributed, all referenced nodes are + shown. The column named Connection type shows if the node + is visible, hidden or not connected. Visible nodes are alive nodes + with a living connection to the originating node. Hidden nodes are + the same as visible nodes, except they are started with the + -hidden flag. Not connected nodes are nodes that are not + connected to the originating node anymore, but references + (i.e. process or port identifiers) exist.

+ +

To see more detailed information about a node, double click the + row or right click the row and select "Properties for node + <node>". From the right click menu you can also select + "Properties for <port>", to open the detailed information + window for the controlling port.

+ +

In the detailed information window for a node, any exsisting + links and monitors between processes on the originating node and + the connected node are shown. Extra Info may contain + debug information (i.e. special information written if the + emulator is debug compiled) or error information.

+ +

+ + More... +

+
+ +
+ + Loaded modules + +

The Modules panel lists all modules that were loaded + on the originating node, and the current size of the code. If old + code exsits, the old size is also shown.

+ +

To see detailed information about a specific module, double + click the row or right click it and select "Properties for + <mod>".

+ +

+ + More... +

+
+ +
+ + Memory + +

The Memory panel shows memory and allocator + information. From the left hand menu you can select:

+ +

+ + + Memory More... + + Allocator Summary - this page presents a + summary of values from all allocators below. + + <Allocator> - one entry per allocator + More... + + Allocated Areas More... + + +

+
+ +
+ + Internal tables + +

On the Internal Tables panel you can choose from the + left hand menu to see hash tables or index tables.

+ +

+ More... +

+
+ diff --git a/lib/observer/doc/src/ref_man.xml b/lib/observer/doc/src/ref_man.xml index 3230a1c9d3..c3805b2d86 100644 --- a/lib/observer/doc/src/ref_man.xml +++ b/lib/observer/doc/src/ref_man.xml @@ -38,5 +38,6 @@ + -- cgit v1.2.3