Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

8.33 ACMSMGMT_SET_COLLECTION_2

This procedure modifies entries in the Remote Manager Collection table. Collection table entries can also be added (see Section 8.3) and deleted (see Section 8.6).


Format

coll_status_rec_2 *acmsmgmt_set_collection_2(coll_config_rec_2 *set_struct,CLIENT *cl)


Parameters

set_struct

Type: Coll_config_rec_2
Access: Read  
Mechanism: By reference  
Usage: Structure that contains the following client identification and collection 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 for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.
     
  coll
  Type: Coll_update_rec_r_2
  Access: Read
  Mechanism: By value
  Usage: Structure containing a Collection table record. Collection table fields are described in Section 9.3. 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: Coll_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 coll_update_rec_r_2, 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_warn
  Type: Coll_output_rec_r_2
  Access: write
  Mechanism: By value
  Usage: Structure containing a Collection table record. The entries in this field contain status codes that correspond to the fields in the coll 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 Collection table (see Section 9.3).

Updates to this table are not durable; that is, they do not survive a restart of the Remote Manager. To make nondynamic, permanent updates to the collection table, use the ACMSCFG utility.

Calls to this procedure must specify entity_type, entity_name, and collection_class. These fields must exactly match an existing record in the Collection table for the update to be applied. Table 8-1 and Table 8-4 contain symbolic values used to populate the collection_class and entity_type fields; entity_name is specified as a null-terminated string.

For any nonnegative fields, the completion status of the update is returned in the corresponding field in the return structure. This includes the key fields of entity_type, entity_name, and collection_class. If no matching record is found in the table, entity_type and collection_class contain values of MGMT_FAIL.

Updates to the collection table are processed immediately and may affect more than one ACMS process. See Section 5.1 for discussion of how the collection table affects ACMS data collection.


Example


