Compaq ACMS for OpenVMS
Remote Systems Management Guide


Previous Contents Index

7.19 ACMSMGMT_LIST_TG_1

ACMS Remote Manager clients call this procedure to obtain a list of Task Group table entries.

Format

tg_data_list = acmsmgmt_list_tg_1(tg_sel_struct *tg_sel, CLIENT *cl)


Parameters

tg_sel

Type: Tg_sel_struct
Access: Read  
Mechanism: By reference  
Usage: Structure that contains client information and task group selection critera. The structure contains the following 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.
     
  appl_name
  Type: Null-terminated string
  Access: Read
  Mechanism: By reference
  Usage: A pointer to an application name. The name may contain wildcard characters (*, !). Specify in all uppercase characters.
     
  tg_name
  Type: Null-terminated string
  Access: Read
  Mechanism: By reference
  Usage: A pointer to a task group name. The name may contain wildcard characters (*, !). Specify in all uppercase characters.

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

tg_data_list

Type: Tg_data_list
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a pointer to a structure of type tg_list, which contains the start of a linked list of records. The following are the contents of this union:
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  list
  Type: Tg_list
  Access: Write
  Mechanism: By reference
  Usage: Start of linked list. Pointer to a structure containing a Task Group table record, and a forward pointer to the next node in the linked list. The following are the contents of this structure:
         
    pNext
    Type: Proc_list
    Access: Write
    Mechanism: By value
    Usage: Start of linked list. Pointer to a structure of type coll_list.
         
    tg_data
    Type: Tg_rec_r
    Access: Write
    Mechanism: By reference
    Usage: Task Group table row. Task Group table fields are described in Section 8.11.

Description

The acmsmgmt_list_tg_1 procedure returns a linked list of Task Group table rows. All matching Task Group table rows are returned in each call. Matching is performed first on the application name, and then on the task group name. Therefore, all matching task groups for all matching applications are returned.

Entire table rows are returned. See Section 8.11 for a description of the fields in the tg_rec_r structure.

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

Rows in the EXC table are subject to reuse. Rows are assigned round-robin, and are not cleared until they have been reassigned. Therefore, some rows may contain data for inactive EXCs. The Remote Manager will attempt to retrieve task group information for inactive EXCs. It is the caller's responsibility to examine the record_state field to determine whether this row belongs to an active (record_state field is MGMT_VALID) or inactive (record_state field is MGMT_INACTIVE) EXC, and to process the row accordingly.


Example


