bperror

bperror — display NetBackup status and troubleshooting information or entries from NetBackup error catalog

SYNOPSIS

<admin_dir_path>bperror {-S | -statuscode status_code} [-r | -recommendation] [[-p Unx | NTx] | [-platform Unx | NTx]] [-v]

<admin_dir_path>bperror [-all | -problems | -media | tape] {-backstat [-by_statcode]} [-L | -l | -U] [-columns ncols] [-d date | -hoursago hours] [-e date] [-client client_name] [-server server_name] [-jobid job_id] [-M master_server,...] [-v]

<admin_dir_path>bperror [-s {severity[+]}|severity ...] [-t type ...] [-dt disk_type] [-L | -l | -U] [-columns ncols] [-d date | -hoursago hours] [-e date] [-client client_name] [-server server_name] [-jobid job_id] [-M master_server,...] [-v]

On Windows systems, <admin_dir_path> is <install_path>\NetBackup\bin\admincmd\

DESCRIPTION

bperror displays information from either the same source as the online troubleshooter (in the Activity Monitor or Reports applications) or from the NetBackup error catalog. bperror provides the following types of displays:

  • A display of the message that corresponds to a status code and, optionally, a recommendation on how to troubleshoot the problem. In this case, the display results come from the same source as the online troubleshooter for the local system.

  • A display of the error catalog entries that satisfy the command-line options. For instance, bperror can display all the problem entries for the previous day.

  • A display of the error catalog entries that correspond to a particular message severity and message type.

For information on details of the displays, see DISPLAY FORMATS later in this command description.

bperror writes its debug log information to the following directory:

On Windows systems: install_path\NetBackup\logs\admin

You can use the information in this directory for troubleshooting.

The output of bperror goes to standard output.

OPTIONS

-all, -backstat [-by_statcode], -media, -problems

These options specify the type and severity of log messages to display. The default type is ALL. The default severity is ALL.

-all: The type is ALL, and severity is ALL. Run bperror with this option and with -U to produce an All Log Entries report.

-backstat: The type is BACKSTAT, and severity is ALL. If -by_statcode is present, the display contains one entry for each unique status code. Line 1 of the entry contains the status code and the corresponding message text. Line 2 of the entry contains the list of clients for which this status code occurred. -by_statcode is only valid when the command line contains both -backstat and -U. Run bperror with this option and with -U to produce a Backup Status report.

-media: The type is MEDIADEV, and severity is ALL. Run bperror with this option and with -U produces a Media Logs report.

-problems: The type is ALL, and severity is the union of WARNING, ERROR, and CRITICAL. Run bperror with this option and with -U to produce a Problems report.

-client client_name

Specifies the name of a NetBackup client. This name must be as it appears in the NetBackup catalog. By default, bperror searches for all clients.

-columns ncols

For the -L and -U reports, -columns provides an approximate upper bound on the maximum line length. bperror does not try to produce lines exactly ncols characters in length.

-columns does not apply to the -l report.

ncols must be at least 40. The default is 80.

-d date, -e date

Specifies the start date and end date range for the listing.

-d specifies a start date and time (optional) for the listing. The resulting list shows only images in the backups or archives that occurred at or after the specified date-time. The valid range of dates is from 01/01/1970 00:00:00 to 01/19/2038 03:14:07. The default is 24 hours before the current date and time.

-e specifies an end date and time (optional) for the listing. The resulting list shows only files from backups or the archives that occurred at or before the specified date and time. Use the same format for the start date. The default is the current date and time. The end date must be greater than or equal to the start date.

The required date and time values format in NetBackup commands varies according to your locale. The /user/openv/msg/.conf file (UNIX and Linux) and the install_path\VERITAS\msg\LC.CONF file (Windows) contain information such as the date-time formats for each supported locale. The files contain specific instructions on how to add or modify the list of supported locales and formats.

More information is available about the locale of your system.

See the "Specifying the locale of the NetBackup installation" topic in the NetBackup Administrator's Guide, Volume II.

The following is a typical format for the -d and -e options:

[-d mm/dd/yyyy hh:mm:ss | -hoursago hours]
[-e mm/dd/yyyy hh:mm:ss]
-dt disk_type

Enables the user to specify a disk type. The following are the valid values for disk_type:

0 - All

1 - BasicDisk

2 - NearStore

3 - SnapVault

6 - DiskPool

-hoursago hours

Specifies a start time of many hours ago, which is equivalent to specifying a start time (-d) of the current time minus hours. Hours is an integer. The default is 24, which is a start time of 24 hours before the current time.

-jobid job_id

Specifies a NetBackup job ID. By default, bperror searches for all job IDs.

-L

Reports in long format.

-l

