Motr  M0
iem.h File Reference

Go to the source code of this file.

Macros

#define __MOTR_IEM_H__
 
#define M0_MOTR_IEM(_sev_id, _mod_id, _evt_id)
 
#define M0_MOTR_IEM_DESC(_sev_id, _mod_id, _evt_id, _desc, ...)
 

Enumerations

enum  m0_motr_iem_severity {
  M0_MOTR_IEM_SEVERITY_TEST = 0, M0_MOTR_IEM_SEVERITY_A_ALERT, M0_MOTR_IEM_SEVERITY_X_CRITICAL, M0_MOTR_IEM_SEVERITY_E_ERROR,
  M0_MOTR_IEM_SEVERITY_W_WARNING, M0_MOTR_IEM_SEVERITY_N_NOTICE, M0_MOTR_IEM_SEVERITY_C_CONFIGURATION, M0_MOTR_IEM_SEVERITY_I_INFORMATIONAL,
  M0_MOTR_IEM_SEVERITY_D_DETAIL, M0_MOTR_IEM_SEVERITY_B_DEBUG
}
 
enum  m0_motr_iem_module { M0_MOTR_IEM_MODULE_TEST = 1, M0_MOTR_IEM_MODULE_IO, M0_MOTR_IEM_MODULE_OS }
 
enum  m0_motr_iem_event {
  M0_MOTR_IEM_EVENT_TEST = 1, M0_MOTR_IEM_EVENT_IOQ, M0_MOTR_IEM_EVENT_FREE_SPACE, M0_MOTR_IEM_EVENT_RPC_FAILED,
  M0_MOTR_IEM_EVENT_FOM_HANG, M0_MOTR_IEM_EVENT_MD_ERROR, M0_IEM_EVENT_NR
}
 

Functions

void m0_iem (const char *file, const char *function, int line, const enum m0_motr_iem_severity sev_id, const enum m0_motr_iem_module mod_id, const enum m0_motr_iem_event evt_id, const char *desc,...)
 

Macro Definition Documentation

◆ __MOTR_IEM_H__

#define __MOTR_IEM_H__

Definition at line 26 of file iem.h.

◆ M0_MOTR_IEM

#define M0_MOTR_IEM (   _sev_id,
  _mod_id,
  _evt_id 
)
Value:
m0_iem(__FILE__, __FUNCTION__, __LINE__, \
_sev_id, _mod_id, _evt_id, NULL)
#define NULL
Definition: misc.h:38
void m0_iem(const char *file, const char *function, int line, const enum m0_motr_iem_severity sev_id, const enum m0_motr_iem_module mod_id, const enum m0_motr_iem_event evt_id, const char *desc,...)
Definition: iem.c:58

Definition at line 99 of file iem.h.

◆ M0_MOTR_IEM_DESC

#define M0_MOTR_IEM_DESC (   _sev_id,
  _mod_id,
  _evt_id,
  _desc,
  ... 
)
Value:
m0_iem(__FILE__, __FUNCTION__, __LINE__, \
_sev_id, _mod_id, _evt_id, _desc, __VA_ARGS__)
void m0_iem(const char *file, const char *function, int line, const enum m0_motr_iem_severity sev_id, const enum m0_motr_iem_module mod_id, const enum m0_motr_iem_event evt_id, const char *desc,...)
Definition: iem.c:58

Definition at line 103 of file iem.h.

Enumeration Type Documentation

◆ m0_motr_iem_event

Enumerator
M0_MOTR_IEM_EVENT_TEST 
M0_MOTR_IEM_EVENT_IOQ 
M0_MOTR_IEM_EVENT_FREE_SPACE 
M0_MOTR_IEM_EVENT_RPC_FAILED 
M0_MOTR_IEM_EVENT_FOM_HANG 
M0_MOTR_IEM_EVENT_MD_ERROR 
M0_IEM_EVENT_NR 

Definition at line 67 of file iem.h.

◆ m0_motr_iem_module

The members of enum m0_motr_iem_module and enum m0_motr_iem_event are mapped against the file [low-level/files/iec_mapping/motr] in the sspl repo https://github.com/Seagate/cortx-sspl

Field description of the mpping file is available in slide 11 of the "RAS IEM Alerts" document

0020010001,TestIEM,Motr test IEM 002 is component id, 001 is module id and 0001 is event id

As per "RAS IEM Alerts" document, Other teams inform RAS team about a new IEMs. RAS team will add new IEMs to this file. File will be local to SSPL and may be a part of repo.

Any new entry to these enums must also be updated to the mapping file as well.

Enumerator
M0_MOTR_IEM_MODULE_TEST 
M0_MOTR_IEM_MODULE_IO 
M0_MOTR_IEM_MODULE_OS 

Definition at line 61 of file iem.h.

◆ m0_motr_iem_severity

Enumerator
M0_MOTR_IEM_SEVERITY_TEST 
M0_MOTR_IEM_SEVERITY_A_ALERT 
M0_MOTR_IEM_SEVERITY_X_CRITICAL 
M0_MOTR_IEM_SEVERITY_E_ERROR 
M0_MOTR_IEM_SEVERITY_W_WARNING 
M0_MOTR_IEM_SEVERITY_N_NOTICE 
M0_MOTR_IEM_SEVERITY_C_CONFIGURATION 
M0_MOTR_IEM_SEVERITY_I_INFORMATIONAL 
M0_MOTR_IEM_SEVERITY_D_DETAIL 
M0_MOTR_IEM_SEVERITY_B_DEBUG 

Definition at line 28 of file iem.h.

Function Documentation

◆ m0_iem()

void m0_iem ( const char *  file,
const char *  function,
int  line,
const enum m0_motr_iem_severity  sev_id,
const enum m0_motr_iem_module  mod_id,
const enum m0_motr_iem_event  evt_id,
const char *  desc,
  ... 
)

The function must be called with appropriate parameters using the macros M0_MOTR_IEM() & M0_MOTR_IEM_DESC() to send an IEM alert. This IEM is throttled by a simple throttling scheme. The throttling scheme is the maximum number of IEM alerts for the defined interval.

Parameters
filefrom where m0_iem is called, use FILE
functionfrom where m0_iem is called, use FUNCTION
linefrom where m0_iem is called, use LINE
sev_ida valid value from enum m0_motr_iem_severity
mod_ida valid value from enum m0_motr_iem_module
evt_ida valid value from enum m0_motr_iem_event
desca string description with variable args. Can be NULL, max (512-1) bytes in length.

Definition at line 58 of file iem.c.

Here is the call graph for this function: