1# dreport 2 3dreport is a shell script that uses plugin shell scripts to collect debug 4information about the system and package it into a tar.xz archive file. 5 6The phosphor-dump-manager application will automatically run dreport in certain 7failure cases, and it can also be run manually by running `dreport` or 8`dreport -v`. 9 10## Dump Types 11 12The dump types are defined in [sample.conf](sample.conf): 13 14- core: Triggered by an application core dump 15- user: The type when manually called, such as from running `dreport`. 16- elog: Triggered when there are specific phosphor-logging event logs. 17- checkstop: Triggered on a specific type of host crash. 18- ramoops: Triggered when there is a kernel panic. 19 20## Plugins 21 22The plugins are the shell scripts in the [plugins.d](plugins.d) subdirectory. 23They can call [provided functions](include.d/functions) to add data to the dump 24archive. Each plugin needs a comment line like the following to specify which 25dump types should trigger it: 26 27```bash 28# config A B 29``` 30 31- 'A' is a sequence of the dump types from the mapping defined in 32 [sample.conf](sample.conf). 33- 'B' is a priority determines the order the plugins run in. 34 35For example, the `bmcstate` plugin has: 36 37```bash 38# config: 12345 5 39``` 40 41It will run on dump types 1 (core), 2 (user), 3 (checkstop), 4 (checkstop), and 425 (ramooops) with a priority of 5. 43 44During the bitbake build, the script will be linked into a directory based on 45the dump type, with the priority built into the name: 46 47```bash 48/usr/share/dreport.d# find /usr/share/dreport.d/ -name *bmcstate 49/usr/share/dreport.d/plugins.d/bmcstate 50/usr/share/dreport.d/pl_user.d/E5bmcstate 51/usr/share/dreport.d/pl_checkstop.d/E5bmcstate 52/usr/share/dreport.d/pl_elog.d/E5bmcstate 53/usr/share/dreport.d/pl_core.d/E5bmcstate 54``` 55