Reports in short format. This report produces a terse listing. This option is useful for scripts or the programs that rework the listing contents into a customized report format. This option is the default list type.

-M master_server,...

Specifies a comma-separated list of one or more hostnames. The command is run on each of the master servers in this list. The master servers must allow access by the system that issues the command. If an error occurs for any master server, the process stops at that point in the list. The default is the master server for the system where the command is entered.

-p Unx | NTx, -platform Unx | NTx

Displays the message that applies to the platform (UNIX or Windows) for the specified status code. The default is to display the message for the platform on which bperror is running. The -S or -statuscode option must be specified when you use this option.

-r | -recommendation

Displays the recommended action for the specified status code from the troubleshooting guide. The default is not to display the recommendation. The -S or -statuscode option must be specified when you use this option.

-S status_code, -statuscode status_code

Displays the message that corresponds to the status code. This option has no default condition.

-s severity, -s severity+

Specifies the severity of log messages to display. The defined values are ALL, DEBUG, INFO, WARNING, ERROR, and CRITICAL.

You can specify severity in two ways. The first way is a list of one or more severity values. For instance, "-s INFO ERROR" displays the messages with either severity INFO or severity ERROR. The delimiter must be a blank (" ") between the elements in the list . The second way is a single severity value with "+" appended, which is this severity or greater. For instance "-s WARNING+" displays the messages with severity values WARNING, ERROR, and CRITICAL.

The default is ALL. The severity value can be in uppercase or lowercase.

-server server_name

Specifies the name of a NetBackup server. This name must be as it appears in the NetBackup catalog. The display is limited to the messages that are logged for this server, which also satisfies the criteria for any other bperror options. For example, if -server plim and -hoursago 2 are bperror options, the display contains the messages that were logged for plim in the past two hours.

The server name must match the server name that was recorded in the log messages. For example, if the logs record the server name as plim.null.com, -server plim does not display the logs, but -server plim.null.com does.

The query goes to the error catalog which resides on either the local master server or the master server that -M specifies. The master server must allow access by the system that runs bperror.

The default is to display log messages for all media servers that are known to the master server(s).

-t type

Specifies the type of log messages to display. The defined values are ALL, BACKSTAT, MEDIADEV, GENERAL, BACKUP, ARCHIVE, RETRIEVE, and SECURITY. The default is ALL. The type value can be upper or lower case. It is entered as a list of one or more values. For instance, -t BACKSTAT MEDIADEV displays the messages with either type BACKSTAT or type MEDIADEV. The delimiter between the list elements must be a blank (" ").

-U

Reports in user format. NetBackup report-generating tools such as the NetBackup-Java Reports application uses this report.

-v

Verbose mode. This option causes bperror to log additional information for the debugging purposes that go into the NetBackup-administration daily debug log. -v is meaningful only when NetBackup has debug logs enabled (install_path\NetBackup\logs\admin/usr/openv/netbackup/logs/admin directory defined). The default is to not be verbose.

DISPLAY FORMATS

The following are display formats of the bperror command:

  • Status code display (for example, bperror -S status_code):

    bperror queries the NetBackup online troubleshooter on the local system for the message that corresponds to the status code. bperror displays the message text on one line and an explanation on a second line.

    If -r is an option, bperror also queries for the troubleshooting recommendation that corresponds to the status code. bperror displays the recommendation following the status message, on one or more lines.

  • Error catalog display (for example, bperror -all; bperror -s severity):

    bperror queries the NetBackup error catalog on either the local master server or the master servers in the -M option list. The display consists of the results that are returned from querying the error catalog on the master server(s). The results are limited to catalog the entries that satisfy all the bperror options. For example, the bperror command line may contain options for client, start time, and end time. If so, then bperror reports only the jobs that are run for that client between the start time and end time.

    The display variant that shows individual message entries from the error catalog can appear in long (-L), user (-U), or short (-l) format. The display variant that categorizes by status code can appear in user (-U) format only. The following is the display content for each of these formats:

  • Error catalog display, individual message entries, long format (for example, bperror -media -L). This report produces several lines per log entry, with the following contents:

    Line 1: Date and time

    V:NetBackup version

    S:Server

    C:Client

    J:Job ID

    (U:Job group ID and an unused field.) If a policy is multistream enabled, the job group ID is the job ID of the first job that spawned a collection of multistreaming backups. If multistreaming is disabled for the policy, the job group ID is always zero.

    Line 2: Severity (severity name and severity code in hexadecimal)

    Type (type name and type code in hexadecimal)

    Who (name of the entity that added the log entry)

    Line 3: Text (at the start of the log message text, continued on subsequent lines if necessary)

  • Error catalog display, individual message entries, user format (for example, bperror -media -U). The user format produces a header line that shows column names, and one or more lines per log entry with these contents:

    Line 1: Date and time

    Server

    Client

    Text (at the start of the log message, continued on subsequent lines if needed)

  • Error catalog display, individual message entries, short format (for example, bperror -media -l). The short format produces a single line per log entry, with the following contents:

    Line 1: Time (internal system representation)

    NetBackup version

    Type code (decimal)

    Severity code (decimal)

    Server

    Job ID

    Job Group ID

    An unused field

    Client

    Who

    Text (the entire log message text, with no truncation of the line length)

  • Error catalog display that the status code categorizes. This display reports only each unique status code, instead of listing every log entry for that status code (for example, bperror -backstat -by_statcode -U). This option produces two or more lines per status code, with the following contents:

    Line 1: Status code

    Text (the beginning of the log message text, continued on subsequent lines if necessary)

    Line 2: The list of clients for which this status occurred.

