Wiki

This version (27 Aug 2015 18:22) was approved by larsc.The Previously approved version (24 Mar 2015 15:56) is available.Diff

Diagnostic Report Tool

The Diagnostic Report Tool is a program that is able collect and process various system status information and generate a report file containing this information.

The information contained in this report can be used to asses and debug system problems or failures. In order to guarantee fast and precise support it is recommended to always include a diagnostic report generated by the Diagnostic Report Tool when reporting a problem.

The Diagnostic Report Tool provides both a graphical user interface and a command-line interface.

Graphical User Interface

Launch ADI Diagnostic Report Tool

The graphical user interface of the Diagnostic Report Tool can be launched from the “Applications Menu” in the “System” section.

It is also possible to launch the Diagnostic Report Tool from a terminal by executing adi_diagnostic_report --gui.

Generate Diagnostic Report

Generate Diagnostic Report

When generating the diagnostic report the first step is to select the location where to store the report.

  • BOOT Partition: Copies the file directly to the BOOT partition of the SD card, which makes it possible to access the report accessible from your laptop or desktop computer by removing the SD card from the FPGA carrier board plugging it into the computer.
  • Network Share: Copies the file directly to the network share, which makes it possible to access the the file from your laptop or desktop computer via a network connection to the FPGA carrier board.
  • Other: Allows to manually select an arbitrary location.

Clicking the “Generate Diagnostic Report” button will generate the report and store it in the specified location, the name of the report file is “diagnostic_report.tar.bz2”.

Select Sub-Reports

When reporting a problem it is recommended to use the default sub-report selection unless otherwise requested.

Each diagnostic report consists of various individual sub-reports. It is possible to enable or disable these sub-reports individually in the 'Sub-report selection' section.

Most sub-reports are enabled by default, only those that might contain sensitive data (like the network configuration) are not enabled by default. To properly assess and debug certain problems it may be required to include these sub-reports as well though.

Command Line Interface

The Command Line Interface can be used as an alternative to the Graphical User Interface, e.g. to debug issues with the graphic environment. The Command Line Interface can be launched directly from the serial console or via a terminal application. In order to be able to successfully gather all diagnostic information it is important to run the tool with root privileges. When not logged in as the root user the command should be executed with sudo.

Generate Diagnostic Report

To generate a diagnostic report from the command-line run the adi_diagnostic_report command. By default the report will be saved into a file called “diagnostic_report.tar.bz2”. The file name or the location of the file can be changed by the --file-name parameter.

Generate diagnostic report

$ adi_diagnostic_report
Successfully created report at "diagnostic_report.tar.bz2".

Generate diagnostic report with a custom file name

$ adi_diagnostic_report --file-name /tmp/diag_report.tar.bz2
Successfully created report at "/tmp/diag_report.tar.bz2".

Often it is necessary or useful to be able to copy the diagnostic report to a desktop or laptop PC. A easy way to do this is to use the BOOT partition on the SD card. The following commands show how to generate the report and copy it to the BOOT partition. Afterward the board can be shutdown and the card removed and inserted into the desktop or laptop PC.

Generate diagnostic report and copy it to the SD card BOOT partition

$ adi_diagnostic_report
Successfully created report at "diagnostic_report.tar.bz2".
$ mount /dev/mmcblk0p1 /media/boot/
$ cp diagnostic_report.tar.bz2 /media/boot/
$ umount /media/boot
$ poweroff

Select Sub-Reports

Each report consists of various sub-reports. It is possible to individually enable or disable a sub-report. Most reports are enabled by default, except for some which might contain sensitive information (e.g. the network configuration).

A list of all sub-reports and their description can be generated by passing the --list parameter to adi_diagnostic_report tool.

List all available sub-reports

$ adi_diagnostic_report --list
Name          | Description                                                   | Default Enabled
--------------+---------------------------------------------------------------+------------------
boot          | BOOT partition information                                    | True
char_dev      | Character devices (/dev/)                                     | True
clocks        | Clock information                                             | True
cmdline       | Kernel command line (/proc/cmdline)                           | True
devicetree    | Devicetree (/proc/device-tree/)                               | True
dmesg         | Boot log (dmesg)                                              | True
fru           | FMC FRU EEPROMs                                               | True
hdl_info      | Bitstream information                                         | True
iio_info      | IIO device information (iio_info)                             | True
interrupts    | Interrupts (/proc/interrupts)                                 | True
iomem         | IO memory mappings (/proc/iomem)                              | True
kernel_config | Kernel configuraton                                           | True
mount         | Mounted filesystems (mount)                                   | True
network       | Network configuration                                         | False
os-release    | OS version (/etc/os-release)                                  | True
regmap        | Device register settings (regmap)                             | True
src_rev       | ADI tools source revisions                                    | True
status        | Board status signals                                          | True
sys_bus       | Registered devices and drivers (/sys/bus/{platform,i2c,spi}/) | True
uname         | Kernel Version (uname)                                        | True
video         | Video out information                                         | True
xorg          | Display Server log (Xorg)                                     | True

It is possible to enable or disable certain sub-reports by specifying them to the --enable and --disable command line parameters. Multiple sub-reports are separated by a comma. It is only possible to specify each parameter once. If a sub-report is passed to both --enable and --disable, enable will take precedence.

Generate report with network sub-report enabled and dmesg and fru sub-report disabled

$ adi_diagnostic_report --enable network --disable dmesg,fru
Successfully created report at "diagnostic_report.tar.bz2".

Passing the special value all to either --enable or --disable will select or de-select all sub-reports by default. This makes it easy to generate a report that only contains a certain list or sub-reports or a report that contains all but a certain list of sub-reports.

Generate a report with all but the dmesg sub-report

$ adi_diagnostic_report --enable all --disable dmesg
Successfully created report at "diagnostic_report.tar.bz2".

Generate a report with only the dmesg sub-report

$ adi_diagnostic_report --disable all --enable dmesg
Successfully created report at "diagnostic_report.tar.bz2".

Installation

The pre-build Linux images for the Analog Devices reference designs come with the diagnostic report tool pre-installed.

The source code for the diagnostic report tool can be downloaded from the Analog Devices GitHub account diagnostic_report repository.

Install the Diagnostic Report Tool

$ git clone https://github.com/analogdevicesinc/diagnostic_report.git
Cloning into 'diagnostic_report'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 7 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
$ cd diagnostic_report
$ make
sed 's/@PREFIX@/\/usr\/local/' adi-diagnostic-report.desktop.in > adi-diagnostic-report.desktop
$ sudo make install
install -d /usr/local/bin
install -d /usr/local/share/adi_diagnostic_report/
install ./adi_diagnostic_report /usr/local/bin/
install ./adi_diagnostic_report.glade /usr/local/share/adi_diagnostic_report/
xdg-desktop-menu install adi-diagnostic-report.desktop

resources/tools-software/linux-software/diagnostic_report.txt · Last modified: 27 Aug 2015 18:21 by larsc