 |
Compaq ACMS for OpenVMS Remote Systems Management
Guide
8.31 ACMSMGMT_SAVE_ERR_FILTER_2
This procedure saves the current error filter records to an error
filter file.
Format
int *acmsmgmt_save_err_filter_2(sub_id_struct *sub_rec,CLIENT *cl)
Parameters
set_struct
Type:
|
Err_filter_config_rec_r_2
|
Access:
|
Read
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Structure that contains the following client authorization and error
filter record 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.
|
|
|
|
|
err_filter_file_name
|
|
Type:
|
file_spec
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Specifies the OpenVMS file specification for the error filter file.
|
|
|
|
|
err_msg_name
|
|
Type:
|
String
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Symbolic name of the error message.
|
|
|
|
|
err_code
|
|
Type:
|
String
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Decimal or hexadecimal code for the error message.
|
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 a status code containing a success or failure status code.
MGMT_SUCCESS indicates success. Other values indicate failure.
|
Description
This procedure saves all records in the Error Filter table to the
specified ASCII text file.
Example
|
int save_err_filter( int client_id, CLIENT *cl)
{
int *status;
static char c_null_str[2] = "";
static char file_spec = "sys$login:err_filter.dat";
err_filter_config_rec_r_2 set_struct;
set_struct.client_id = client_id;
set_struct.err_filter_file_name = file_spec;
set_struct.err_msg_name = c_null_str;
set_struct.err_code = -2;
status = acmsmgmt_save_err_filter_file_2(&set_struct, cl);
if (!status) {
printf("\n Call to save error filter failed");
return(MGMT_FAIL);
}
if (*status != MGMT_SUCCESS) {
printf("\n Call to save error filter failed with status %d",
*status);
free(status);
return(MGMT_FAIL);
}
else {
printf("\n Call to save error filter completed");
}
free(status);
return(0);
}
|
In the preceding example, the ACMSMGMT_SAVE_ERR_FILTER_2 procedure is
called to save all the records in the Error Filter table to the file
SYS$LOGIN:ERR_FILTER.DAT. If the call succeeds, 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.32 ACMSMGMT_SET_ACC_2
This procedure modifies ACMS Central Controller (ACC) Config class
fields.
Format
acc_status_rec_2 *acmsmgmt_set_acc_2(acc_config_rec_2
*set_struct,CLIENT *cl)
Parameters
set_struct
Type:
|
Acc_config_rec_2
|
Access:
|
Read
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Structure that contains the following client identification and ACC
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.
|
|
|
|
|
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.2, 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 can survive a restart
of the ACMS system). Updates to current variables take effect when the
ACMS system is restarted.
|
|
|
|
|
acc_priority, audit_state, max_appl, mss_maxobj, mss_maxbuf,
mss_net_retry_timer, mss_poolsize, mss_process_pool, ws_poolsize,
wsc_poolsize, tws_poolsize, twsc_poolsize
|
|
Type:
|
Integer
|
|
Access:
|
Read
|
|
Mechanism:
|
By value
|
|
Usage:
|
Values to be updated. These fields correspond to fields of the same
names in the ACC table, depending on the value of active_sw and
current_sw in this record (for example, acc_priority will update the
acc_priority_active field if active_sw is equal to 1). See
Section 9.2 for a discussion of these fields. Note that not all
fields can be updated dynamically.
|
|
|
|
|
astlm, biolm, bytlm, channelcnt, diolm, enqlm, fillm, gblpages,
gblpagfil, gblsections, 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 ACC 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.2 for
a discussion of these fields. None of these fields can be updated
dynamically.
|
|
|
|
|
acc_username, username_default, node_name
|
|
Type:
|
Null-terminated string
|
|
Access:
|
Read
|
|
Mechanism:
|
By reference
|
|
Usage:
|
Values to be updated. These fields correspond to fields of the same
names in the ACC table, depending on the value of active_sw and
current_sw in this record (for example, username_default will update
the username_default_active field if active_sw is equal to 1). See
Section 9.2 for a discussion of these fields. Note that not all
fields can be updated dynamically. In order to have any of these fields
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:
|
Acc_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 acc_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:
|
Acc_config_rec_out
|
|
Access:
|
Write
|
|
Mechanism:
|
By value
|
|
Usage:
|
Structure containing fields corresponding to the fields in the
acc_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:
|
|
|
|
|
|
|
|
acc_priority, acc_username, astlm, audit_state, biolm, bytlm,
channelcnt, diolm, enqlm, fillm, gblpages, gblpagfil, gblsections,
max_appl, mss_maxobj, mss_maxbuf, mss_net_retry_timer, mss_poolsize,
mss_process_pool, node_name, pgflquota, tqelm, twsc_poolsize,
tws_poolsize, username_default, wsc_poolsize, wsdefault, wsextent,
ws_poolsize, 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 ACC Config class fields
contained in the ACC table (see Section 9.2). Note that the ACC table
contains both active and stored values. The active_sw field and
current_sw field control which fields are to be updated.
Attempting to update an active field that is nondynamic is essentially
useless, since the value of the active field value will not change. For
instance, calling this procedure with the active_sw field set to 1 and
the acc_username field populated produces no change to the system.
Setting the current_sw field to 1 causes updates to be written to the
current ACMSGEN file. These updates are durable (that is, they can
survive a restart of the ACMS sytem), but they do not affect the active
system until the system is restarted.
For any nonnegative integer fields, the completion status of the update
is returned in the corresponding field in the return structure. For
string fields, the string field value is returned regardless of the
status of the call.
In order to have one of the string fields set to a null string (that
is, ""), populate the field with the value NULL. To have one of the
string fields ignored, pass in a null string.
Example
|
int set_acc_data(int client_id,CLIENT *cl)
{
static char c_name_all[2] = "*";
static char c_null_str[2] = "";
static acc_config_rec_2 set_struct;
acc_status_rec_2 *ret_struct;
dcl_link *nl;
memset(&set_struct,-1,sizeof(set_struct));
set_struct.client_id = client_id;
set_struct.active_sw = 1;
set_struct.current_sw = 0;
set_struct.audit_state = MGMT_STATE_DISABLED;
/* Have to provide a pointer for string conversions by XDR
or it will access vio. RM will ignore any fields with
strlen of 0 */
set_struct.acc_username = c_null_str;
set_struct.username_default = c_null_str;
set_struct.node_name = c_null_str;
ret_struct = acmsmgmt_set_acc_2(&set_struct,cl);
if (!ret_struct) {
printf("\n Call to modify ACC failed");
return(MGMT_FAIL);
}
if (ret_struct->status != MGMT_SUCCESS)
printf("\n Call to modify ACC returned the following warnings or
errors\n");
else
printf("\n Call to modify ACC completed\n");
for (nl = ret_struct->acc_status_rec_2_u.data.cmd_output; nl != NULL;
nl = nl->pNext)
printf("\n %s",nl->dcl_msg);
xdr_free(xdr_acc_status_rec_2, ret_struct);
free(ret_struct);
return(0);
}
|
In the preceding example, the acmsmgmt_set_acc_2 procedure is called to
disable system auditing on the target node. If the call succeeds,
system auditing is disabled 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.
|