Using and Administering

ll_get_objs Subroutine

Purpose

The ll_get_objs subroutine sends a query request to the daemon you specify along with the request data you specified in the ll_set_request subroutine. ll_get_objs receives a list of objects matching the request.

Library

LoadLeveler API library libllapi.a

Syntax

#include "llapi.h"
 
LL_element * ll_get_objs(LL_element *query_element,LL_Daemon query_daemon,
char *hostname,int *number_of_objs,int *error_code);

Parameters

query_element
Is a pointer to the LL_element returned by the ll_query function.

query_daemon
Specifies the LoadLeveler daemon you want to query. The enum LL_Daemon is defined in llapi.h as:
  enum LL_Daemon {LL_STARTD, LL_SCHEDD, LL_CM, LL_MASTER, LL_STARTER};
 

The following indicates which daemons respond to which query flags. When query_type (in ll_query) is JOBS, the query_flags (in ll_set_request) listed in the lefthand column are responded to by the daemons listed in the righthand column:
QUERY_ALL negotiator (LL_CM) or schedd (LL_SCHEDD)
QUERY_JOBID negotiator (LL_CM) or schedd (LL_SCHEDD)
QUERY_STEPID negotiator (LL_CM)
QUERY_USER negotiator (LL_CM)
QUERY_GROUP negotiator (LL_CM)
QUERY_CLASS negotiator (LL_CM)
QUERY_HOST negotiator (LL_CM)

When query_type (in ll_query) is MACHINES, the query_flags (in ll_set_request) listed in the lefthand column are responded to by the daemons listed in the righthand column:
QUERY_ALL negotiator (LL_CM)
QUERY_HOST negotiator (LL_CM)

hostname
Specifies the host name where the schedd daemon is queried. If you specify NULL, the schedd daemon on the local machine is queried. To contact the negotiator daemon, you do not need to specify a hostname.

number_of_objs
Is a pointer to an integer representing the number of objects received from the daemon.

error_code
Is a pointer to an integer representing the error code issued when the function returns a NULL value. See Error Values.

Description

query_element, query_daemon, and hostname are the input fields for this subroutine. number_of_objs and error_code are output fields.

Each LoadLeveler daemon returns only the objects that it knows about.

Return Values

This subroutine returns a pointer to the first object in the list. You must use the ll_next_obj subroutine to access the next object in the list.

Error Values

This subroutine a NULL to indicate failure. The error_code parameter is set to one of the following:

-1
You specified an invalid query_element.
-2
You specified an invalid query_daemon.
-3
The API could not resolve the hostname.
-4
You set an invalid request type for the specified daemon.
-5
A system error occurred.
-6
No objects exist matching your request.
-7
An internal error occurred.
-9
Connection to daemon failed.

Related Information

Subroutines: ll_get_data, ll_set_request, ll_query, ll_get_objs, ll_free_objs, ll_next_obj, ll_deallocate.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]