Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

8.11 ACMSMGMT_GET_ERR_FILTER_2

ACMS Remote Manager clients call this procedure to obtain a listing of system messages currently being filtered from the Remote Manager, and subsequently, the error log.


Format

int *acmsmgmt_get_err_filter_2 (sub_id_struct *sub_id_rec,CLIENT *cl2)


Parameters

sub_id_rec

Type: Sub_id_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl2

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Err_filter_data_list_2
Access: Write
Mechanism: By reference
Usage: Pointer to record returned. If NULL, the RPC has failed. If not null, the record contains either an error code in the status field (the RPC succeeded, but the call failed for another reason) or the data requested.

Description

This procedure obtains class information about an Error Filter. The return pointer points to a record of type err_filter_data_list_2, which is a union containing either an error code or a pointer to an Error Filter record. See Section 9.5 for a description of the fields in the Error Filter record.

If the ACMS run-time system is not running when this call is issued, the Remote Manager returns the MGMT_NOT_MAPPED error code.


Example


int get_err_filter(int client_id,CLIENT *cl2) 
 { 
 
   int status; 
   err_filter_data_list_2      *err_filter; 
   err_filter_link_2           *nl; 
   struct sub_id_struct sub_rec; 
 
   sub_rec.client_id = client_id; 
 
   err_filter = acmsmgmt_get_err_filter_2(&sub_rec,cl2); 
 
   if (!err_filter) { 
        printf("\n RPC Call to get Error Filter failed"); 
        return(MGMT_FAIL); 
   } 
 
   if (err_filter->status != MGMT_SUCCESS) { 
        printf("\n Call to get Error Filter failed, returning status code %d", 
               err_filter->status); 
        status = err_filter->status; 
        xdr_free(xdr_err_filter_data_list_2, err_filter); 
        free(err_filter); 
        return(status); 
   } 
 
   for (n1 = err_filter->err_filter_data_list_2_u.list; nl != NULL; 
        nl = nl->pNext) { 
        printf("Filter name = %s, and code =%X\n", 
              nl->err_filter_data.err_msg_name, 
              nl->err_filter_data.err_code); 
   } 
 
   xdr_free(xdr_err_filter_data_list_2, err_filter); 
   free(err_filter); 
   return(0); 
 
} 
      

In the preceding example, the acmsmgmt_get_err_filter_2 procedure is called to fetch error filter information. If the call succeeds, the message code and symbolic name are fetched. Otherwise, an error message is displayed. The example in Section 6.4.1 shows how to declare and initialize the input arguments to this procedure.

8.12 ACMSMGMT_GET_MGR_STATUS_1

ACMS Remote Manager clients call this procedure to obtain run-time status information about a Remote Manager on a particular node.

Format

mgr_status_rec_out *acmsmgmt_get_mgr_status_1(sub_id_struct *sub_rec, CLIENT *cl)


Parameters

sub_rec

Type: Sub_id_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Mgr_status_rec_out
Access: Write
Mechanism: By reference
Usage: Pointer to a record that contains a union consisting either of a failure code or a pointer to a structure of type mgr_status_rec, which contains the status data. The following are the contents of this union:
     
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
     
  data
  Type: Mgr_status_rec
  Access: Write
  Mechanism: By reference
  Usage: Remote Manager status data record. Contains the fields from the Manager Status table (see Section 9.8).

Description

This procedure gets run-time information about a Remote Manager on a particular node. The return pointer points to a record of type mgr_status_rec_out, which contains a union consisting of a failure returns code or a pointer to a manager status record. See Section 9.8 for a description of the fields in the manager status record.

This procedure does not require the ACMS run-time system in order to execute.


Example


