Knowledge Center         Contents    Previous  Next    
Platform Computing Corp.

lsb_reservationinfo()

Retrieve reservation information to display active advance reservations.

DESCRIPTION

Use lsb_reservationinfo() to retrieve reservation information from mbatchd. This function allocates memory that the caller should free. If the lsb_reservationinfo() function succeeds, it returns the reservation records pertaining to a particular reservation ID (rsvId) as an array of rsvInfoEnt structs.

If rsvId is NULL, all reservation information will be returned. If a particular rsvId is specified:

SYNOPSIS

#include <lsf/lsf.h> 
struct rsvInfoEnt *lsb_reservationinfo(char *rsvId, int *numEnts, 
                   int options) 
 
struct rsvInfoEnt { 
    int options; 
    char *rsvId; 
    char *name; 
    int numRsvHosts; 
    struct hostRsvInfoEnt *rsvHosts; 
    char *timeWindow; 
    int numRsvJobs; 
    LS_LONG_INT *jobIds; 
    int *jobStatus; 
    char *desc; 
    char **disabledDurations; 
    int state; 
    char *nextInstance; 
    char *creator 
}; 
 
struct hostRsvInfoEnt { 
    char *host; 
    int numCPUs; 
    int numSlots; 
    int numRsvProcs; 
    int numUsedProcs; 
}; 

PARAMETERS

*rsvId

Reservation ID of the requested reservation.

*numEnts

Number of reservation entries that mbatchd returns.

options

The parameter options is currently ignored.

RsvInfoEnt structure

options

Reservation options.

*rsvId

Reservation ID returned from mbatchd. If the reservation fails, this is NULL. The memory for rsvid is allocated by the caller.

name

LSF user group name for the reservation. See the -g option of brsvadd.

numRsvHosts

Number of hosts reserved.

timeWindow

Active time window for a recurring reservation. See the -t option of brsvadd.

numRsvJobs

Number of jobs running in the reservation.

*jobIds

Job IDs of jobs running in the reservation.

*jobStatus

Status of jobs running in the reservation.

desc

description for the reservation to be created. The description must be provided as a double quoted text string. The maximum length is 512 characters. Equivalent to the value of brsvadd -d.

**disabledDurations

Null-terminated list of disabled durations.

state

The current state of the reservation - active or inactive.

*nextInstance

The time of the next instance of a recurring reservation.

*creator

Creator of the reservation.

hostRsvInfoEnt structure

host

Host name.

numCPUs

Number of CPUs reserved on the host.

numSlots

Number of job slots reserved on the host.

numRsvProcs

Number of processors reserved on the host.

numUsedProcs

Number of processors in use on the host.

RETURN VALUES

array:rsvInfoEnt

The information retrieval is successful.

struct:NULL

The information retrieval failed.

ERRORS

On failure, lsberrno is set to indicate the error.

SEE ALSO

Related APIs

lsb_addreservation() - Makes a reservation

lsb_modreservation() - Modifies a reservation

lsb_removereservation() - Removes a reservation

Equivalent line command

brsvs

Files:

none


Platform Computing Inc.
www.platform.com
Knowledge Center         Contents    Previous  Next