EXAMPLES

EXAMPLE 1

Here bperror displays the error for a job that failed because the NetBackup encryption package was not installed. Status code 9 is the NetBackup status code for this failure. The second run of bperror displays the action that is recommended for NetBackup status code 9.

# bperror -d 12/23/2007 16:00:00 -e 12/23/2007 17:00:00 -t backstat 
-U
STATUS CLIENT	POLICY	SCHED	SERVER	TIME COMPLETED 
9	plim	dhcrypt   user	 plim	12/23/2007 16:38:09
an extension package is needed, but was not installed
# bperror -S 9 -r
an extension package is needed, but was not installed
A NetBackup extension product is required in order to perform the 
requested operation.
Install the required extension product.

EXAMPLE 2

bperror reports the problems in the User format that have occurred in the previous 24 hours.

# bperror -U -problems
		TIME			SERVER CLIENT - TEXT
11/23/2007 16:07:39 raisins - no storage units configured
11/23/2007 16:07:39 raisins - scheduler exiting - failed reading 
storage unit database information (217)
11/23/2007 16:17:38 raisins - no storage units configured
11/23/2007 16:17:38 raisins - scheduler exiting - failed reading 
storage unit database information (217)
11/23/2007 18:11:03 raisins nut bpcd on nut exited with status 59: 
access to the client was not allowed
11/23/2007? 18:11:20 raisins - WARNING: NetBackup database backup is 
currently disabled

EXAMPLE 3

The following example displays status for type backstat for the jobs that are run in the previous 24 hours. The option -by_statcode produces a display that is organized by status code.

The display shows that one or more jobs for each of the clients chive, gava, and raisins have completed successfully (the status code is 0). In addition, one or more jobs for client nut have failed because nut did not allow access by the master server or media server. (The status code is 59.)

# bperror -U -backstat -by_statcode
		 0   the requested operation was successfully completed
			 chive gava raisins
		 59   access to the client was not allowed 
			 nut

EXAMPLE 4

This example identifies and retrieves the results for a particular user job. It first lists the log entries with job IDs other than zero. It then runs a User-format report on the job of interest.

# bperror -hoursago 2007 -L | grep 'S:' | egrep 'J\:[1-9]'
12/21/2007 17:24:14 V1 S:plim C:plim J:1 (U:0,0)
12/23/2007 16:31:04 V1 S:plim C:plim J:1 (U:0,0)
12/23/2007 16:38:04 V1 S:plim C:plim J:3 (U:0,0)
# bperror -d 1/7/2007 -jobid 34 -U
	 TIME			SERVER CLIENT - TEXT
01/07/2007 13:12:31 plim plim started backup job for client plim, 
policy jdhcrypt, schedule user on storage unit jdhcrypt
01/07/2007 13:12:40 plim plim successfully wrote backup id 
plim_0947272350,copy 1, fragment 1, 32 Kbytes at 11.057 Kbytes/sec
01/07/2007 13:12:41 plim plim CLIENT plim POLICY jdhcrypt SCHED user 
EXIT STATUS 0 (the requested operation was successfully completed)

EXAMPLE 5

This example shows media entries in the error catalog for the past 2000 hours.

bperror -hoursago 2000 -media -U
		TTIME			SERVER CLIENT - TEXT
12/23/2007 16:31:04 plim plim  Media Manager terminated during mount 
of media id A00000, possible media mount timeout
12/24/2007 04:31:20 plim -  media id A00000 removed from Media 
Manager database (manual deassign)

EXAMPLE 6

This example reports and adds up the total number of bytes backed up in the past 24 hours.

bperror -all -hoursago 24 | grep "successfully wrote backup id | awk 
'{bytes= bytes + $20} END {print "backed up",bytes," Kbytes of 
data"}'
backed up 64  Kbytes of data
up",bytes," Kbytes of data"}'