Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

For any nonnegative integer fields, the completion status of the update is returned in the corresponding field in the return structure.


Example


int set_exc_data(int client_id,CLIENT *cl) 
 { 
 
   static char vr_appl[] = "VR_APPL"; 
   static exc_config_rec_2 set_struct; 
   exc_status_rec_2        *ret_struct; 
   dcl_link                *nl; 
   
   memset(&set_struct,-1,sizeof(set_struct)); 
   set_struct.client_id      = client_id; 
   set_struct.audit_state    = MGMT_STATE_DISABLED; 
   set_struct.appl_name      = vr_appl; 
 
   ret_struct = acmsmgmt_set_exc_2(&set_struct,cl); 
 
   if (!ret_struct) { 
      printf("\n Call to modify EXC failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) 
      printf("\n Call to modify EXC returned the following warnings or 
             errors\n"); 
   else 
      printf("\n Call to modify EXC completed\n"); 
 
   for (nl = ret_struct->exc_status_rec_2_u.data.cmd_output; nl != NULL; nl = 
        nl->pNext) 
       printf("\n %s",nl->dcl_msg); 
         xdr_free(xdr_exc_status_rec_2, ret_struct); 
         free(ret_struct); 
       return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_SET_EXC_2 procedure is called to disable application auditing for the application VR_APPL on the target node. If the call succeeds, the VR_APPL no longer writes application auditing messages, and a success message is displayed. 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.36 ACMSMGMT_SET_INTERFACE_1

This procedure modifies the status of a Remote Manager interface. Either the SNMP or RPC interface can be modified.

Note

The ACMS Remote Manager will not allow the RPC interface to be DISABLED through this call. The only way to disable the RPC interface dynamically is to use the SNMP interface.

Format

int *acmsmgmt_set_interface_1(interface_config_rec *set_struct,CLIENT *cl)


Parameters

set_struct

Type: Interface_config_rec
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and interface configuration fields.
     
  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.
     
  interface_type
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Indicates the interface to be modified. Table 8-2 shows the valid symbolic values for interface types.
     
  state
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Indicates desired state of the interface. Table 8-3 shows the valid symbolic values for the allowable states.

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: Integer
Access: Write
Mechanism: By reference
Usage: Pointer to status value returned. If NULL or MGMT_SUCCESS, the RPC has succeeded. If neither NULL nor MGMT_SUCCESS, the procedure call failed and the value pointed to is the reason for failure.

Description

This procedure modifies the status of an interface. Interfaces can be enabled (that is, requested to start) or disabled (that is, requested to stop) by setting the state field in set_struct to the appropriate value.

Note that it is not possible to use the RPC interface to enable the RPC interface. In order to use the RPC interface, it must already be enabled. In order to start the RPC interface, either use the SNMP interface, or use the ACMSCFG utility to configure the RPC interface to be enabled when the Remote Manager starts up.

It is also not possible to use this call to disable the RPC interface. The ACMS Remote Manager does not allow an interface to disable itself. The only way to disable the RPC interface dynamically is to use the SNMP interface.


Example


int set_interface_data(int client_id,CLIENT *cl) 
 { 
 
   static interface_config_rec set_struct; 
   int *status; 
   
   memset(&set_struct,-1,sizeof(set_struct)); 
 
   set_struct.client_id = client_id; 
   set_struct.interface_type = MGMT_IF_SNMP; 
   set_struct.state = MGMT_STATE_ENABLED; 
 
   status = acmsmgmt_set_interface_1(&set_struct,cl); 
 
   if (!status) { 
      printf("\n Call to update SNMP interface failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (*status != MGMT_SUCCESS) { 
      printf("\n Call to update SNMP interface failed with status %d",*status); 
        free(status); 
      return(MGMT_FAIL); 
   } 
   else 
      printf("\n Call to set SNMP interface completed"); 
        free(status); 
   return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_SET_INTERFACE_1 procedure is called to enable the SNMP interface. If the call succeeds, the SNMP interface is running on the target node, and a success message is displayed. 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.37 ACMSMGMT_SET_PARAM_2

This procedure requests updates to fields in the Remote Manager Parameter table.

Format

param_status_rec2 *acmsmgmt_set_param_2(param_config_rec2 *set_struct,CLIENT *cl)


Parameters

set_struct

Type: Param_config_rec2
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and parameter configuration fields.
     
  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.
     
  params
  Type: Param_rec2
  Access: Read
  Mechanism: By value
  Usage: Structure containing a Parameter table record. Parameter table fields are described in Section 9.9. See the Description section for information on how to initialize this record.

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_status_rec2
Access: write  
Mechanism: By reference  
Usage: Pointer to a record that contains a union consisting of either a failure code or a structure of type param_rec2, which contains status codes for each field. See the Description section for a discussion of how to determine the update status for any field. The following are the contents of this union:
     
  rc
  Type: Integer
  Access: write
  Mechanism: By value
  Usage: Failure return code.
     
  data, data_warn
  Type: Param_rec_2
  Access: write
  Mechanism: By value
  Usage: Structure containing a Parameter table record. The entries in this field contain status codes correspond to the fields in the params structure. See the Description section for a discussion of how to determine the update status for any field.

Description

This procedure requests updates to fields in the Parameter table (see Section 9.9). Some field updates are dynamic; others are not. Updates to this table are not durable; that is, they do not survive a restart of the Remote Manager.

When this procedure is called, any fields with negative values are ignored. Callers should initialize any fields to a negative value (for example, -1) for which updates are not to be applied. All nonnegative fields are validated prior to being updated.

For any nonnegative fields, the completion status of the update is returned in the corresponding field in the return structure. For instance, if the mss_coll_interval and max_logins fields in the params structure of the param_config_rec are nonnegative when this procedure is called, the mss_coll_interval and max_logins field of the data or data_warn structures of the param_status_rec will contain the completion status for those updates.

The data and data_warn structures contain identical data. If the operation fails, the status field of either structure is MGMT_WARN; in this case, use the data_warn structure to fetch the status messages from the cmd_output linked list.

If the operation is successful, the status field of either structure is MGMT_SUCCESS. There are no status messages associated with a successful call.

If the status field contains MGMT_FAIL, the call failed. There are no status messages returned; instead, the reason for the failure is contained in the rc field.


Example


int set_param_data(int client_id,CLIENT *cl) 
 { 
 
   static param_config_rec2 set_struct; 
   param_status_rec2 *ret_struct; 
   int status; 
 
   memset(&set_struct,-1,sizeof(set_struct)); 
 
   set_struct.client_id = client_id; 
   set_struct.params.max_logins = 25; 
 
   ret_struct = acmsmgmt_set_param_2(&set_struct,cl); 
 
   if (!ret_struct) { 
      printf("\n Call to modify parameters failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) { 
 
      if (ret_struct->status != MGMT_WARN) { 
         printf("\nCall to modify parameters failed, returning %d", 
                ret_struct->status); 
         status = ret_struct->status; 
           xdr_free(xdr_param_status_rec2, ret_struct); 
           free(ret_struct); 
         return(MGMT_FAIL); 
     } 
 
   if (ret_struct->param_status_rec2_u.data.max_logins  != MGMT_SUCCESS) 
      printf("\n max_logins specified was invalid "); 
        xdr_free(xdr_param_status_rec2, ret_struct); 
        free(ret_struct); 
      return(MGMT_FAIL); 
    } 
 
   else 
      printf("\n Call to set params completed"); 
        xdr_free(xdr_param_status_rec2, ret_struct); 
        free(ret_struct); 
   return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_SET_PARAM_2 procedure is called to set the maximum number of logins to the Remote Manager to 25. If the call succeeds, the new value will be stored in the Parameter table and a success message will be displayed. 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.38 ACMSMGMT_SET_QTI_2

This procedure modifies Queued Task Initator (QTI) Config class attributes.

Format

qti_status_rec_2 *acmsmgmt_set_qti_2(qti_config_rec_2 *set_struct,CLIENT *cl)


Parameters

set_struct

Type: Qti_config_rec_2
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and QTI table fields.
     
  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 of client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.
     
  active_sw
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Indicates whether active variables should be updated (active_sw = 1). Active variables are currently in use by the ACMS system; updates to active variables take effect immediately but are not durable (that is, they do not survive a restart of the ACMS system). Not all variables are dynamic, however. Refer to Section 9.10 and to the field descriptions in this section, to determine whether a particular variable can be updated dynamically.
     
  current_sw
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Indicates whether current variables should be updated (current_sw = 1). Current variables are those stored in the ACMSGEN file currently in use by the ACMS system and are durable (that is, they survive a restart of the ACMS system). Updates to current variables take effect when the ACMS system is restarted.
     
  qti_priority, sub_timeout, max_threads, retry_timer, polling_timer
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Values to be updated. These fields correspond to fields of the same names in the QTI table, depending on the value of active_sw and current_sw in this record (for example, qti_priority will update the qti_priority_stored field if current_sw is equal to 1). See Section 9.10 for a discussion of these fields. None of these fields can be updated dynamically.
     
  astlm, biolm, bytlm, diolm, enqlm, fillm, pgflquota, tqelm, wsdefault, wsextent, wsquota
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Values to be updated. These fields correspond to fields of the same names in the QTI table, depending on the value of active_sw and current_sw in this record (for example, astlm will update the astlm_stored field if current_sw is equal to 1). See Section 9.10 for a discussion of these fields. Note that not all fields can be updated dynamically.
     
  qti_username
  Type: Null-terminated string
  Access: Read
  Mechanism: By reference
  Usage: Values to be updated. This field corresponds to the qti_username field in the QTI table; the exact field depends on the value of active_sw and current_sw in this record (for example, qti_username will update the qti_username_stored field if current_sw is equal to 1). See Section 9.10 for a discussion of these fields. Note that not all fields can be updated dynamically. In order to have this field set to null (that is, ""), set the field to the string "NULL".

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_status_rec_2
Access: Write
Mechanism: By reference
Usage: Pointer to a record that contains a union consisting of either a failure code or a structure of type qti_config_rec_out_2, which contains status codes for each field, as well as a linked list of status messages associated with the update. See the Description section for a discussion of how to determine the update status for any field. The following are the contents of this union:
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  data, data_warn
  Type: Qti_config_rec_out_2
  Access: Write
  Mechanism: By value
  Usage: Structure containing fields corresponding to the fields in the set_struct structure, as well as a linked list of status messages associated with the update. See the Description section for a discussion of how to determine the update status for any field. The following are the contents of this structure:
         
    astlm, biolm, bytlm, diolm, enqlm, fillm, max_threads, pgflquota, polling_timer, qti_priority, qti_username, retry_timer, sub_timeout, tqelm, wsdefault, wsextent, wsquota
    Type: Integer
    Access: Write
    Mechanism: By value
    Usage: Status fields corresponding to the fields in the input argument.
         
    cmd_output
    Type: Dcl_list
    Access: Write
    Mechanism: By reference
    Usage: Pointer to a linked list of records containing status messages related to the failure of any updates. This structure contains the following fields:
         
      dcl_msg
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: The status message.
         
      pNext
      Type: Dcl_list
      Access: Write
      Mechanism: By reference
      Usage: Pointer to the next node in the linked list.

Description

This procedure requests updates to ACMS QTI Config class fields contained in the QTI table (see Section 9.10). Note that the QTI table contains both active and stored values. The active_sw field and current_sw field control which fields should be updated.


Previous Next Contents Index