int set_collection_data(int client_id,CLIENT *cl) 
 { 
 
   static char c_name_all[2] = "*"; 
   static coll_config_rec_2 set_struct; 
   struct coll_status_rec_2 *status_rec; 
   
   set_struct.client_id              = client_id; 
   set_struct.coll.entity_type       = MGMT_ALL; 
   set_struct.coll.entity_name       = c_name_all; 
   set_struct.coll.collection_class  = MGMT_CLASS_RT; 
   set_struct.coll.collection_state  = MGMT_STATE_ENABLED; 
 
   status_rec = acmsmgmt_set_collection_2(&set_struct,cl);  
   if (!status_rec) { 
      printf("\n Call to modify collection failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (status_rec->status == MGMT_WARN) { 
      printf("\nThe following updates failed: "); 
      if (status_rec->coll_status_rec_2_u.data_warn.entity_type  == MGMT_FAIL) 
         printf("\n     Record not found"); 
      if (status_rec->coll_status_rec_2_u.data_warn.collection_state 
          == MGMT_FAIL) 
         printf("\n     coll_state invalid"); 
      if (status_rec->coll_status_rec_2_u.data_warn.storage_state == MGMT_FAIL) 
         printf("\n     storage_state invalid"); 
      if (status_rec->coll_status_rec_2_u.data_warn.storage_interval 
          == MGMT_FAIL) 
         printf("\n     storage_interval invalid"); 
     } 
 
   else if (status_rec->status != MGMT_SUCCESS) { 
      printf("\n Call to modify collection failed with status 
             %d",status_rec->coll_status_rec_2_u.rc); 
        xdr_free(xdr_coll_status_rec_2, status_rec); 
        free(status_rec); 
      return(MGMT_FAIL); 
   } 
   else 
      printf("\nCall to modify collection was executed"); 
        xdr_free(xdr_coll_status_rec_2, status_rec); 
        free(status_rec); 
      return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_SET_COLLECTION_2 procedure is called to set the collection state to ENABLED for the Collection table record with an entity of * (all), a name of * (all), and class of RUNTIME. If the call succeeds, the new value will be stored in the Collection table, all ACMS processes on the target node will begin collecting run-time data, 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.34 ACMSMGMT_SET_CP_2

This procedure modifies the ACMS Central Process (CP) class attributes.

Format

cp_status_rec_2 *acmsmgmt_set_cp_2(cp_config_rec_2 *cp_cfg_rec,CLIENT *cl)


Parameters

cp_cfg_rec_2

Type: Cp_config_rec
Access: Read  
Mechanism: By reference
Usage: Structure that contains the following client identification and collection 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 for client_id is 0, proxy access is used. Client_id is obtained by calling the acms$mgmt_get_creds procedure.
     
  astlm, biolm, bytlm, current_sw, diolm, enqlm, fillm, pgflquota, tqelm, wsdefault, wsextent, wsquota
  Type: Cp_rec_r
  Access: Read
  Mechanism: By value
  Usage: Structure containing a CP table record. CP table fields are described in Section 9.4. 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: Cp_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 config_rec_out_2, 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_warn
  Type: Config_rec_out_2
  Access: write
  Mechanism: By value
  Usage: Structure containing a CP table record. The entries in this field contain status codes that correspond to the fields in the cp 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 CP table (see Section 9.4).

Updates to this table are not durable; that is, they do not survive a restart of the Remote Manager. To make nondynamic, permanent updates to the collection table, use the ACMSCFG utility.

Updates to the CP table are processed immediately and may affect more than one ACMS process.


Example


int set_cp_data(int client_id,CLIENT *cl) 
 { 
   cp_config_rec_2  set_struct; 
   cp_status_rec_2 *ret_struct; 
   dcl_link    *nl; 
 
   memset(&set_struct,-1,sizeof(set_struct)); 
 
   set_struct.client_id      = client_id; 
   set_struct.current_sw     = 1; 
   set_struct.astlm      = 500; 
 
   ret_struct = acmsmgmt_set_cp_2(&set_struct,cl); 
 
   if (!ret_struct) { 
       printf("\n Call to modify CP failed"); 
        return(MGMT_FAIL); 
   } 
 
   if (ret_struct->status != MGMT_SUCCESS) 
      printf("\n Call to modify CP returned the following warnings or 
        errors\n"); 
   else 
      printf("\n Call to modify CP completed\n"); 
 
   for (nl = ret_struct->cp_status_rec_2_u.data.cmd_output; nl != NULL; 
        nl = nl->pNext) 
     printf("\n %s",nl->dcl_msg); 
       xdr_free(xdr_cp_status_rec_2, ret_struct); 
       free(ret_struct); 
   return(0); 
} 
 
      

In the preceding example, the ACMSMGMT_SET_CP_2 procedure is called. 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.35 ACMSMGMT_SET_EXC_2

This procedure modifies the ACMS Application Execution Controller (EXC) Config class attributes.

Format

exc_status_rec_2 *acmsmgmt_set_exc_2(exc_config_rec_2 *set_struct,CLIENT *cl)


Parameters

set_struct

Type: Exc_config_rec_2
Access: Read  
Mechanism: By reference
Usage: Structure that contains the following client identification and EXC 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.
     
  appl_name
  Type: Null-terminated string
  Access: Read
  Mechanism: By reference
  Usage: Name of the application to update.
     
  active_sw, audit_state, current_sw, max_tasks, max_servers, sp_mon_interval, transaction_timeout
  Type: Integer
  Access: Read
  Mechanism: By value
  Usage: Values to be updated. These fields correspond to the active fields of the same names in the EXC table (for example, max_tasks will update max_tasks_active). See Section 9.6 for a discussion of these fields. All fields in this record can be updated dynamically. Stored values cannot be changed for EXCs (application must be rebuilt).
     
  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 the stored fields of the same names in the EXC table (for example, astlm will update astlm_stored). See Section 9.6 for a discussion of these fields.

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: Exc_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 exc_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: Exc_config_rec_out_2
  Access: Write
  Mechanism: By value
  Usage: Structure containing fields corresponding to the fields in the exc_config_rec_2 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, audit_state, biolm, bytlm, diolm, enqlm, fillm, max_servers, max_tasks, pgflquota, sp_mon_interval, tqelm, transaction_timeout, 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 EXC Config class fields contained in the EXC table (see Section 9.6). Note that the EXC table contains both active and stored values; however, only the active fields can be changed. In order to change the stored values, the application must be rebuilt.


Previous Next Contents Index