Product SiteDocumentation Site

21.3.2. Using the Command Line Interface

Problem data saved by abrtd can be viewed, reported, and deleted using the command line interface.
General usage of the abrt-cli tool can be described using the following syntax:
 abrt-cli [--version] <command> [<args>] 
…where <args> stands for a problem data directory and/or options modifying the commands, and <command> is one of the following sub-commands:
To display help on particular abrt-cli command use:
 abrt-cli <command> --help  
The rest of the commands used with abrt-cli are described in the following sections.

21.3.2.1. Viewing Problems

To view detected problems, enter the abrt-cli list command:
~]# abrt-cli list
Directory:      /var/spool/abrt/ccpp-2011-09-13-10:18:14-2895
count:          2
executable:     /usr/bin/gdb
package:        gdb-7.2-48.el6
time:           Tue 13 Sep 2011 10:18:14 AM CEST
uid:            500

Directory:      /var/spool/abrt/ccpp-2011-09-21-18:18:07-2841
count:          1
executable:     /bin/bash
package:        bash-4.1.2-8.el6
time:           Wed 21 Sep 2011 06:18:07 PM CEST
uid:            500
  • Directory — Shows the problem data directory that contains all information about the problem.
  • count — Shows how many times this particular problem occurred.
  • executable — Indicates which binary or executable script crashed.
  • package — Shows the name of the package that contains the program that caused the problem.
  • time — Shows the date and time of the last occurrence of the problem.
  • uid — Shows the ID of the user which ran the program that crashed.
The following table shows options available with the abrt-cli list command. All options are mutually inclusive so you can combine them according to your need. The command output will be the most comprehensive if you combine all options, and you will receive the least details if you use no additional options.
Table 21.1. The abrt-cli list command options
Option Description
With no additional option, the abrt-cli list command displays only basic information for problems that have not been reported yet.
-d, --detailed Displays all stored information about problems listed, including a backtrace if it has already been generated.
-f, --full Displays basic information for all problems including the already-reported ones.
-v, --verbose Provides additional information on its actions.

If you want to view information just about one particular problem, you can use the command:
 abrt-cli info <DIR> 
…where <DIR> stands for the problem data directory of the problem that is being viewed. The following table shows options available with the abrt-cli info command. All options are mutually inclusive so you can combine them according to your need. The command output will be the most comprehensive if you combine all options, and you will receive the least details if you use no additional options.
Table 21.2. The abrt-cli info command options
Option Description
With no additional option, the abrt-cli info command displays only basic information for the problem specified by the problem data directory argument.
-d, --detailed Displays all stored information for the problem specified by the problem data directory argument, including a backtrace if it has already been generated.
-v, --verbose abrt-cli info provides additional information on its actions.

21.3.2.2. Reporting Problems

To report a certain problem, use the command:
 abrt-cli report <DIR> 
...where <DIR> stands for the problem data directory of the problem that is being reported. For example:
~]$ abrt-cli report /var/spool/abrt/ccpp-2011-09-13-10:18:14-2895
How you would like to analyze the problem?
1) Collect .xsession-errors
2) Local GNU Debugger
Select analyzer: _
ABRT prompts you to select an analyzer event for the problem that is being reported. After selecting an event, the problem is analyzed. This can take a considerable amount of time. When the problem report is ready, abrt-cli opens a text editor with the content of the report. You can see what is being reported, and you can fill in instructions on how to reproduce the crash and other comments. You should also check the backtrace, because the backtrace might be sent to a public server and viewed by anyone, depending on the problem reporter event settings.

Selecting a preferred text editor

You can choose which text editor is used to check the reports. abrt-cli uses the editor defined in the ABRT_EDITOR environment variable. If the variable is not defined, it checks the VISUAL and EDITOR variables. If none of these variables is set, vi is used. You can set the preferred editor in your .bashrc configuration file. For example, if you prefer GNU Emacs, add the following line to the file:
export VISUAL=emacs
When you are done with the report, save your changes and close the editor. You will be asked which of the configured ABRT reporter events you want to use to send the report.
How would you like to report the problem?
1) Logger
2) Red Hat Customer Support
Select reporter(s): _
After selecting a reporting method, you can proceed with reviewing data to be sent with the report. The following table shows options available with the abrt-cli report command.
Table 21.3. The abrt-cli report command options
Option Description
With no additional option, the abrt-cli report provides the usual output.
-v, --verbose abrt-cli report provides additional information on its actions.

21.3.2.3. Deleting Problems

If you are certain that you do not want to report a particular problem, you can delete it. To delete a problem so ABRT does not keep information about it, use the command:
 abrt-cli rm <DIR> 
...where <DIR> stands for the problem data directory of the problem being deleted. For example:
~]$ abrt-cli rm /var/spool/abrt/ccpp-2011-09-12-18:37:24-4413
rm '/var/spool/abrt/ccpp-2011-09-12-18:37:24-4413'

Deletion of a problem can lead to frequent ABRT notification

Note that ABRT performs a detection of duplicate problems by comparing new problems with all locally saved problems. For a repeating crash, ABRT requires you to act upon it only once. However, if you delete the crash dump of that problem, the next time this specific problem occurs, ABRT will treat it as a new crash: ABRT will alert you about it, prompt you to fill in a description, and report it. To avoid having ABRT notifying you about a recurring problem, do not delete its problem data.
The following table shows options available with the abrt-cli rm command.
Table 21.4. The abrt-cli rm command options
Option Description
With no additional option, the abrt-cli rm.
-v, --verbose abrt-cli rm provides additional information on its actions.