[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Understanding the Diagnostic Subsystem for AIX

error_log_get

Purpose

Returns error-log entries.

Syntax

#include     <diag/diag.h>

int  error_log_get ( option, criteria, err_data )
int option;
char  *criteria;
struct errdata *err_data;

Description

The error_log_get subroutine allows the Diagnostic Application (DA) to query the error log for entries.

Parameters

option Describes the operation to be performed. The following values are defined:
INIT Initializes error log retrieve.
SUBSEQ Gets next error-log entry.
TERMI Ends error log retrieve.
NVRAMEL Use the NVRAM error log as the source for the error log retrieve. Only the following members of struct errdata are available when the error log is obtained from NVRAM:
  • time_stamp
  • err_id
  • resource
  • detail_data_len
  • detail_data
criteria Used with the INIT option to specify which device to obtain the error log data for and how far back to search. This parameter can be set to any valid option used by the errpt command.
When used with the NVRAMEL option, this can be either a list of resource names (with the -N switch) or an error ID (with the -j switch), but not both.
struct errdata Data type that contains the following data filled in for use by the DA.
struct errdata {
      unsigned   sequence;       /* sequence number of entry  */
      unsigned   time_stamp;     /* entry time stamp  */
      unsigned   err_id;         /* error ID code  */
      char       *machine_id;    /* machine ID  */
      char       *node_id;       /* node  */
      char       *class;         /* H=hardware, S=software  */
      char       *type;          /* PERM,TEMP,PERF,PEND,UNKN  */
      char       *resource;      /* Configured device name  */ 
      char       *vpd_data;      /* VPD info  */
      char       *conn_where;    /* connwhere field of CuDv  */
      char       *location;      /* location field of CuDv  */
      unsigned detail_data_len;  /* length of detail data  */
      char     *detail_data;     /* detail data  */

Return Value

Return values are dependent on the option performed:

INIT 0: No error
1: Error-log entry available
-1: Error obtaining data
SUBSEQ 0: No more entries available
1: Error-log entry available
TERMI 0: Terminate successful
NVRAMEL 0: No entries matching criteria
1: Error-log entry available
-1: Error accessing NVRAM
-2: Invalid criteria

[ Previous | Next | Contents | Home | Search ]