query_log structure
The query_log structure is passed into dlog_query and dlog_numMatches to search the diagnostic event log for entries matching an input criteria. The calling application is responsible for allocating memory for the query_log structure and for inputting valid search criteria into the structure. This structure is defined in diag_log.h.
The query_log structure is defined as:
typedef struct _log_query_crit {
char *pathname; /*Path of diagnostic event log file to search*/
char type; /*Request entries matching a log template*/
char identifier[5]; /*Request entries matching identifier*/
char *name; /*Request entries matching Resource Name*/
unsigned int session; /*Request entries matching Diag Session's PID*/
char *location; /*Pointer to logical or physical location code*/
unsigned int firstSeqNum; /*Request entries with this sequence number or
higher*/
unsigned int lastSeqNum; /*Request entries with this sequence number or
lower*/
unsigned int el_identifier; /*Request entries matching this error log
identifier*/
unsigned int elSeqFirst; /*Request entires with this error log sequence
number or higher*/
unsigned int elSeqLast; /*Request entries with this error log
sequence number or lower*/
unsigned int numDays; /*Request entries x number of days backward or
forward*/
struct tm *startDate; /*Request entries after this date*/
struct tm *endDate; /*Request entries before this date*/
char *srn; /*Request entries matching this SRN*/
char *mgoal; /*Request entries matching this menugoal*/
unsigned int maxEntries; /*Maximum number of entries to return*/
char *src; /*Request entries matching this SRC*/
unsigned int openEvents; /*Request only entries newer than the last
repair action for a given resource. */
char reserved[100-(sizeof(char*))-(sizeof(unsigned int))];
/*Reserved for future use*/
} query_log;
| Item | Description |
|---|---|
| pathname | Path of the diagnostic event log to search. The default path is searched if no path is provided. |
| type | Specifies entries matching a type of log template. I, S, N, E, and X are the valid values for type. |
| identifier | Specifies entries matching a diagnostic event log identifier. |
| name | Specifies entries matching a resource name. This field can be fully or partially qualified. For example, when name is ent*, entries logged against devices beginning with ent will be returned. |
| session | Specifies entries containing a process ID of a diagnostic session. |
| location | Specifies entries containing a location code. |
| firstSeqNum | Specifies entries with this diagnostic event log sequence number or higher. |
| lastSeqNum | Specifies entries with this diagnostic event log sequence number or lower. When searching on a single sequence number use only firstSeqNum. |
| el_identifier | Specifies entries with this AIX® error log identifier. |
| elSeqFirst | Specifies entries with this AIX error log sequence number or higher. |
| elSeqLast | Specifies entries with this AIX error log sequence number or lower. When searching on a single error log sequence number use elSeqFirst only. |
| numDays | Searches the diagnostic event log for entries logged this number of days before endDate, or this number of days after startDate, or this number of days before the current date and time. Valid with either startDate or endDate. |
| startDate | Searches the diagnostic event log for entries logged after this date and time. Valid with either numDays or endDate. |
| srn | Searches the diagnostic event log for entries matching this Service Request Number. This field can be fully or partially qualified. For example, when srn is 651*, entries containing Service Request Number starting with 651 will be returned. |
| mgoal | Searches the diagnostic event log for entries matching this menugoal. This field can be fully or partially qualified. For example, when mgoal is 651*, entries containing menugoals with a menu number starting with 651 will be returned. |
| endDate | Searches the diagnostic event log for entries logged before this date and time. Valid with either numDays or startDate. |
| maxEntries | Specifies a maximum number of entries to return. Entries with higher diagnostic event log sequence numbers have a higher priority to be returned. If maxEntries is 0, then all matching entries are returned. |
| src | The diagnostic event log is searched for entries matching this system reference code (SRC). This field can be fully or partially qualified. For example, when src is BF0*, entries with SRCs beginning with BF0 will be returned. |
| openEvents | The diagnostic event log is searched for matching entries and that are newer than the last repair action for a given resource. The name field, without wild cards, must also be specified in the query. |
| reserved | Reserved for future use. |