int list_group_data(int client_id,CLIENT *cl) 
{ 
 
   static char c_all_appls[2] = "*"; 
   tg_data_list  *tg_data; 
   tg_link      *nl; 
 
   static struct tg_sel_struct sub_rec; 
 
   sub_rec.client_id = client_id; 
   sub_rec.appl_name = c_all_appls; 
   sub_rec.tg_name = c_all_appls; 
 
   tg_data = acmsmgmt_list_tg_1(&sub_rec,cl); 
 
   if (!tg_data) { 
      printf("\n RPC Call to get task group data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (tg_data->status == MGMT_FAIL)  { 
       if (tg_data->tg_data_list_u.rc == MGMT_NOMORE_DATA) { 
          printf("\n No GROUP data found"); 
          return(MGMT_FAIL); 
       }   
       printf("\n Call to get group data failed, returning status code 
%d",tg_data->tg_data_list_u.rc); 
       return(MGMT_FAIL); 
   } 
 
   if (tg_data->status == MGMT_WARN) 
       printf("\n ** Warning, some data may be from inactive processes **"); 
   
   for (nl = tg_data->tg_data_list_u.list; nl != NULL; nl = nl->pNext) { 
       if (nl->tg_data.record_state == MGMT_INACTIVE) 
          printf("\n INACTIVE "); 
       else 
          printf("\n          "); 
       printf(" Application : %-32s Task Group: %-s", 
               nl->tg_data.appl_name, 
               nl->tg_data.tg_name); 
   } 
 
   printf("\n End of data"); 
 
   return(0); 
} 
      

In the preceding example, the acmsmgmt_list_tg_1 procedure is called to fetch the contents of the Task Group tables for all applications on the target node. If the call succeeds, the state of the task group (if inactive), the name of the application it belongs to, and the name of the task group are displayed for each table row returned. Otherwise, an error message is displayed. The example in Section 5.3.1 shows how to declare and initialize the input arguments to this procedure.

7.20 ACMSMGMT_LIST_TRAP_1

ACMS Remote Manager clients call this procedure to obtain a list of Trap table entries.

Format

trap_data_list *acmsmgmt_list_trap_1(sub_id_struct *sub_id_rec, CLIENT *cl)


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.

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

trap_data_list

Type: Trap_data_list
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a pointer to a structure of type trap_list, which contains the start of a linked list of records. The following are the contents of this union:
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  list
  Type: Trap_list
  Access: Write
  Mechanism: By reference
  Usage: Start of linked list. Pointer to a structure of trap table rows, and a forward pointer to the next node in the linked list. The following are the contents of this structure:
         
    pNext
    Type: Proc_list
    Access: Write
    Mechanism: By value
    Usage: Start of linked list. Pointer to a structure of type trap_list.
         
    trap_data
    Type: Trap_rec
    Access: Write
    Mechanism: By reference
    Usage: Trap table row. Trap table fields are described in Section 8.12.

Description

The acmsmgmt_list_trap_1 procedure returns a linked list of Trap table rows. All Trap table rows are returned in each call. Records are returned sequentially from the table, beginning at the start of the table.

Entire table rows are returned. See Section 8.12 for a description of the fields in the trap_rec structure.

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


Example


int list_trap_data(int client_id,CLIENT *cl) 
{ 
 
   char c_states[2][9] = {"enabled","disabled"}; 
   char c_entities[10][9] = 
{"unknown","*","acc","tsc","qti","cp","exc","server","group","mgr"}; 
   char c_classes[5][8] = {"*","id","config","runtime","pool"}; 
   char c_trap_params[2][15] = {"exists","event severity"}; 
 
   trap_data_list  *trap; 
   trap_link     *nl; 
   static struct sub_id_struct sub_rec; 
 
   sub_rec.client_id = client_id; 
 
   trap = acmsmgmt_list_trap_1(&sub_rec,cl); 
 
   if (!trap) { 
      printf("\n RPC Call to get trap data failed"); 
      return(MGMT_FAIL); 
   } 
 
   if (trap->status != MGMT_SUCCESS)  { 
       printf("\n Call to get trap data failed, returning status code 
%d",trap->trap_data_list_u.rc); 
       return(MGMT_FAIL); 
   } 
   
   for (nl = trap->trap_data_list_u.list; nl != NULL; nl = nl->pNext) { 
       printf("\n Entity: %-9s  Name: %-32s  Param: %-15s  Trap Min: %d  Trap 
Max: %d", 
               c_entities[nl->trap_data.entity_type], 
               nl->trap_data.entity_name, 
               c_trap_params[nl->trap_data.param_to_trap], 
               nl->trap_data.min, 
               nl->trap_data.max); 
   } 
 
   printf("\n End of data"); 
 
   return(0); 
} 
      

In the preceding example, the acmsmgmt_list_trap_1 procedure is called to fetch the contents of the Trap table. If the call succeeds, the entity_type, entity_name, parameter, trap_min, and trap_max fields are displayed for each row in the table. Otherwise, an error message is displayed. The example in Section 5.3.1 shows how to declare and initialize the input arguments to this procedure.

7.21 ACMSMGMT_LIST_USERS_1

ACMS Remote Manager clients call this procedure to obtain information about users attached to a Remote Manager server on a local or remote node.

Format

user_data_list *acmsmgmt_list_users_1 (sub_id_struct *sub_id_rec, CLIENT *cl)


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.

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

user_data_list

Type: User_data_list
Access: Write
Mechanism: By reference
Usage: Pointer to a union. The union contains either a failure code or a pointer to a structure of type user_list, which contains the start of a linked list of records. The following are the contents of this union:
         
  rc
  Type: Integer
  Access: Write
  Mechanism: By value
  Usage: Failure return code.
         
  list
  Type: User_list
  Access: Write
  Mechanism: By reference
  Usage: Start of linked list. Pointer to a structure of user data, and a forward pointer to the next node in the linked list. The following are the contents of this structure:
         
    pNext
    Type: User_list
    Access: Write
    Mechanism: By value
    Usage: Start of linked list. Pointer to a structure of type user_list.
         
    user_data
    Type: User_rec
    Access: Write
    Mechanism: By reference
    Usage: The data describing the user. This record contains the following fields:
         
      client_id
      Type: Integer
      Access: Write
      Mechanism: By value
      Usage: Integer value containing the client ID for the user.
         
      reserved
      Type: Integer
      Access: Write
      Mechanism: By value
      Usage: Reserved for Compaq use.
         
      gid
      Type: Word
      Access: Write
      Mechanism: By value
      Usage: UIC group identifier.
         
      uid
      Type: Word
      Access: Write
      Mechanism: By value
      Usage: UIC user identifier.
         
      proxy_gid
      Type: Word
      Access: Write
      Mechanism: By value
      Usage: UIC group identifier of the proxy user, if proxy is being used.
         
      proxy_uid
      Type: Word
      Access: Write
      Mechanism: By value
      Usage: UIC user identifier of the proxy user, if proxy is being used.
         
      node-name
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: Pointer to a null-terminated string containing the name of the node from which the user logged in.
         
      expires
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: Time the user's credentials expire. Time is expressed in OpenVMS ASCII time format ( DD-MMM-YYYY HH:MM:SS.hh).
         
      user-name
      Type: Null-terminated string
      Access: Write
      Mechanism: By reference
      Usage: Pointer to a null-terminated string containing the user name.
         
      rights
      Type: Array of integers
      Access: Write
      Mechanism: By value
      Usage: ACMS management rights identifiers held by the user.
         
      proxy_flag
      Type: Integer
      Access: Write
      Mechanism: By value
      Usage: Indicates whether the record is for a proxy user (proxy_flag = 1) or is not for a proxy user (proxy_flag = 0).

Description

The ACMSMGMT_LIST_USERS_1 procedure returns a linked list of users who are logged in to a particular Remote Manager. All user records are returned on each call to this procedure.


Previous Next Contents Index