int get_mgr_data(int client_id,CLIENT *cl) 
 { 
 
   mgr_status_rec         *mgrs; 
   mgr_status_rec_out     *mgr_data; 
   static struct sub_id_struct sub_rec; 
   int status; 
   
   sub_rec.client_id = client_id; 
 
   mgr_data = acmsmgmt_get_mgr_status_1(&sub_rec,cl); 
 
   if (!mgr_data) { 
      printf("\n RPC Call to get RM data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (mgr_data->status != MGMT_SUCCESS) { 
      printf("\n Call to get RM data failed, returning status code %d", 
             mgr_data->status); 
      status = mgr_data->status; 
        xdr_free(xdr_mgr_status_rec_out, mgr_data); 
        free(mgr_data); 
      return(status); 
   } 
   
   mgrs = &mgr_data->mgr_status_rec_out_u.data; 
 
      printf("\n RPC UDP state is %d",mgrs->rpc_udp_state); 
        xdr_free(xdr_mgr_status_rec_out, mgr_data); 
        free(mgr_data); 
      return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_GET_MGR_STATUS_1 procedure is called to fetch the contents of the Manager Status table. If the call succeeds, the current state of the TCP/UDP protocol in the RPC interface is printed from the retrieved record. Otherwise, an error message is displayed. The example in Section 6.4.1 shows how to declare and initialize the input arguments to this procedure.

8.13 ACMSMGMT_GET_PARAM_2

ACMS Remote Manager clients call this procedure to obtain configuration information about a Remote Manager on a particular node.

Format

param_rec_out2 *acmsmgmt_get_param_2(sub_id_struct *sub_rec, CLIENT *cl)


Parameters

sub_rec

Type: Sub_id_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Param_rec_out2
Access: Write
Mechanism: By reference
Usage: Pointer to record returned. If NULL, the RPC has failed. If not null, the record contains either an error code in the status field (the RPC succeeded, but the call failed for another reason), or the data requested.

Description

This procedure gets configuration information about a Remote Manager on a particular node. The return pointer points to a record of type param_rec_out2, which contains a union consisting of either a failure return code or a pointer to a Parameter record. See Section 9.9 for a description of the fields in the Parameter record.

This procedure does not require the ACMS run-time system in order to execute.


Example


int get_param_data(int client_id,CLIENT *cl) 
 { 
   int x = 0; 
   int y = 0; 
 
   param_rec2       *params; 
   param_rec_out2   *param_rec; 
   static struct sub_id_struct sub_rec; 
   int status; 
 
   sub_rec.client_id = client_id; 
 
   param_rec = acmsmgmt_get_param_2(&sub_rec,cl); 
 
   if (!param_rec) { 
      printf("\n RPC Call to get Parameter data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (param_rec->status != MGMT_SUCCESS) { 
      printf("\n Call to get Parameter data failed, returning status code %d", 
             param_rec->status); 
      status = param_rec->status; 
        xdr_free(xdr_param_rec_out2, param_rec); 
        free(param_rec); 
      return(status); 
   } 
 
   params = &param_rec->param_rec_out2_u.data; 
 
      printf("\n Maximum logins allowed is %d",params->max_logins); 
        xdr_free(xdr_param_rec_out2, param_rec); 
        free(param_rec); 
      return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_GET_PARAM_2 procedure is called to fetch the contents of the Parameter table. If the call succeeds, the maximum number of logins is printed from the retrieved record. Otherwise, an error message is displayed. The example in Section 6.4.1 shows how to declare and initialize the input arguments to this procedure.

8.14 ACMSMGMT_GET_QTI_2

ACMS Remote Manager clients call this procedure to obtain class information about a Queued Task Initiator (QTI) on a local or remote node.

Format

qti_rec_out_2 *acmsmgmt_get_qti_2(sub_id_struct *sub_rec, CLIENT *cl)


Parameters

sub_rec

Type: Sub_id_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Qti_rec_out2
Access: Write
Mechanism: By reference
Usage: Pointer to record returned. If NULL, the RPC has failed. If not null, the record contains either an error code in the status field (the RPC succeeded, but the call failed for another reason) or the data requested.

Description

This procedure obtains class information about a QTI on a local or remote node. The return pointer points to a record of type qti_rec_out_2, which contains a union consisting of either a failure return code or a pointer to a QTI record. See Section 9.10 for a description of the fields in the QTI record.

If the ACMS run-time system is not running when this call is issued, the Remote Manager returns the MGMT_NOT_MAPPED error code.


Example


int get_qti_data(int client_id,CLIENT *cl) 
 { 
 
   qti_rec_r_2      *qtis; 
   qti_rec_out_2    *qti_rec; 
   static struct sub_id_struct sub_rec; 
   int status; 
 
   sub_rec.client_id = client_id; 
 
   qti_rec = acmsmgmt_get_qti_2(&sub_rec,cl);  
 
   if (!qti_rec) { 
      printf("\n RPC Call to get QTI data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (qti_rec->status != MGMT_SUCCESS) { 
      printf("\n Call to get QTI data failed, returning status code %d", 
             qti_rec->status); 
      status = qti_rec->status; 
        xdr_free(xdr_qti_rec_out_2, qti_rec); 
        free(qti_rec); 
      return(status); 
   } 
   
   qtis = &qti_rec->qti_rec_out_2_u.qti_rec; 
 
      printf("\n QTI process name is %s",qtis->process_name); 
        xdr_free(xdr_qti_rec_out_2, qti_rec); 
        free(qti_rec); 
      return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_GET_QTI_2 procedure is called to fetch QTI management information. If the call succeeds, the QTI process name is printed from the retrieved record. Otherwise, an error message is displayed. The example in Section 6.4.1 shows how to declare and initialize the input arguments to this procedure.

8.15 ACMSMGMT_GET_TSC_2

ACMS Remote Manager clients call this procedure to obtain class information about a Terminal Subsystem Controller (TSC) on a local or remote node.

Format

tsc_rec_out_2 *acmsmgmt_get_tsc_2(sub_id_struct *sub_rec, CLIENT *cl)


Parameters

sub_rec

Type: Sub_id_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client authorization information.
     
  client_id
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: If explicit authentication is being used, a valid client ID must be provided. If the value for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.

cl

Type: CLIENT *
Access: Read  
Mechanism: By value  
Usage: Pointer to an RPC client handle previously obtained by calling the RPC routine CLNT_CREATE.

Return Value

Type: Tsc_rec_out_2
Access: Write
Mechanism: By reference
Usage: Pointer to record returned. If NULL, the RPC has failed. If not null, the record contains either an error code in the status field (the RPC succeeded, but the call failed for another reason) or the data requested.

Description

The return pointer points to a record of type tsc_rec_out_2, which contains a union consisting of either a failure return code or a pointer to a TSC record. See Section 9.14 for a description of the fields in the record.

If the ACMS run-time system is not running when this call is issued, the Remote Manager returns the MGMT_NOT_MAPPED error code.


Example


int get_tsc_data(int client_id,CLIENT *cl) 
 { 
 
   tsc_rec_r_2      *tscs; 
   tsc_rec_out_2    *tsc_rec; 
   static struct sub_id_struct sub_rec; 
   int status; 
 
   sub_rec.client_id = client_id; 
 
   tsc_rec = acmsmgmt_get_tsc_2(&sub_rec,cl); 
 
   if (!tsc_rec) { 
      printf("\n RPC Call to get TSC data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (tsc_rec->status != MGMT_SUCCESS) { 
      printf("\n Call to get TSC data failed, returning status code %d", 
             tsc_rec->status); 
      status = tsc_rec->status; 
        xdr_free(xdr_tsc_rec_out_2, tsc_rec); 
        free(tsc_rec); 
      return(status); 
   } 
   
   tscs = &tsc_rec->tsc_rec_out_2_u.tsc_rec; 
 
      printf("\n TSC process name is %s",tscs->process_name); 
        xdr_free(xdr_tsc_rec_out_2, tsc_rec); 
        free(tsc_rec); 
      return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_GET_TSC_2 procedure is called to fetch TSC management information. If the call succeeds, the TSC's process name is printed from the retrieved record. Otherwise, an error message is displayed. The example in Section 6.4.1 shows how to declare and initialize the input arguments to this procedure.


Previous Next Contents Index