int fd
Please specify handle acquired by MT_Open function.
PMONITORPARAM pmonitor
Specify settings for monitoring.
The MONITORPARAM structure is as follows.
typedef struct {
unsigned char ucCPUth1; //cpu temperature threshold 1
unsigned char ucCPUth2; //cpu temperature threshold 2
unsigned char ucMBth1; //M/B temperature threshold 1
unsigned char ucMBth2; //M/B temperature threshold 2
unsigned short usSysFanth1; // FAN1(SYS FAN) RPM threshold 1
unsigned short usSysFanth2; // FAN1(SYS FAN) RPM threshold 2
unsigned short usCPUFanth1; // FAN2(CPU FAN) RPM threshold 1
unsigned short usCPUFanth2; // FAN2(CPU FAN) RPM threshold 2
long lScanIntervalHWM; /*CPU, M/B Time interval to check Temporal
interval specified in units of 1 ms
(specified as 2000 - 60000 [ms]).*/
unsigned char ucEventLog[8]; //syslog output setting
char ident[128]; //Setting of system name at syslog output
struct sockaddr_un sa; //Unix domain socket used for sending messages
} MONITORPARAM, *PMONITORPARAM;
The items of "ucEventLog[0-4]" correspond to cpu th1, cpu th2, M/B th1 and M/B th2, respectively,
regarding the syslog output setting (priority setting at log output) of "unsigned char ucEventLog[5]".
The following settings are valid for each item.
set 0 ... no output
1 ... emerg
2 ... alart
3 ... crit
4 ... err
5 ... warn
6 ... notice
7 ... info
8 ... debug
Set a two-step upper limit for the temperature threshold (th1 < th2) and a two-step lower limit for the FAN RPM threshold(th1 > th2).).
- Temperature threshold setting range [0 - 120]
- FAN RPM threshold setting range [0 - 10000]
Set to 0 to disable it.
If the function succeeds, NO_ERROR is returned.
If the function fails, a code other than NO_ERROR is returned.
The other errors : Error code details
It monitors with the specified time interval (long lScanIntervalHWM).
When bEventLog is set to true, a message is output to syslog when the temperature threshold is exceeded.
We use UNIX domain socket for message transmission when abnormality occurs in temperature monitoring.
For details on Unix domain socket, socket communication etc, please refer to relevant Linux document, books etc.
The sockaddr_un structure is shown below by reference.
#define UNIX_PATH_MAX 108
struct sockaddr_un {
sa_family_t sun_family; /* AF_UNIX */
char sun_path[UNIX_PATH_MAX]; /* pathname */
};
If you do not want to send a message, please set so that the character string length of sun_path is 0.
If the character string length of sun_path is 0, message transmission is not performed.
The message issued when the setting threshold is exceeded is as follows.
The following definition values are stored in the received message, so you can check which error occurred. When multiple abnormalities occur, the logical sum of the definition values is stored.
| Definition | bit position | Meaning |
|---|---|---|
| CPU_TH1 | bit0 | CPU temperature threshold 1 exceeded occurrence |
| CPU_TH2 | bit1 | CPU temperature threshold 2 exceeded occurrence |
| MB_TH1 | bit2 | M/B temperature threshold 1 exceeded occurrence |
| MB_TH2 | bit3 | M/B temperature threshold 2 exceeded occurrence |
| SYSFAN_TH1 | bit4 | SYSTEM FAN RPM threshold 1 exceeded occurrence |
| SYSFAN_TH2 | bit2 | SYSTEM FAN RPM threshold 2 exceeded occurrence |
| CPUFAN_TH1 | bit2 | CPU FAN RPM threshold 1 exceeded occurrence |
| CPUFAN_TH2 | bit3 | CPU FAN RPM threshold 2 exceeded occurrence |