[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Understanding the Diagnostic Subsystem for AIX

dlog_open

Purpose

Read an entry from the Diagnostic Event Log at the specified offset.

Syntax

#include                <diag/diag_log.h>

int dlog_open(char *pathname,dl_info **info)

Description

The dlog_open subroutine opens the specified log file for reading. If the pathname is NULL, then the default diagnostic log file will be used. This subroutine also allocates memory for the dl_info structure and initializes the structure.

Parameters

Parameter Description
pathname Name of log to open (if NULL, the default log is used)
info Pointer to structure of format:
 typedef struct _log_info {
    int fd;                            /* File descriptor                   */
    int lockId;                        /* ODM Lock id                       */
    dl_att *dlAtt;                     /* Pointer to log attributes         */
    dl_einfo *dlArray;                 /* Pointer to log array              */
} dl_info;

typedef struct _log_einfo {
    int version;                       /* Entry Version                     */
    char logType;                      /* Log Type - I,S,N,E,X              */
    unsigned int size;                 /* Entry Size                        */
    unsigned int offset;               /* Offset from the file's beginning  */
} dl_einfo;

typedef struct _log_att {
    int version;                       /* Version                           */
    unsigned int numEntries;           /* number of log entried             */
    unsigned int lastIndex;            /* index of latest entry             */
    unsigned int nextSeqNum;           /* sequence number of next log entry */
    unsigned int maxLogSize;           /* maximum size of log               */
    unsigned int arrayOffset;          /* array offset                      */
    unsigned int wrapCount;            /* number of times file has wrapped  */
} dl_att;

Return Value

Upon successful completion, 0 is returned. Otherwise, a value of -1 is returned.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]