This section explains the action status notification APIs provided by the previous versions of Systemwalker Operation Manager.
A list of action status notification APIs is shown below:
Action Status Notification API (Mp_GetActionInfo)
Action Information Area Release API (Mp_FreeActionInfo)
The previous version of Systemwalker Operation Manager is as follows:
SystemWalker/OperationMGR V4.0
This section explains the action status notification API (Mp_GetActionInfo).
Synopsis
ong Mp_GetActionInfo (long handle, MpActionInfo **ActionInfo, int *nActionInfo)
Description
This API posts the current status of the specified action.
Parameters
handle
Specify the action control number (return value of the action execution API).
ActionInfo
Specify the address of the area for the action status information structure (MpActionInfo). The action status information structure will be obtained in the API. The action status information structure will be set in the area indicated by this parameter. The action status information structure is released by the release API (Mp_FreeActionInfo).
nActionInfo
Specify the address of the area that stores the number of actions. The number of arrays of the action status information structure will be set in the area indicated by this parameter.
Return Values
Return Value | Meaning | Action |
---|---|---|
0 | This stops the action. | - |
MPACT_NOTACTION | Specified action does not exist (already terminated). | - |
MPACT_PARAMERR | There is a parameter error. | Check for incorrect parameter settings. |
MPACT_ALLOCFAIL | Failed to obtain area. | Either increase the size of the page file or add more physical memory. |
MPACT_NOTMOVE | The Action Control Server has not been started. | Check that Systemwalker MpAosfB is running. |
MPACT_COMFAIL | Communication with the Action Control Server has failed. | Check that Systemwalker MpAosfB and Systemwalker MpAosfX are running. |
MPACT_SYSERR | An error has occurred on the Action Control Server. | Refer to the message output to the event log or syslog, eliminate the cause of the error and then restart Systemwalker. If the problem persists after the cause of the error has been eliminated and Systemwalker has been restarted, use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE. |
MPACT_NOTDLL | DLL for the action request cannot be loaded. | Check that the file f3crhxac.dl (see Note), which is needed for action management, exists in the following folder: Systemwalker installation directory\mpwalker\bin If the file is not located in the above folder, either reinstall Systemwalker or use the maintenance information collection tool to collect event monitoring data and contact a Fujitsu SE. |
MPACT_EXCEPT | The address of an invalid area has been specified. | An internal logic error has occurred. Collect data with the maintenance information collection tool and contact a Fujitsu SE. |
Format of Action Status Information Structure (MpActionInfo)
typedef struct MpActionInfo_tag { long no ; long action ; MpActionAddr *addr ; int naddr ; int status ; int code ; } MpActionInfo ;
no
The action control number is set.
action
The action type is set.
This sends e-mail.
This sends an MS-mail.
This sends a pop-up message.
This sends a short mail message.
This plays a sound.
addr
Specify the address of the action execution destination information structure (MpActionAddr). This stores the address of the action's execution destination.
naddr
The number of addresses specified in addr is set here.
status
The action status is set.
Action has been completed.
Action is being executed.
Action is waiting.
Action has abended.
Action has paused.
code
The detail code is set if the status indicates an abnormal termination. See Detail code described later for more about detail codes.
Format of Action Execution Destination Information Structure (MpActionAddr)
typedef struct MpActionAddr_tag { unsigned char *name ; char *address ; } MpActionAddr ;
name
If a destination has been specified in the action execution API, its address will be set here. If the address has been specified, NULL will be set.
address
The address of the transmission destination is set.
The mail address is set.
The user name or computer name is set.
The telephone number is set.
Detail Code
This describes the status of the action obtained in the action status notification API (Mp_GetActionInfo).
Detail Code | Meaning | Action |
---|---|---|
MPACT_D_NOMEMORY | A shortage of memory occurred while executing the action. | All |
MPACT_D_FILEACCESS | An error occurred in file operations while executing the action. | |
MPACT_D_NOFILE | The specified file does not exist. | |
MPACT_D_DEFFILE | The action execution environment has not been defined. | |
MPACT_D_FAIL | Action execution failed for some reason. | |
MPACT_D_NOTMOVE | The action execution server has not been started. | |
MPACT_D_NOHOST | The specified action execution host does not exist. | |
MPACT_D_SENDFAIL | Failed to send a message. | Popup |
MPACT_D_NOTSERVER | The SMTP server could not be found. | |
MPACT_D_NOTMYHOST | The local host name cannot be obtained. | |
MPACT_D_SMTPCOMMAND | An error occurred during processing on the SMTP server. | |
MPACT_D_SMTPCOMM | An error occurred during communication with the SMTP server. | |
MPACT_D_NOTCONNECT | A connection could not be made with the SMTP server. | |
MPACT_D_FROMADDR | The sender's address has not been specified. | |
MPACT_D_SIGNIN | Sign-in failed. | MS-Mail |
MPACT_D_NOSEND | An error occurred during e-mail sending processing. | |
MPACT_D_COMMOPEN | The COM port (modem) could not be opened. | Short mail |
MPACT_D_COMMFAIL | An error occurred in the COM port (modem) I/O. | |
MPACT_D_INITCOMM | Configuration of the COM port (modem) failed. | |
MPACT_D_LINEBUSY | Signal could not be sent because the line was busy. | |
MPACT_D_LINEFAIL | Signal could not be sent due to a problem with the telephone line. | |
MPACT_D_CONVERTFAIL | The message conversion processing failed. | |
MPACT_D_NOTSOUND | The environment for sound replay has not been configured. | Sound notification |
MPACT_D_NOTDEVICE | Another application is using the sound replay driver. | |
MPACT_D_CREATESOUND | Sound replay processing failed. |
Program Example
Below is an example program of the action status notification API:
#include "f3crhxac.h" long handle = 1 ; // control number of the action that obtains the status MpActionInfo *pInfo = NULL ; // address setting range of information area int nInfo = 0 ; lrc = Mp_GetActionInfo(handle,&pInfo,&nInfo); if ( lrc != 0 ) { /* error processing */ } /* reference to the action information (pInfo) */ /* release the action information area (pInfo) */ Mp_FreeActionInfo(pInfo,nInfo) ;
This section explains the action information area release API (Mp_FreeActionInfo).
Synopsis
void Mp_FreeActionInfo (MpActionInfo *ActionInfo, int nAction)
Description
This API releases the area that was obtained in the action status notification API (Mp_GetActionInfo).
Parameters
ActionInfo
Specify the address of the action status information structure (MpActionInfo) that was obtained in the action status notification API.
See "16.4.5.1 Action Status Notification API" for more about the action status information structure.
nAction
This parameter shows the number of actions set in ActionInfo.
Program Example
Below is an example program of the action information area release API:
#include "f3crhxac.h" long handle = 1 ; // control number of the action that obtains the status MpActionInfo *pInfo = NULL ; // address setting range of information area int nInfo = 0 ; lrc = Mp_GetActionInfo(handle,&pInfo,&nInfo); if ( lrc != 0 ) { /* error processing */ } /* reference to the action information (pInfo) */ /* release the action information area (pInfo) */ Mp_FreeActionInfo(pInfo,nInfo) ;