...
struct pbs_db_obj_info {
int pbs_db_obj_type; /* identifies the contained object type */
union {
pbs_db_job_info_t *pbs_db_job;
pbs_db_jobscr_info_t *pbs_db_jobscr;
pbs_db_resv_info_t *pbs_db_resv;
pbs_db_svr_info_t *pbs_db_svr;
pbs_db_que_info_t *pbs_db_que;
pbs_db_node_info_t *pbs_db_node;
pbs_db_sched_info_t *pbs_db_sched;
pbs_db_mominfo_time_t *pbs_db_mominfo_tm;
} pbs_db_un;
};
typedef struct pbs_db_obj_info pbs_db_obj_info_t;
...
Structure used to map database job structure to C
struct
...
pbs_db_job_info
...
{
...
char ji_jobid[PBS_MAXSVRJOBID
...
+
...
1];
...
/*
...
job
...
identifier
...
/
INTEGER ji_state;
...
/
...
INTEGERernal
...
copy
...
of
...
state
...
/
INTEGER ji_substate;
...
/
...
job
...
sub-state
...
/
INTEGER ji_svrflags;
...
/
...
server
...
flags
...
/
INTEGER ji_numattr;
...
/
...
not
...
used
...
/
INTEGER ji_ordering;
...
/
...
special
...
scheduling
...
ordering
...
/
INTEGER ji_priority;
...
/
...
INTEGERernal
...
priority /
BIGINT ji_stime;
...
/
...
time
...
job
...
started
...
execution
...
/
BIGINT ji_endtBdry;
...
/
...
estimate
...
upper
...
bound
...
on
...
end
...
time
...
/
char ji_queue[PBS_MAXQUEUENAME
...
+
...
1];
...
/
...
name
...
of
...
current
...
queue /
char ji_destin[PBS_MAXROUTEDEST
...
+
...
1];
...
/
...
dest
...
from
...
qmove/route
...
/
INTEGER ji_un_type;
...
INTEGER ji_momaddr;
...
/
...
host
...
addr
...
of
...
Server
...
/
INTEGER ji_momport;
...
/
...
port
...
#
...
/
INTEGER ji_exitstat;
...
/
...
job
...
exit
...
status
...
from
...
MOM
...
/
BIGINT ji_quetime;
...
/
...
time
...
entered
...
queue
...
/
BIGINT ji_rteretry;
...
/
...
route
...
retry
...
time
...
/
INTEGER ji_fromsock;
...
/
...
socket
...
job
...
coming
...
over
...
/
BIGINT ji_fromaddr;
...
/
...
host
...
job
...
coming
...
from
...
/
char ji_4jid[8];
...
char ji_4ash[8];
...
INTEGER ji_credtype;
...
INTEGER ji_qrank;
...
BIGINT ji_savetm;
...
BIGINT ji_creattm;
...
pbs_db_attr_list_t
...
attr_list;
...
/
...
list
...
of
...
attributes
...
*/
...
};
...
typedef
...
struct
...
pbs_db_job_info
...
pbs_db_job_info_t;
Structure used to map database resv structure to C
struct pbs_db_
...
resv_info {
char ri_resvid[PBS_MAXSVRJOBID + 1];
char ri_queue[PBS_MAXQUEUENAME + 1];
INTEGER ri_state;
INTEGER ri_substate;
INTEGER ri_type;
BIGINT ri_stime;
BIGINT ri_etime;
BIGINT ri_duration;
INTEGER ri_tactive;
INTEGER ri_svrflags;
INTEGER ri_numattr;
INTEGER ri_resvTag;
INTEGER ri_un_type;
INTEGER ri_fromsock;
BIGINT ri_fromaddr;
BIGINT ri_creattm;
BIGINT ri_savetm;
pbs_db_attr_list_t attr_list; /* list of attributes */
};
typedef struct pbs_db_resv_info pbs_db_resv_info_t;
Structure used to map database server structure to C
struct pbs_db_svr_info {
INTEGER sv_numjobs;
INTEGER sv_numque;
BIGINT sv_jobidnumber;
BIGINT sv_svraddr; / host addr of Server /
INTEGER sv_svrport; / port of host server /
BIGINT sv_creattm;
BIGINT sv_savetm;
pbs_db_attr_list_t attr_list; / list of attributes */
};
typedef struct pbs_db_svr_info pbs_db_svr_info_t;
Structure used to map database scheduler structure to C
struct pbs_db_sched_info {
char sched_name[PBS_MAXSCHEDNAME+1];
BIGINT sched_creattm;
BIGINT sched_savetm;
pbs_db_attr_list_t attr_list; / list of attributes */
};
typedef struct pbs_db_sched_info pbs_db_sched_info_t;
Structure used to map database queue structure to C
struct pbs_db_que_info {
char qu_name[PBS_MAXQUEUENAME +1];
INTEGER qu_type;
BIGINT qu_ctime;
BIGINT qu_mtime;
pbs_db_attr_list_t attr_list; / list of attributes */
};
typedef struct pbs_db_que_info pbs_db_que_info_t;
Structure used to map database node structure to C
struct pbs_db_node_info {
char nd_name[PBS_MAXSERVERNAME+1];
INTEGER nd_index;
BIGINT mom_modtime;
char nd_hostname[PBS_MAXSERVERNAME+1];
INTEGER nd_state;
INTEGER nd_ntype;
char nd_pque[PBS_MAXSERVERNAME+1];
BIGINT nd_creattm;
BIGINT nd_svtime;
pbs_db_attr_list_t attr_list; / list of attributes */
};
typedef struct pbs_db_node_info pbs_db_node_info_t;
Structure used to map database mominfo_time structure to C
struct pbs_db_mominfo_time {
BIGINT mit_time;
INTEGER mit_gen;
};
typedef struct pbs_db_mominfo_time pbs_db_mominfo_time_t;
Structure used to map database job script to C
struct pbs_db_jobscr_info {
char ji_jobid[PBS_MAXSVRJOBID + 1]; / job identifier */
TEXT script;
};
typedef struct pbs_db_jobscr_info pbs_db_jobscr_info_t;
pbs_db_query_options_t: Structure used to pass database query options to database functions. Flags field can be used to pass any flags to a query function. Timestamp field can be used to pass a timestamp, to return rows that have a modification timestamp newer (more recent) than the timestamp passed. (Basically to return rows that have been modified since a point of time)
Structure used to pass database query options to database functions
struct pbs_db_query_options {
int flags; /* Flags field can be used to pass any flags to a query function. */
time_t timestamp; /* Timestamp field can be used to pass a timestamp, to return rows that have a modification timestamp newer (more recent) than the timestamp passed. (Basically to return rows that have been modified since a point of time) */
};
typedef struct pbs_db_query_options pbs_db_query_options_t;
query_cb_t: Function pointer for call back function to process the data returned by the database.
typedef int (*query_cb_t) (pbs_db_obj_info_t *, int *);
pbs_db_attr_list_t: Structure used to map database attr structure to C.
Structure used to map database attr structure to C
struct pbs_db_attr_info {
char attr_name[PBS_MAXATTRNAME+1];
char attr_resc[PBS_MAXATTRRESC+1];
TEXT attr_value;
INTEGER attr_flags;
};
typedef struct pbs_db_attr_info pbs_db_attr_info_t;
struct pbs_db_attr_list {
int attr_count;
pbs_db_attr_info_t *attributes;
};
typedef struct pbs_db_attr_list pbs_
...
db_attr_list_t;
1.2. APIs from libdb.so
1.2.1. PBS Objects: Libdb APIs can work with below mentioned PBS objects.
...