lWriteElemXML() -- Write a element to monitoring level CULL_LAYER
void lWriteElemXML(const lListElem *ep)
Write a element to monitoring level CULL_LAYER a info message
const lListElem *ep - element
lWriteElemXMLTo() -- Write a element to file stream
void lWriteElemXMLTo(const lListElem *ep, FILE *fp)
Write a element to file stream in XML format
const lListElem *ep - element FILE *fp - file stream int ignore_cull_name - ignore the specified cull name if != -1 NOTE: MT-NOTE: is thread save, works only on the objects which are passed in
lWriteListXMLTo() -- Write a list to a file stream
void lWriteListXMLTo(const lList *lp, FILE *fp)
Write a list to a file stream in XML format
const lList *lp - list int nesting_level - current nesting level FILE *fp - file stream NOTE: MT-NOTE: is thread save, works only on the objects which are passed in
cull_parse_jid_hold_list() -- parse a jid list
int cull_parse_jid_hold_list(lList **lpp, const char *str)
parse a jid list of the fomat jid[,jid,...]
lList **lpp - ST_Type result list const char *str - input string to be parsed
int -
MT-NOTE: cull_parse_jid_hold_list() is MT safe
cull_parse_path_list() -- parse a path list
int cull_parse_path_list(lList **lpp, char *path_str)
Parse a path list of the format: [[host]:]path[,[[host]:]path...]
lList **lpp - parsed list PN_Type char *path_str - input string
int - error code 0 = okay 1 = error
MT-NOTE: cull_parse_path_list() is MT safe
fprint_cull_list() -- Prints str and field
int fprint_cull_list(FILE *fp, char *str, lList *lp, int fi)
Prints str and field 'fi' (must be string) of every element of lList lp to file fp separated by blanks. If fp is NULL, "NONE" will be printed.
FILE *fp - a file char *str - a string name of list lList *lp - a list int fi - an element from the list to be printed
int - 0 on success, -1 otherwise
MT-NOTE: fprint_cull_list() is MT safe
fprint_name_value_list() -- Print name=value list of any type.
static int fprint_name_value_list(FILE *fp, char *name, lList *thresholds, int print_slots, int nm_name, int nm_strval, int nm_doubleval)
A list with name (String) and value (Double) CULL fields is printed to 'fp' in a name=value,name=value,... fashion. If print_slots is 0 an entry with name "slots" is skipped. The 'name' is printed prior the actual list to 'fp'. In 'nm_name'/'nm_strval' the CULL names must be passed. Optionally a string representation of the value is printed if non-NULL and if 'nm_strval' is not -1.
FILE *fp - The file pointer char *name - The name printed before the list lList *thresholds - The list int print_slots - Flag indicating whether "slots" is skipped or not. int nm_name - The CULL nm for the name (String). int nm_strval - The CULL nm for the value (Double). int nm_doubleval - If existing in the list the CULL nm for a string representation of the value (String) or -1 otherwise.
int - 0 on success -1 on fprintf() errors
MT-NOTE: fprint_name_value_list() is MT safe
fprint_resource_utilizations() -- Print a name=value list of type RUE_Type
int fprint_resource_utilizations(FILE *fp, char *name, lList *thresholds, int print_slots)
A RUE_Type list is printed to 'fp' in a name=value,name=value,... fashion. If print_slots is 0 an entry with name "slots" is skipped. The 'name' is printed prior the actual list to 'fp'.
FILE *fp - The file pointer char *name - The name printed before the list lList *thresholds - The RUE_Type list. int print_slots - Flag indicating whether "slots" is skipped or not.
int - 0 on success -1 on fprintf() errors
MT-NOTE: fprint_resource_utilizations() is MT safe
fprint_thresholds() -- Print a name=value list of type CE_Type
int fprint_thresholds(FILE *fp, char *name, lList *thresholds, int print_slots)
A CE_Type list is printed to 'fp' in a name=value,name=value,... fashion. If print_slots is 0 an entry with name "slots" is skipped. The 'name' is printed prior the actual list to 'fp'.
FILE *fp - The file pointer char *name - The name printed before the list lList *thresholds - The CE_Type list. int print_slots - Flag indicating whether "slots" is skipped or not.
int - 0 on success -1 on fprintf() errors
MT-NOTE: fprint_thresholds() is MT safe
sge_parse_hold_list() -- parse -h switch of qsub and qalter
int sge_parse_hold_list(char *hold_str, u_long32 prog_number)
Parse the hold flags of -h switches which can be used with qaub and qalter
char *hold_str - string tobe parsed u_long32 prog_number - program number
int - hold state -1 in case of error
MT-NOTE: sge_parse_hold_list() is MT safe
PERM_Type -- CULL Permission element
PERM_Type +--- PERM_manager: 0 or 1 (1 means user has the right) +--- PERM_operator: 0 or 1 (1 means user has the right) +--- PERM_req_host: Name of destination host +--- PERM_req_username: Username on destination host +--- PERM_sge_username: Username on master host
This list is used for an SGE_GDI_PERMCHECK gdi request. The sge_gdi() function is called with SGE_DUMMY_LIST. The qmaster will fill the list with the permisson of the user who is calling. If a PERM_Type list is given to the sge_gdi() function the master is looking for the PERM_req_host value. The PERM_req_username and PERM_sge_username values are filled up with the correct user mapping names. sge_gdi_get_mapping_name() is using the SGE_GDI_PERMCHECK gdi request.
permList = lCreateList("permissions", PERM_Type); ep = lCreateElem(PERM_Type); lAppendElem(permList,ep); lSetString(ep, PERM_req_host, requestedHost); alp = sge_gdi(SGE_DUMMY_LIST, SGE_GDI_PERMCHECK, &permList, NULL, NULL); if (permList != NULL) { ep = permList->first; if (ep != NULL) { mapName = lGetString(ep, PERM_req_username ); } }
JJAT_Type - JAPI array task
SGE_ULONG(JJAT_task_id) array task id SGE_ULONG(JJAT_stat) stat information provided by japi_wait() SGE_LIST(JJAT_rusage) resource usage information provided by japi_wait() SGE_STRING(JJAT_failed_text) printable error text describing reason of job error
CULL element holding per job information about JAPI session
JJ_Type - JAPI job
SGE_ULONG(JJ_jobid) JAPI jobid SGE_ULONG(JJ_type) Job type - analoguous to JB_type SGE_LIST(JJ_finished_tasks, JJAT_Type) list of finished job tasks SGE_LIST(JJ_not_yet_finished_ids, RN_Type) id's of not yet finished tasks SGE_LIST(JJ_started_task_ids, RN_Type) id's of started tasks
CULL element holding per job information about JAPI session
NSV_Type - Named string vector
SGE_STRING(NSV_name) name of the string vector SGE_LIST(NSV_strings) strings of this string vector
CULL element implementing DRMAA vector job template attributes
rc_debit_consumable() -- Debit/Undebit consumables from resource container
int rc_debit_consumable(lListElem *jep, lListElem *ep, lList *centry_list, int slots, int config_nm, int actual_nm, const char *obj_name)
Updates all consumable actual values of a resource container for 'slots' slots of the given job. Positive slots numbers cause debiting, negative ones cause undebiting.
lListElem *jep - The job (JB_Type) defining which resources and how much of them need to be (un)debited lListElem *ep - The resource container (global/host/queue) that owns the resources (EH_Type). lList *centry_list - The global complex list that is needed to interpret the jobs' resource requests. int slots - The number of slots for which we are debiting. Positive slots numbers cause debiting, negative ones cause undebiting. int config_nm - The CULL field of the 'ep' object that contains a CE_Type list of configured complex values. int actual_nm - The CULL field of the 'ep' object that contains a CE_Type list of actual complex values. const char *obj_name - The name of the object we are debiting from. This is only used for monitoring/diagnosis purposes. bool *just_check - If != NULL do not do the actual debiting, but just check if debiting would exceed resources. Only makes sense for debiting (slots > 0).
Returns -1 in case of an error. Otherwise the number of (un)debitations that actually took place is returned. If 0 is returned that means the consumable resources of the 'ep' object has not changed.
ar_get_event_from_string() -- converts a string to a event id
ar_state_event_t ar_get_event_from_string(const char *string)
Converts a human readable event string to the corresponding event if.
const char *string - string
ar_state_event_t - the event id
MT-NOTE: ar_get_event_from_string() is not MT safe
ar_get_string_from_event() -- converts a state event to a string
const char * ar_get_string_from_event(ar_state_event_t event)
Converts a state event id to a human readable string.
ar_state_event_t event - state event id
const char * - string
MT-NOTE: ar_get_string_from_event() is not MT safe
ar_state2dstring() -- writes the AR state as letter combination
void ar_state2dstring(ar_state_t state, dstring *state_as_string)
This function writes the given state of an advance reservation as a letter into the given dstring. The letter will be appended.
ar_state_t state - ar state dstring *state_as_string - dstring
void
MT-NOTE: ar_get_string_from_event() is MT safe
sge_parse_jobtasks() -- parse array task ranges
int sge_parse_jobtasks(lList **ipp, lListElem **idp, const char *str_jobtask, lList **alpp, bool include_names, lList *arrayDefList)
parses a job ids with or without task ranges following this pattern: Digit = '0' | '1' | ... | '9' . JobId = Digit { Digit } . TaskIdRange = TaskId [ '-' TaskId [ ':' Digit ] ] . JobTasks = JobId [ '.' TaskIdRange ] . in case of a job name, the task range has to be specified extra. This will be colleced in an extra list and handed in as the arrayDefList
lList **ipp - ID_Type List, target list lListElem **idp - New ID_Type-Elem parsed from str_jobtask const char *str_jobtask - job id with task range or job name lList **alpp - answer list bool include_names - true: job names are allowed lList *arrayDefList - in case of job names, a list of array taskes
int - -1 no valid JobTask-Identifier 0 everything went fine
MT-NOTE: sge_parse_jobtasks() is MT safe
ar_list_locate() -- locate an advance reservation by id
lListElem* ar_list_locate(lList *ar_list, u_long32 ar_id)
This function returns an AR object with the selected id from the given list.
lList *ar_list - list to be searched in u_long32 ar_id - id of interest
lListElem* - if found the reference to the AR object, else NULL
MT-NOTE: ar_list_locate() is MT safe
ar_validate() -- validate an advance reservation
bool ar_validate(lListElem *ar, lList **alpp, bool in_master)
Ensures a new AR has valid start and end times
lListElem *ar - the AR to check lList **alpp - answer list pointer bool in_master - are we in qmaster? bool is_spool - do we validate for spooling?
bool - true if OK, else false
MT-NOTE: ar_validate() is MT safe
sge_ar_has_errors() -- Has AR errors?
bool sge_ar_has_errors(lListElem *ar)
Check if one of the reserved queues is in state where jobs can not be running
lListElem *ar - advance reservation object (AR_Type)
bool - true if has errors false if has no errors
MT-NOTE: sge_ar_has_errors() is MT safe
answer_list_has_status() -- status contains in list
bool answer_list_has_status(lList **answer_list, u_long32 status)
The function returns true if the "answer_list" contains at least one answer element with the given status
lList **answer_list - AN_Type list u_long32 status - expected status
bool - true or false
MT-NOTE: answer_list_has_status() is MT safe
answer_list_remove_quality() -- Remove elements from list
void answer_list_remove_quality(lList *alp, answer_quality_t quality)
The function removes all answer list elements with the given quality from the list.
lList *answer_list - AN_Type list answer_quality_t quality - quality value
void -
MT-NOTE: answer_list_remove_quality() is MT safe
binding_print_to_string() -- Prints the content of a binding list to a string
bool binding_print_to_string(const lListElem *this_elem, dstring *string)
Prints the binding type and binding strategy of a binding list element into a string.
const lListElem* this_elem - Binding list element
const dstring *string - Output string which must be initialized.
bool - true in all cases
MT-NOTE: is_starting_point() is MT safe
calendar_get_current_state_and_end() -- generates the TODO orders
u_long32 calendar_get_current_state_and_end(const lListElem *cep, time_t *then, time_t *now)
It calles the routins to compute the current state and next change. The current state is than changed into todo orders.
const lListElem *cep - (in) calendar (CAL_Type) time_t *then - (out) next state change time_t *now - (in) now
u_long32 - what to do? what is the current state
MT-NOTE: calendar_get_current_state_and_end() is MT safe
calendar_open_in_time_frame() -- check if calender is open in given time frame
bool calendar_open_in_time_frame(const lListElem *cep, u_long32 start_time, u_long32 duration)
Returns the state (only open or closed) of a calendar in a given time frame
const lListElem *cep - calendar object (CAL_Type) u_long32 start_time - time frame start u_long32 duration - time frame duration
bool - true if open false if closed
MT-NOTE: calendar_open_in_time_frame() is MT safe
calender_state_changes() -- calendar states and calendar state list
u_long32 calender_state_changes(const lListElem *cep, lList **state_changes_list, time_t *when)
Computes the current state and generates a calendar state list. Right now it only does it for the current state and the next state. But it could be extended to handle more states. Based on the shortcomings of the methods it is using, it has to check, wether they reported a state change and if not, call the methods again with a new time stamp. It is starting with now and goes into the future, based on the reported state changes.
const lListElem *cep - (in) calendar (CAL_Type) lList **state_changes_list - (out) a pointer to a list pointer (CQU_Type) time_t *when - (out) when will the next change be, or 0 time_t *now - (in) should be NULL, or the current time (only for the test programm)
u_long32 - new state (QI_DO_NOTHING, QI_DO_DISABLE, QI_DO_SUSPEND)
MT-NOTE: calender_state_changes() is MT safe
compute_limit() -- compute the next state change
static time_t compute_limit(bool today, bool active, const lList *year_time, const lList *week_time, const lList *day_time, const lListElem *now, bool *is_end_of_day_reached)
This function computes the next state change based on the three booleans: today, active, and is_full_day. There are some special calendar states, which result in special code to handle thus states. They are all special to the week calendar. - A week calendar can specify a range beyond the week borders. For example Wed-Mon. This will be broken down to two structures: - Wed-Sat (day 3 till 6) - Sun-Mon. (day 0 till 1) Since it is one range, the actual break down will look as follows: - Wed-Mon (day 3 till 8) - Sun-Mon (day 0 till 1) The first range, which is too big, allows us to recognize the whole range, thus we are not issuing a state change at 0 a.m. on Sunday but 0 a.m on Tuesday. - An other special case is a calendar, which disables a queue for a whole week. There is special code to recognize that.
bool today - does the state change happen today? bool active - is a calendar entry active? const lList *year_time - year_time structure or NULL, if week_time is set const lList *week_time - week_time strucutre or NULL, if year_time is set const lList *day_time - day_time changes, if the exist const lListElem *now - a now cull representation bool *is_end_of_day_reached - (out) is the end of day reached?
static time_t - time of the next change or end of the day
MT-NOTE: compute_limit() is MT safe
extend_wday_range() -- extend ranges over the week border....
static void extend_wday_range(lList *week_day)
extend the range over the one week border. The week ends on Sunday, but the range can go till Monday or longer. But the beginning till the end will never contain more than 7 days (a week). This is needed!!
lList *week_day - calendar list for a week
MT-NOTE: extend_wday_range() is MT safe
is_week_entry_active() -- computes the current queue state and the next change
static u_long32 is_week_entry_active(lListElem *tm, lListElem *week_entry, time_t *limit, int rec_count)
Computes the current queue state based on its calendar setting. It also figures out how long this state lasts and when the next change will be. The function for the next change has a short comming, that it will generate an state end, when the current day changes. Therefore this function calles itself recursivly, if such an event happens. It can only happen, when the callendar contains a state changes during a day. In Theory, it should not call itself more than 1 time. With the extra call, it should have found a new state change on the next day, or the day, when the next change comes.
lListElem *tm - TM_Type - represeting now (time) lListElem *week_entry - CA_Type - calendar entries for the week setup time_t *limit - next state changea (0, if there is no further state change) int rec_count - current recoursion level
static u_long32 - the current state
MT-NOTE: is_week_entry_active() is MT safe
is_year_entry_active() -- computes the current queue state and the next change
static u_long32 is_year_entry_active(lListElem *tm, lListElem *week_entry, time_t *limit)
Computes the current queue state based on its calendar setting. It also figures out how long this state lasts and when the next change will be. The function for the next change has a short comming, that it will generate an state end, when the current day changes. Therefore this function calles itself recursivly, if such an event happens. It can only happen, when the callendar contains a state changes during a day. In Theory, it should not call itself more than 1 time. With the extra call, it should have found a new state change on the next day, or the day, when the next change comes. This function has problem, when two calendar entries overlap themselfs and one has day changes, the otherone has not. It will report those day changes, even though there are none. It makse a mistake in figuring out, which calendar setting is the more important one.
lListElem *tm - TM_Type - represeting now (time) lListElem *week_entry - CA_Type - calendar entries for the week setup time_t *limit - next state changea (0, if there is no further state change)
static u_long32 - the current state
MT-NOTE: is_week_entry_active() is MT safe
join_wday_range() -- join overlapping ranges
static void join_wday_range(lList *week_day)
A user can define overlapping ranges in the week calendar. This function will join them into one definition.
lList *week_day - week calendar def. list
MT-NOTE: join_wday_range() is MT safe
load_formula_is_centry_referenced() -- search load formula for centry reference
bool load_formula_is_centry_referenced(const char *load_formula, const lListElem *centry)
This function searches for a centry reference in the defined algebraic expression
const char *load_formula - load formula expression const lListElem *centry - centry to search for
bool - true if referenced false if not referenced
MT-NOTE: load_formula_is_centry_referenced() is MT safe
map_consumable2str() -- map to consumable string
const char * map_consumable2str(u_long32 op)
maps int representation of CONSUMABLE to string
u_long32 op - CONSUMABLE_*
const char * - string representation of consumable definition
MT-NOTE: map_consumable2str() is not safe
validate_load_formula()
bool validate_load_formula(lListElem *schedd_conf, lList **answer_list, lList *centry_list, const char *name)
The function validates a load formula string.
const char *load_formula - string that should be a valid load formula lList **answer_list - error messages lList *centry_list - list of defined complex values const char* - name (used for error messages)
bool - true if valid false if unvalid MT-NOTE: is MT-safe, works only on the passed in data
clean_conf() -- frees the whole master configuration
static void clean_conf(void)
MT-NOTE: clean_conf() is not MT safe, caller needs LOCK_MASTER_CONF as write lock
conf_update_thread_profiling() -- enable/disable profiling for thread
void conf_update_thread_profiling(const char *thread_name)
Enables or disables profiling for thread(s) according to the actual global config, qmaster_params. If no thread name (NULL pointer) is given, profiling information of all threads is updated. If a name is given, all threads with that name are updated.
const char *thread_name - thread name, NULL for all threads
MT-NOTE: conf_update_thread_profiling() is MT safe
merge_configuration() -- merge global and local configuration
int merge_configuration(lListElem *global, lListElem *local, lList **lpp)
Merge global and local configuration and set lpp list and set conf struct from lpp
lListElem *global - global configuration lListElem *local - local configuration lList **lpp - target configuration
int - 0 success -2 no global configuration
MT-NOTE: merge_configuration() is MT safe
setConfFromCull() -- set the master configuration from cull
static void setConfFromCull(lList *lpCfg)
set the master configuration from cull
lList *lpCfg - configuration list
MT-NOTE: setConfFromCull() is not MT safe, caller needs LOCK_MASTER_CONF as write lock
sge_show_conf() -- in debug mode prints out the master configuration
void sge_show_conf()
MT-NOTE: sge_show_conf() is MT safe
cqueue_find_used_href() -- Finds used host references
bool cqueue_find_used_href(lListElem *this_elem, lList **answer_list, lList **href_list)
This function returns all host references in "href_list" for which attribute specific overwritings exist in the cqueue "this_elem".
lListElem *this_elem - CQ_Type lList **answer_list - AN_Type lList **href_list - HR_Type
bool - error state true - success false - error
MT-NOTE: cqueue_find_used_href() is MT safe
cqueue_get_name_from_qinstance() -- returns the cluster queue part of a queue
char* cqueue_get_name_from_qinstance(const char *queue_instance)
Returns a character pointer to a newly malloced string containing the cluster queue part of a queue instance name. The memory needs to be free'd by the caller
const char *queue_instance - queue instance or cluster queue
char* - cluster queue name
MT-NOTE: cqueue_get_name_from_qinstance() is MT safe
cqueue_purge_host() -- purge attributes from queue
bool cqueue_purge_host(lListElem *this_elem, lList **answer_list, lList *attr_list, const char *hgroup_or_hostname)
???
lListElem *this_elem - cqueue list element lList **answer_list - answer list lList *attr_list - list with attributes to search for hgroup_or_hostname wildcards allowed const char *hgroup_or_hostname - host group or hostname which should be purged
bool - true - hostname found and purged false - attribute or hostname not found
MT-NOTE: cqueue_purge_host() is not MT safe
cqueue_verify_job_slots() -- verify the queue slots attribute
bool cqueue_verify_job_slots(lListElem *cqueue, lList **answer_list, lListElem *attr_elem)
Verifies if the slots attribute of a queue is in the expected range (0 .. MAX_SEQNUM). MAX_SEQNUM is 9999999.
lListElem *cqueue - The queue to verify. lList **answer_list - answer list to report errors lListElem *attr_elem - the attribute to verify
bool - true on success, false on error
MT-NOTE: cqueue_verify_job_slots() is MT safe
cqueue_verify_memory_value() -- verify a queue memory attribute like h_vmem
bool cqueue_verify_memory_value(lListElem *cqueue, lList **answer_list, lListElem *attr_elem)
Verifies if a memory attribute of a queue is in the expected range (0 .. INFINITY) NONE is no allowed value.
lListElem *cqueue - The queue to verify. lList **answer_list - answer list to report errors lListElem *attr_elem - the attribute to verify
bool - true on success, false on error
MT-NOTE: cqueue_verify_memory_value() is MT safe
cqueue_verify_time_value() -- verify a queue time attribute like h_cpu
bool cqueue_verify_time_value(lListElem *cqueue, lList **answer_list, lListElem *attr_elem)
Verifies if a time attribute of a queue is in the expected range (0:0:0 .. INFINITY) NONE is no allowed value.
lListElem *cqueue - The queue to verify. lList **answer_list - answer list to report errors lListElem *attr_elem - the attribute to verify
bool - true on success, false on error
MT-NOTE: cqueue_verify_time_value() is MT safe
event_client_verify() -- verify an event client object
bool event_client_verify(const lListElem *event_client, lList **answer_list)
Verifies, if an incoming event client object (new event client registration through a GDI_ADD operation or event client modification through GDI_MOD operation is correct. We do the following verifications: - EV_id correct: - add request usually may only request dynamic event client id, if a special id is requested, we must be on local host and be admin user or root. - EV_name (valid string, limited length) - EV_d_time (valid delivery interval) - EV_flush_delay (valid flush delay) - EV_subscribed (valid subscription list) - EV_busy_handling (valid busy handling) - EV_session (valid string, limited length) No verification will be done - EV_host (is always overwritten by qmaster code) - EV_commproc (comes from commlib) - EV_commid (comes from commlib) - EV_uid (is always overwritten by qmaster code) - EV_last_heard_from (only used by qmaster) - EV_last_send_time (only used by qmaster) - EV_next_send_time (only used by qmaster) - EV_sub_array (only used by qmaster) - EV_changed (?) - EV_next_number (?) - EV_state (?)
const lListElem *event_client - ??? lList **answer_list - ??? bool add - is this an add request (or mod)?
bool -
MT-NOTE: event_client_verify() is MT safe
ja_task_is_tightly_integrated() -- is this a tightly integrated job?
bool ja_task_is_tightly_integrated(const lListElem *ja_task)
Figures out, if a running ja task belongs to a tightly integrated parallel job.
const lListElem *ja_task - the ja task to test
bool - true if it is a tightly integrated parallel job, else false
MT-NOTE: ja_task_is_tightly_integrated() is MT safe, the caller must hold a read lock on the SGE_TYPE_PE list.
ja_task_verify() -- verify a ja_task object
bool ja_task_verify(const lListElem *ja_task, lList **answer_list)
Verify correctness of a ja_task object.
const lListElem *ja_task - the ja_task to verify lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: ja_task_verify() is MT safe
ja_task_verify_execd_job() -- verify a ja_task object for execd
bool ja_task_verify_execd_job(const lListElem *ja_task, lList **answer_list)
Verify a ja_task object that has been sent to execd.
const lListElem *ja_task - the ja_task object to verify lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: ja_task_verify_execd_job() is MT safe
ja_task_verify_granted_destin_identifier() -- verify a granted destination identifier
bool ja_task_verify_granted_destin_identifier(const lListElem *ep, lList **answer_list)
Verify a single element of a granted destination identifier list (a granted queue with a certain number of slots).
const lListElem *ep - the element to verify lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: ja_task_verify_granted_destin_identifier() is MT safe
ja_task_verify_granted_destin_identifier_list() -- verify granted destination identifier list
bool ja_task_verify_granted_destin_identifier_list(const lList *gdil, lList **answer_list)
Verify correctness of a granted destination identifier list being part of a scheduled ja_task.
const lList *gdil - the list to verify lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: ja_task_verify_granted_destin_identifier_list() is MT safe
job_count_rescheduled_ja_tasks() -- count rescheduled tasks
static int job_count_rescheduled_ja_tasks(lListElem *job, bool count_all)
Returns number of rescheduled tasks in JB_ja_tasks of a job. The 'count_all' flag can be used to cause a quick exit if merely the existence of rescheduled tasks is of interest.
lListElem *job - the job (JB_Type) bool count_all - quick exit flag
static int - number of tasks resp. 0/1
MT-NOTE: job_count_rescheduled_ja_tasks() is MT safe
job_get_wallclock_limit() -- Computes jobs wallclock limit
bool job_get_wallclock_limit(u_long32 *limit, const lListElem *jep)
Compute the jobs wallclock limit depending on requested h_rt, s_rt. If no limit was requested the maximal ulong32 value is returned
u_long32 *limit - store for the value const lListElem *jep - jobs ep
bool - true on success false if no value was requested
MT-NOTE: job_get_wallclock_limit() is not MT safe
job_verify() -- verify a job object
bool job_verify(const lListElem *job, lList **answer_list)
Verifies structure and contents of a job object. As a job object may look quite different depending on its state, additional functions are provided, calling this function doing general tests and doing additional verification themselves.
const lListElem *job - the job object to verify lList **answer_list - answer list to pass back error messages bool do_cull_verify - do cull verification against the JB_Type descriptor.
bool - true on success, false on error with error message in answer_list
MT-NOTE: job_verify() is MT safe
The function is far from being complete. Currently, only the CULL structure is verified, not the contents.
job_verify_submitted_job() -- verify a just submitted job
bool job_verify_submitted_job(const lListElem *job, lList **answer_list)
Verifies a just submitted job object. Does generic tests by calling job_verify, like verifying the cull structure, and makes sure a number of job attributes are set correctly.
const lListElem *job - the job to verify lList **answer_list - answer list to pass back error messages
bool - true on success, false on error with error message in answer_list
MT-NOTE: job_verify_submitted_job() is MT safe
The function is far from being complete. Currently, only the CULL structure is verified, not the contents.
sge_unparse_acl_dstring() -- creates a string from the access lists and user
bool sge_unparse_acl_dstring(dstring *category_str, const char *owner, const char *group, const lList *acl_list, const char *option)
???
dstring *category_str - target string const char *owner - job owner const char *group - group owner const lList *acl_list - a list of all access lists const char *option - string option to put in infront of the generated string
bool - true, if everything was fine
MT-NOTE: sge_unparse_acl_dstring() is MT safe
sge_unparse_pe_dstring() -- creates a string from a pe request
bool sge_unparse_pe_dstring(dstring *category_str, const lListElem *job_elem, int pe_pos, int range_pos, const char *option)
???
dstring *category_str - target string const lListElem *job_elem - a job structure int pe_pos - position of the pe name attribute in the job int range_pos - position of the pe range request attribute in the job const char *option - string option to put in infront of the generated string
bool - true, if everything was fine
MT-NOTE: sge_unparse_pe_dstring() is MT safe
sge_unparse_queue_list_dstring() -- creates a string from a queue name list
bool sge_unparse_queue_list_dstring(dstring *category_str, const lListElem *job_elem, int nm, const char *option)
???
dstring *category_str - target string const lListElem *job_elem - a job structure int nm - position in of the queue list attribute in the job const char *option - string option to put in infront of the generated string
bool - true, if everything was fine
MT-NOTE: sge_unparse_queue_list_dstring() is MT safe
sge_unparse_resource_list_dstring() -- creates a string from resource requests
bool sge_unparse_resource_list_dstring(dstring *category_str, lListElem *job_elem, int nm, const char *option)
???
dstring *category_str - target string lListElem *job_elem - a job structure int nm - position of the resource list attribute in the job const char *option - string option to put in infront of the generated string
bool - true, if everything was fine
MT-NOTE: sge_unparse_resource_list_dstring() is MT safe
sge_unparse_string_option_dstring() -- copies a string into a dstring
bool sge_unparse_string_option_dstring(dstring *category_str, const lListElem *job_elem, int nm, char *option)
Copies a string into a dstring. Used for category string building
dstring *category_str - target string const lListElem *job_elem - a job structure int nm - position of the string attribute in the job char *option - string option to put in in front of the generated string
bool - always true
MT-NOTE: sge_unparse_string_option_dstring() is MT safe
sge_unparse_ulong_option_dstring() -- copies a string into a dstring
bool sge_unparse_ulong_option_dstring(dstring *category_str, const lListElem *job_elem, int nm, char *option)
Copies a string into a dstring. Used for category string building
dstring *category_str - target string const lListElem *job_elem - a job structure int nm - position of the string attribute in the job char *option - string option to put in front of the generated string
bool - always true
???
MT-NOTE: sge_unparse_ulong_option_dstring() is MT safe
jsv_stop() -- Stop a JSV instance which was previously started
bool jsv_stop(lListElem *jsv, lList **answer_list, bool try_soft_quit)
Stop a running JSV instance which was previously started. If the variable 'try_soft_quit' is set to 'true' then this function tries to communicate with the process. It will then send a "QUIT" string to pipe end which is connected with the stdin of the JSV process. If the script does then not terminate within JSV_QUIT_TIMEOUT seconds then it will be terminated hard via kill signal.
lListElem *jsv - JSV_Type element lList **answer_list - AN_Type element bool try_soft_quit - "true" if the JSV should terminate itself
bool - error state true - success false - error
MT-NOTE: jsv_stop() is MT safe
obj_mt_init() -- creats the pthread key
void obj_mt_init(void)
Creates the pthread key. Needs to be called when the daemon, clients starts up
MT-NOTE: obj_mt_init() is not MT safe
obj_state_destroy() -- frees the thread local memory
static void obj_state_destroy(void* st)
void* st - thread local memory
MT-NOTE: obj_state_destroy() is MT safe
obj_state_global_init() -- Inits the thread local memory global
static void obj_state_global_init(obj_state_t *state)
Inits the thread local memory, by coping the static information and setting the list pointers to NULL
obj_state_t *state - the thread local memory
MT-NOTE: obj_state_global_init() is MT safe
obj_state_init() -- Inits the thread local memory none global
static void obj_state_init(obj_state_t *state)
Inits the thread local memory, by coping the static information and setting the list pointers to NULL
obj_state_t *state - the thread local memory
MT-NOTE: obj_state_init() is MT safe
object_get_name() -- get the object name by object descriptor
const char * object_get_name(const lDescr *descr)
Returns the object name for a given descriptor. If the descriptor doesn't match a descriptor in object_base, return "unknown".
const lDescr *descr - descriptor.
const char * - the object name
object_get_name(JOB_Type) returns "JOB"
MT-NOTE: object_get_name() is MT safe
object_list_verify_cull() -- verify cull list structure
bool object_list_verify_cull(const lList *lp, const lDescr *descr)
Verifies that a cull list, including all its objects and sublists, is a valid object of a defined type. There are cases, where the type of a list cannot be verified, when the type of a sublist is set to CULL_ANY_SUBTYPE in the cull list definition. In this case, the list descriptor is not checked, but still all list objects and there sublists are verified.
const lList *lp - list to verify const lDescr *descr - expected descriptor (or NULL, see above)
bool - true, if the object is OK, else false
MT-NOTE: object_list_verify_cull() is MT safe
object_type_get_global_object_description() -- grands access to the global master lists
object_description* object_type_get_global_object_description(void)
object_description* - the global object description / master lists
MT-NOTE: object_type_get_global_object_description() is MT safe
object_type_get_object_description() -- gets the master list table
object_description* object_type_get_object_description()
???
object_description* - the table with all master lists and its information
MT-NOTE: object_type_get_object_description() is MT safe
object_unpack_elem_verify() -- unpack and verify an object
bool object_unpack_elem_verify(lList **answer_list, sge_pack_buffer *pb, lListElem **epp, const lDescr *descr)
Unpacks the given packbuffer. If unpacking was successfull, verifies the object against the given descriptor.
lList **answer_list - answer list to report errors sge_pack_buffer *pb - the packbuffer containing the object lListElem **epp - element pointer to pass back the unpacked object const lDescr *descr - the expected object type
bool - true on success, else false
MT-NOTE: object_unpack_elem_verify() is MT safe
object_verify_cull() -- verify cull object structure
bool object_verify_cull(const lListElem *ep, const lDescr *descr)
Verifies that a cull object, including all its sublists and subobjects, is a valid object of a defined type. The type (descr) argument may be zero in two cases: - the descriptor has already been checked. This is the case when called from object_list_verify_cull(). - we don't know the type of a subobject (if it is defined as CULL_ANY_SUBTYPE in the cull object definition
const lListElem *ep - the object to verify const lDescr *descr - expected object type, or NULL (see above)
bool - true on success, else false
MT-NOTE: object_verify_cull() is MT safe
object_verify_expression_syntax() -- verify string attribute expression syntax
bool object_verify_expression_syntax(const lListElem *ep, lList **answer_list)
Verifies that a string is expression in correct format.
const lListElem *ep - the object to verify lList **answer_list - answer list to pass back error messages
bool - true on success, false on error with error message in answer_list
MT-NOTE: object_verify_expression_syntax() is MT safe
object_verify_name() - verifies object name
int object_verify_name(const lListElem *object, lList **alpp, int name, object_descr)
These checks are done for the attribute JB_object_name of 'object': #1 reject object name if it starts with a digit A detailed problem description is added to the answer list.
const lListElem *object - JB_Type elemente lList **alpp - the answer list int name - object name char *object_descr - used for the text in the answer list
int - returns != 0 if there is a problem with the object name MT-NOTE: sge_resolve_host() is MT safe
object_verify_pe_range() -- Verify validness of a jobs PE range request
int object_verify_pe_range(lList **alpp, const char *pe_name, lList *pe_range)
Verifies a jobs PE range is valid. Currently the following is done - make PE range list normalized and ascending - ensure PE range min/max not 0 - in case multiple PEs match the PE request in GEEE ensure the urgency slots setting is non-ambiguous
lList **alpp - Returns answer list with error context. const char *pe_name - PE request lList *pe_range - PE range to be verified const char *object_descr - object description for user messages
static int - STATUS_OK on success
object_verify_string_not_null() -- verify string attribute not null
bool object_verify_string_not_null(const lListElem *ep, lList **answer_list, int nm)
Verifies that a string attribute of a certain object is not NULL.
const lListElem *ep - the object to verify lList **answer_list - answer list to pass back error messages int nm - the attribute to verify
bool - true on success, false on error with error message in answer_list
MT-NOTE: object_verify_string_not_null() is MT safe
object_verify_ulong_not_null() -- verify ulong attribute not null
bool object_verify_ulong_not_null(const lListElem *ep, lList **answer_list, int nm)
Verify that a certain ulong attribute in an object is not 0
const lListElem *ep - object to verify lList **answer_list - answer list to pass back error messages int nm - the attribute to verify
bool - true on success, false on error with error message in answer_list
MT-NOTE: object_verify_ulong_not_null() is MT safe
object_verify_ulong_null() -- verify ulong attribute null
bool object_verify_ulong_null(const lListElem *ep, lList **answer_list, int nm)
Verify that a certain ulong attribute in an object is 0
const lListElem *ep - object to verify lList **answer_list - answer list to pass back error messages int nm - the attribute to verify
bool - true on success, false on error with error message in answer_list
MT-NOTE: object_verify_ulong_null() is MT safe
object_verify_double_null() -- verify double attribute null
bool object_verify_ulong_null(const lListElem *ep, lList **answer_list, int nm)
Verify that a certain double attribute in an object is 0
const lListElem *ep - object to verify lList **answer_list - answer list to pass back error messages int nm - the attribute to verify
bool - true on success, false on error with error message in answer_list
MT-NOTE: object_verify_double_null() is MT safe
compress_ressources() -- remove multiple requests for one resource
int compress_ressources(lList **alpp, lList *rl, const char *object_descr )
remove multiple requests for one resource this can't be done fully in clients without having complex definitions -l arch=linux -l a=sun4
lList **alpp - Returns answer list with error context. lList *rl - object description for user messages const char *object_descr - object description
static int - 0 on success
sge_create_cull_order_pos() -- generates a cull order position struct
void sge_create_cull_order_pos(order_pos_t **cull_order_pos, lListElem *jep, lListElem *jatp, lListElem *joker, lListElem *joker_task)
generates a cull order position struct
order_pos_t **cull_order_pos - struct to init. if not NULL, the old struct will be freed lListElem *jep - job structure lListElem *jatp - ja task structure lListElem *joker - job order structure lListElem *joker_task - ja task order structure
MT-NOTE: sge_create_cull_order_pos() is MT safe
sge_free_cull_order_pos() -- frees a cull order struct
void sge_free_cull_order_pos(order_pos_t **cull_order_pos)
frees a cull order struct
order_pos_t **cull_order_pos - a douple pointer to the struct. Will be set to NULL
MT-NOTE: sge_free_cull_order_pos() is MT safe
path_alias_verify() -- verify path alias list
bool path_alias_verify(const lList *path_aliases, lList **answer_list)
Verify a path alias list as it is sent with job or pe task start orders to sge_execd.
const lList *path_aliases - path alias list lList **answer_list - answer list to pass back error messages
bool - true on success, false on error with error message in answer_list
MT-NOTE: path_alias_verify() is MT safe
path_list_verify() -- verify a path list
bool path_list_verify(const lList *path_list, lList **answer_list, const char *name)
Verify a path list, e.g. the path specification in JB_stdout_path_list, coming from a qsub -o <path_list>.
const lList *path_list - the path list to verify lList **answer_list - answer list to pass back error messages const char *name - name of the checked attribute for error output
bool - true: everything ok, else false
MT-NOTE: path_list_verify() is MT safe
path_verify() -- verify a path string
bool path_verify(const char *path, lList **answer_list, const char *name, bool absolute)
Verifies if a path string has valid contents.
const char *path - the string to verify lList **answer_list - answer list to pass back error messages const char *name - name of the path to check, e.g. "prolog" for error output bool absolute - does it have to be an absolute path?
bool - true on success, false on error with error message in answer_list
MT-NOTE: path_verify() is MT safe
pe_do_accounting_summary() -- do accounting summary?
bool pe_do_accounting_summary(const lListElem *pe)
Returns whether for tightly integrated jobs - a single accounting record shall be created (true), or - an individual accounting record shall be created for every task, and an accounting record for the master task (job script).
const lListElem *pe - the parallel environment
bool - true (do summary), or false (many records)
MT-NOTE: pe_do_accounting_summary() is MT safe
pe_task_verify_request() -- verify a pe task request object
bool pe_task_verify_request(const lListElem *petr, lList **answer_list)
Verifies structure and contents of a pe task request. A pe task request is sent to sge_execd by qrsh -inherit.
const lListElem *petr - the object to verify lList **answer_list - answer list to pass back error messages
bool - true on success, false on error with error message in answer_list
MT-NOTE: pe_task_verify_request() is MT safe
The function is far from being complete. Currently, only the CULL structure is verified, not the contents.
clean_procList() -- cleans the procList from already finished jobs
void clean_procList()
Remove all elements from procList which has not been marked as running. Mark all remaining elements as not running.
free_procList() -- frees the formerly created procList
void free_procList()
Frees the formerly created procList
gen_procList() -- creates the proc table
void gen_procList()
Creates the hashed list procList
get_pr() -- Look for a certain process entry in the proc table
lListElem* get_pr(int pid)
Looks for the element with the specified pid and return it. Otherwise return NULL
int pid - The process ID of the process we're looking for.
lListElem* - PRO_Type object or NULL
qinstance_list_verify_execd_job() -- verify a queue instance list
bool qinstance_list_verify_execd_job(const lList *queue_list, lList **answer_list)
Verify correctness of a queue instance list, that has been sent by qmaster to execd as part of a job start order.
const lList *queue_list - the queue instance list lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: qinstance_list_verify_execd_job() is MT safe
qinstance_set_error() -- set/unset qinstance into state
void qinstance_set_error(lListElem *qinstance, u_long32 type, const char *message, bool set_error)
Sets or Unsets a qinstance into error state and adds or removes the given error message
lListElem *qinstance - qinstance object (QU_Type) u_long32 type - new state const char *message - error message to set bool set_error - set or unset
MT-NOTE: qinstance_set_error() is MT safe
qinstance_verify() -- verify a queue instance in execd
bool qinstance_verify(const lListElem *qep, lList **answer_list)
Verify a single queue instance, that has been sent by qmaster to execd as part of a job start order.
const lListElem *qep - the queue instance to verify lList **answer_list - answer list to pass back error messages
bool - true: everything ok, else false
MT-NOTE: qinstance_verify() is MT safe
qinstance_verify_full_name() -- verify a queue instance full name
bool qinstance_verify_full_name(lList **answer_list, const char *full_name)
Verifies, if a queue instance full name is correct (form cqueue@host).
lList **answer_list - answer list to pass back error messages const char *full_name - the queue instance name to verify
bool - true: everything ok, else false
MT-NOTE: qinstance_verify_full_name() is MT safe
cull_parse_destination_identifier_list() -- parse a queue reference list
int cull_parse_destination_identifier_list(lList **lpp, char *dest_str)
Parse 'dest_str' and create a QR_type list.
lList **lpp - QR_Type list char *dest_str - input string
int - error state
MT-NOTE: cull_parse_destination_identifier_list() is MT safe
qref_cq_rejected() -- Check, if -q qref_list rejects (cluster) queue
bool qref_cq_rejected(const char *qref_pattern, const char *cqname, const char *hostname, const lList *hgroup_list)
Check if patter in -q qref_list rejects cluster queue and hostname, if passed. If NULL is passed as hostname, cluster queue verfication is performed only.
const char *qref_pattern - a wildcard pattern as defined for -q qref_list const char *cqname - cluster queue name const char *hostname - execution hostname (may be NULL) const lList *hgroup_list - host group list
bool - true if rejected
MT-NOTE: qref_cq_rejected() is MT safe
qref_list_cq_rejected() -- Check, if -q qref_list rejects (cluster) queue
bool qref_list_cq_rejected(const lList *qref_list, const char *cqname, const char *hostname, const lList *hgroup_list)
Check if -q qref_list rejects cluster queue and hostname, if passed. If NULL is passed as hostname, cluster queue verfication is performed only.
const lList *qref_list - QR_Type list as usef for -q qref_list const char *cqname - cluster queue name const char *hostname - exeuction hostname const lList *hgroup_list - host group list
bool - true if rejected
MT-NOTE: qref_list_cq_rejected() is MT safe
qref_list_host_rejected() -- Check if -q ??@href rejects host
bool qref_list_host_rejected(const char *href, const char *hostname, const lList *hgroup_list)
Checks if a -q ??@href rejects host. The href may be either wc_hostgroup or wc_host.
const char *href - Host reference from -q ??@href const char *hostname - the host in question const lList *hgroup_list - hostgroup list (HGRP_Type)
bool - True if rejected.
MT-NOTE: qref_list_host_rejected() is MT safe
rqs_append_filter_to_dstringRQRF_object_append_to_dstring() -- RQRF Element to string
bool rqs_append_filter_to_dstring(lListElem *filter, dstring *buffer, lList **alp)
Converts a RQRF element to string for spooling
lListElem *filter - Element to be converted dstring *buffer - buffer for the element string lList **alp - answer_list
bool - true on success false on error
MT-NOTE: rqs_append_filter_to_dstring() is MT safe
rqs_debit_consumable() -- debit slots in all relevant rule sets
int rqs_debit_consumable(lListElem *rqs, lListElem *job, lListElem *granted, lListElem *pe, lList *centry_list, int slots)
iterater over all rules in the given rule set and debit the number of slots in the relevant rule
lListElem *rqs - resource quota set (RQS_Type) lListElem *job - job request (JB_Type) lListElem *granted - granted destination identifier (JG_Type) lListElem *pe - granted pe (PE_Type) lList *centry_list - consumable resouces list (CE_Type) int slots - slot amount
int - amount of modified rule
MT-NOTE: rqs_debit_consumable() is not MT safe
rqs_debit_rule_usage() -- debit usage in a resource quota rule
int rqs_debit_rule_usage(lListElem *job, lListElem *rule, dstring *rue_name, int slots, lList *centry_list, const char *obj_name)
Debit an amount of slots in all limits of one resource quota rule
lListElem *job - job request (JG_Type) lListElem *rule - resource quota rule (RQR_Type) dstring *rue_name - rue name that counts int slots - amount of slots to debit lList *centry_list - consumable resource list (CE_Type) const char *obj_name - name of the limit
int - amount of debited limits
MT-NOTE: rqs_debit_rule_usage() is MT safe
rqs_filter_match() -- compares value with configured filter
bool rqs_filter_match(lListElem *filter, int filter_type, const char *value, lList *master_userset_list, lList *master_hgroup_list)
This function compares for the given filter if the value does match the configured one. Wildcards are allowed for the filter as well as for the value.
lListElem *filter - filter element (RQRF_Type) int filter_type - filter type const char *value - value to match lList *master_userset_list - master userset list (US_Type) lList *master_hgroup_list - master hostgroup list (HG_Type)
bool - true if the value does match false if the value does not match
MT-NOTE: rqs_filter_match() is MT safe
rqs_get_matching_rule() -- found relevant rule for job request
lListElem* rqs_get_matching_rule(lListElem *rqs, const char *user, const char *project, const char* pe, const char *host, const char *queue, lList *userset_list, lList* hgroup_list, dstring *rule_name)
This function searches in a resource quota set the relevant rule.
lListElem *rqs - rule set (RQS_Type) const char *user - user name const char *project - project name const char* pe - pe name const char *host - host name const char *queue - queue name lList *userset_list - master user set list (US_Type) lList* hgroup_list - master host group list (HG_Type); dstring *rule_name - out: name or matching rule
lListElem* - pointer to matching rule
MT-NOTE: rqs_get_matching_rule() is MT safe
rqs_get_rue_string() -- creates a rue name
bool rqs_get_rue_string(dstring *name, lListElem *rule, const char *user, const char *project, const char *host, const char *queue, const char* pe)
Creates the rue name used for debiting a specific job request. The name consists of the five touples devided by a /. The order is user, project, pe, queue, host. Filters that count for a sum of hosts are saved as a empty string because they don't need to be matched. For example the rule limit users `*` queues `all.q,my.q` to slots=10 may result in the rue name user1///all.q//
dstring *name - out: rue_name lListElem *rule - resource quota rule (RQR_Type) const char *user - user name const char *project - project name const char *host - host name const char *queue - queue name const char* pe - pe name
bool - always true
MT-NOTE: rqs_get_rue_string() is MT safe
rqs_is_matching_rule() -- matches a rule with the filter touples
bool rqs_is_matching_rule(lListElem *rule, const char *user, const char *project, const char *pe, const char *host, const char *queue, lList *master_userset_list, lList *master_hgroup_list)
The function verifies for every filter touple if the request matches the configured resource quota rule. If only one touple does not match the whole rule will not match
lListElem *rule - resource quota rule (RQR_Type) const char *user - user name const char *project - project name const char *pe - pe name const char *host - host name const char *queue - queue name lList *master_userset_list - master user set list (US_Type) lList *master_hgroup_list - master hostgroup list (HG_Type)
bool - true if the rule does match false if the rule does not match
MT-NOTE: rqs_is_matching_rule() is MT safe
rqs_list_locate() -- locate a specific resource quota set by name
lListElem* rqs_list_locate(lList *lp, const char *name)
This function searches the rule set list for a specific resource quota set. The search criteria is the name of the resource quota set.
lList *lp - rule set list to be searched in const char *name - rule set name of interest
lListElem* - if found the reference to the resource quota set, else NULL
MT-NOTE: rqs_list_locate() is MT safe
rqs_list_verify_attributes() -- verifies the attributes of a rqs list
bool rqs_list_verify_attributes(lList *rqs_list, lList **answer_list, bool in_master)
This function iterates over a rqs list and checks for every rqs the attributes
lList *rqs_list - List that should be verified lList **answer_list - answer list bool in_master - flag if called by qmaster or qconf
bool - true on success false on error
MT-NOTE: rqs_list_verify_attributes() is MT safe
rqs_match_host_scope() -- Match name with host scope
static bool rqs_match_host_scope(lList *scope, const char *name, lList *master_hgroup_list)
The function matches the passed name with the host scope. Name may not only be a hostname, but also host group name or a wildcard expression. For performance reasons qref_list_host_rejected() is used for matching, if we got no pattern and no hostgroup.
lList *scope - A scope list (ST_Type) const char *name - hostname/hostgroup name/wildcard expression lList *master_hgroup_list - the host group list (HGRP_Type)
bool - Returns true if 'name' matches
MT-NOTE: rqs_match_host_scope() is MT safe
rqs_match_user_host_scope() -- match user or host scope
static bool rqs_match_user_host_scope(lList *scope, int filter_type, const char *value, lList *master_userset_list, lList *master_hgroup_list)
This function verifies a user or host scope. The function allows for every scope entry and for the value a wildcard definition. Hostgroups and Usergroups are resolved and matched against the value
lList *scope - Scope to match (ST_Type) int filter_type - filter type (FILTER_USERS or FILTER_HOSTS) const char *value - value to match lList *master_userset_list - master userset list (US_Type) lList *master_hgroup_list - master hostgroup list (HG_Type)
static bool - true, if value was found in scope false, if value was not found in scope
MT-NOTE: rqs_match_user_host_scope() is MT safe
rqs_parse_filter_from_string() -- parse a RQRF Object from string
bool rqs_parse_filter_from_string(lListElem **filter, const char* buffer, lList **alp)
Converts a spooled RQRF Object to a CULL Element
lListElem **filter - resulting RQRF object const char* buffer - string to be converted lList **alp - answer_list
bool - true on success false on error
MT-NOTE: rqs_parse_filter_from_string() is MT safe
rqs_replace_request_verify() -- verify a rqs replace request
bool rqs_replace_request_verify(lList **answer_list, const lList *request)
Verify a rqs replace request (e.g. coming from a qconf -mrqs). We make sure, that no duplicate names appear in the request.
lList **answer_list - answer list to report errors const lList *request - the request to check
bool - true, if it is ok, false on error
MT-NOTE: rqs_replace_request_verify() is MT safe
rqs_rule_locate() -- locate a specific rule by name
lListElem* rqs_rule_locate(lList *lp, const char *name)
This function searches a rule list for a specific rule. The search criteria is the name or the index of the rule. The index is used if the name was successfully converted to an integer by the atoi() function. If atoi() was not able to convert the name the rule is searched by a sting compare.
lList *lp - list to be searched in const char *name - rule name of interest
lListElem* - reference to found rule NULL if rule was not found
MT-NOTE: rqs_rule_locate() is MT safe
rqs_set_defaults() -- set default values to given rqs
lListElem* rqs_set_defaults(lListElem* rqs)
This function sets the default values to a resource quota set. The default rule set is: { name = <must be already set> enabled = true limit to slots=0 }
lListElem* rqs - Already created object to be modified.
lListElem* - modified Object
MT-NOTE: rqs_set_defaults() is MT safe
rqs_verify_attributes() -- verify the attributes of a rqs Object
bool rqs_verify_attributes(lListElem *rqs, lList **answer_list, bool in_master)
This function verifies the attributes of a given rqs object. A valid rqs object has a name and at least one rule set. After verification it sets the double limit value. Addition checks are done if in_master is true.
lListElem *rqs - Object that should be verified lList **answer_list - answer list in case of errors bool in_master - flag if called by qmaster or by qconf
bool - true on success false on error
MT-NOTE: rqs_verify_attributes() is MT safe
rqs_verify_filter() -- verify a filter in rqs rule
static bool rqs_verify_filter(const lListElem *rule, lList **answer_list, int nm, const char *message)
Checks validity of a filter rule. The object names referenced in the scope and xscope parts of the rule are verified.
const lListElem *rule - the rule to check lList **answer_list - to pass back error messages int nm - nm of the filter to check, e.g. RQR_filter_users const char *message - error message to add to anwer_list in case of error
static bool - true if everything is OK, else false
MT-NOTE: rqs_verify_filter() is MT safe
rqs_xattr_pre_gdi() -- qconf xattr list preformat
bool rqs_xattr_pre_gdi(lList *this_list, lList **answer_list)
This function preformates the given list created by xattr. The xattr switch allows to address single rules by using the special rule set name "rule_set_name/rule_name". The rule name can be the name for named rules or the index of the rule. This function splits such a name into the single rule set name and set the correct rule name.
lList *this_list - list to be modified lList **answer_list - answer list
bool - true on success false on error
MT-NOTE: rqs_xattr_pre_gdi() is MT safe
sge_centry_referenced_in_rqs() -- search for a centry reference in a resource quota set
bool sge_centry_referenced_in_rqs(const lListElem *rqs, const lListElem *centry)
This function search a centry reference in a resource quota set
const lListElem *rqs - resource quota set const lListElem *centry - complex entry
bool - true if found false if not found
MT-NOTE: sge_centry_referenced_in_rqs() is MT safe
serf_get_active() -- Retrieve whether SERF is active or not
bool serf_get_active(void);
Returns whether SERF is active or not
bool - true = on false = off MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read)
Actually belongs to sge_serf.c but this would cause a link dependency libsgeobj -> libschedd !!
calc_pos() --
static void calc_pos(void)
MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)
clear_pos() -- resets the position information
static void clear_pos(void)
is needed, when a new configuration is set MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)
get_algorithm() -- ???
const char* get_algorithm(void)
???
void - ???
const char* - MT-NOTE: is not MT-safe, the caller needs the LOCK_SCHED_CONF(read)
get_default_duration_str() -- Return default_duration string
const char* get_default_duration_str(void)
Returns default duration string from scheduler configuration.
const char* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
get_halflife_decay_list_str() -- ???
const char* get_halflife_decay_list_str(void)
???
void - ???
const char* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
get_job_load_adjustments() -- ???
const lList* get_job_load_adjustments(void)
???
void - ???
const lList* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
get_load_adjustment_decay_time_str() -- ???
const char * get_load_adjustment_decay_time_str()
???
const char * - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
get_load_formula() -- ???
const char* get_load_formula(void)
???
void - ???
const char* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
get_schedule_interval_str() -- ???
const char* get_schedule_interval_str(void)
???
void - ???
const char* - MT-NOTE: is not MT-safe, the caller needs to hold the LOCK_SCHED_CONF(read)
get_usage_weight_list() -- ???
const lList* get_usage_weight_list(void)
???
void - ???
const lList* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
is_config_set() -- checks, if a configuration exists
bool is_config_set(void)
bool - true, if a configuration exists MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
reprioritize_interval_str() -- ???
const char* reprioritize_interval_str(void)
???
void - ???
const char* - MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(read)
sc_state_init() -- resets the thread local structure
static void sc_state_init(sc_state_t* state)
resets the thread local structure, which collects information during a scheduling run.
sc_state_t* state - the thread local structure
MT-NOTE: sc_state_init() is MT safe
schedd_conf_set_config() -- overwrites the existing configuration
bool schedd_conf_set_config(lList **config, lList **answer_list)
- validates the new configuration - precalculates some values and caches them - stores the position of each attribute in the structure - and sets the new configuration, if the validation worked If the new configuration is a NULL pointer, the current configuration if deleted.
lList **config - new configuration (SC_Type) lList **answer_list - error messages
bool - true, if it worked MT-NOTE: is MT-safe, uses LOCK_SCHED_CONF(write) SG TODO: use a internal eval config function and not the external one.
sconf_best_pe_alg() -- returns the alg to use for pe-range jobs
schedd_pe_algorithm sconf_best_pe_alg()
It checks for the alg. to use. If the user did not set a custom one, it will evaluate the weights and return the most sucessful one.
schedd_pe_algorithm - pe-range alg.
MT-NOTE: sconf_best_pe_alg() is MT safe
sconf_create_default() -- returns a default configuration
lListElem* sconf_create_default()
Creates a default configuration, but does not change the current active configuration. A set config has to be used to make the current configuration the active one.
lListElem* - default configuration (SC_Type) MT-NOTE: is MT-safe, does not use global variables
sconf_disable_schedd_job_info() -- ???
void sconf_disable_schedd_job_info()
???
void - MT-NOTE: is thread save, uses local storage
sconf_enable_schedd_job_info() -- ???
void sconf_enable_schedd_job_info()
???
void - MT-NOTE: is thread save, uses local storage
sconf_eval_set_job_category_filtering() -- enable jc filtering or not.
static bool sconf_eval_set_job_category_filtering(lList *param_list, lList **answer_list, const char* param)
A parsing function for the prama settings in the scheduler configuration. It is looking for JC_FILTER to be set to true, or false and updates the settings accordingly.
lList *param_list - the param list lList **answer_list - the answer list, in case of an error const char* param - the param string
static bool - true, if everything went fine MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)
sconf_eval_set_monitoring() -- Control SERF on/off via MONITOR param
static bool sconf_eval_set_monitoring(lList *param_list, lList **answer_list, const char* param)
The MONITOR param allows schedule entry recording facility module be switched on/off.
lList *param_list - ??? lList **answer_list - ??? const char* param - ???
static bool - parsing error
MT-NOTE: is not MT safe, the calling function needs to lock LOCK_SCHED_CONF(write)
sconf_eval_set_pe_range_alg() -- parses the sched. param
static bool sconf_eval_set_pe_range_alg(lList *param_list, lList **answer_list, const char* param)
static bool - true, if successful
MT-NOTE: sconf_eval_set_pe_range_alg() is not MT safe, caller needs LOCK_SCHED_CONF(write)
sconf_eval_set_profiling() -- ???
static bool sconf_eval_set_profiling(lList *param_list, lList **answer_list, const char* param)
???
lList *param_list - ??? lList **answer_list - ??? const char* param - ???
static bool - MT-NOTE: not thread safe, needs LOCK_SCHED_CONF(write)
sconf_get_compensation_factor() -- ???
double sconf_get_compensation_factor(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_config() -- returns a config object.
const lListElem* sconf_get_config(void)
const lListElem* - a copy of the current config object
DO NOT USE this method. ONLY when there is NO OTHER way. All config settings can be accessed via access function. MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_config_list() -- returns a pointer to the list, which contains the configuration
lList* sconf_get_config_list(void)
lList* - a copy of the config list MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
DO NOT USE this method. ONLY when there is NO OTHER way. All config settings can be accessed via access function. The config can be set via sconf_set_config(...)
If you modify the configuration by directly accessing, you have to call sconf_validate_config_ afterwards to ensure, that the caches reflect your changes.
sconf_get_flush_finish_sec() -- ???
int sconf_get_flush_finish_sec(void)
???
void - ???
int - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_flush_submit_sec() -- ???
int sconf_get_flush_submit_sec(void)
???
void - ???
int - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_halflife_decay_list() -- ???
const lList* sconf_get_halflife_decay_list(void)
???
void - ???
const lList* - MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)
sconf_get_halftime() -- ???
u_long32 sconf_get_halftime(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_job_load_adjustments() -- ???
const lList* sconf_get_job_load_adjustments(void)
???
void - ???
const lList* - returns a copy, needs to be freed MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_load_adjustment_decay_time() -- ???
u_long32 sconf_get_load_adjustment_decay_time()
???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_load_formula() -- ???
const char* sconf_get_load_formula(void)
???
void - ???
const char* - this is a copy of the load formula, the caller has to free it MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_max_functional_jobs_to_schedule() -- ???
u_long32 sconf_get_max_functional_jobs_to_schedule(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_max_pending_tasks_per_job() -- ???
u_long32 sconf_get_max_pending_tasks_per_job(void)
???
void - ???
u_long32 - MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)
sconf_get_max_reservations() -- Max reservation tuning parameter
int sconf_get_max_reservations(void)
Tuning parameter. Returns maximum number of reservations that should be done by scheduler. If 0 is returned this no single job shall get a reservation and assignments are to be made for 'now' only.
int - Max. number of reservations MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_maxujobs() -- ???
u_long32 sconf_get_maxujobs(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_queue_sort_method() -- ???
u_long32 sconf_get_queue_sort_method(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_report_pjob_tickets() -- ???
bool sconf_get_report_pjob_tickets(void)
???
void - ???
bool - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_reprioritize_interval() -- ???
u_long32 sconf_get_reprioritize_interval(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_schedd_job_info() -- ???
u_long32 sconf_get_schedd_job_info(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read) and local storage
sconf_get_schedd_job_info_range() -- ???
const lList* sconf_get_schedd_job_info_range(void)
???
void - ???
const lList* - returns a copy, needs to be freed MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_schedule_interval() -- ???
u_long32 sconf_get_schedule_interval(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_share_functional_shares() -- ???
bool sconf_get_share_functional_shares(void)
???
void - ???
bool -
sconf_get_share_override_tickets() -- ???
bool sconf_get_share_override_tickets(void)
???
void - ???
bool - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_usage_weight_list() -- ???
const lList* sconf_get_usage_weight_list(void)
???
void - ???
lList* - returns a copy, needs to be freed MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_deadline() -- ???
double sconf_get_weight_deadline(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_department() -- ???
double sconf_get_weight_department(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_job() -- ???
double sconf_get_weight_job(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_priority() -- ???
double sconf_get_weight_priority(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_project() -- ???
double sconf_get_weight_project(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_ticket() -- ???
double sconf_get_weight_ticket(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_tickets_functional() -- ???
u_long32 sconf_get_weight_tickets_functional(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_tickets_override() -- ???
void sconf_get_weight_tickets_override(u_long32 active)
???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_tickets_share() -- ???
u_long32 sconf_get_weight_tickets_share(void)
???
void - ???
u_long32 - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_urgency() -- ???
double sconf_get_weight_urgency(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_user() -- ???
double sconf_get_weight_user(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_get_weight_waiting_time() -- ???
double sconf_get_weight_waiting_time(void)
???
void - ???
double - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_is() -- checks, if a configuration exists
bool sconf_is(void)
bool - true, if a configuration exists MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)
sconf_is_centry_referenced() -- ???
bool sconf_is_centry_referenced(const lListElem *this_elem, const lListElem *centry)
???
const lListElem *centry - ???
bool - MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)
sconf_is_id_in_schedd_job_info_range() -- ???
const lList* sconf_is_id_in_schedd_job_info_range(void)
???
void - ???
bool - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(read)
sconf_is_job_category_filtering() -- true, if the job_category_filtering is on
bool sconf_is_job_category_filtering(void)
returns the status of the job category filtering
bool - true, the job category filtering is on
MT-NOTE: is MT save, uses LOCK_SCHED_CONF(read)
sconf_is_new_config() --
bool sconf_is_new_config()
bool - MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read)
sconf_is_valid_load_formula() -- ???
bool sconf_is_valid_load_formula_(lList **answer_list, lList *centry_list)
lList **answer_list - ??? lList *centry_list - ???
bool - MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read)
sconf_print_config() -- prints the current configuration to the INFO stream
void sconf_print_config() MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read/write)
sconf_reset_new_config() --
bool sconf_reset_new_config()
MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(write)
sconf_set_weight_tickets_override() -- ???
void sconf_set_weight_tickets_override(u_long32 active)
???
u_long32 active - ???
void - MT-NOTE: is thread save, uses LOCK_SCHED_CONF(write)
sconf_update_pe_alg() -- updates the weights for the different algorithms
void sconf_update_pe_alg(int runs, int current, int max)
updates the weights for the different algorithms. Since the alg. with the bigest number is taken, the numbers are negative. It uses the running averages to ensure, that the numbers are not getting to big and that the scheduler can reakt to changes.
int runs - number of runs it would have taken with the bin search alg. int current - number of runs it took int max - max runs
MT-NOTE: sconf_update_pe_alg() is MT safe
sconf_validate_config() -- validate a given configuration
bool sconf_validate_config(lList **answer_list, lList *config)
lList **answer_list - error messages lList *config - config to validate
bool - true, if the config is valid MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(write) SG TODO: needs cleanup!!
sconf_validate_config_() -- validates the current config
bool sconf_validate_config_(lList **answer_list)
validates the current config and updates the caches.
lList **answer_list - error messages
bool - false for invalid scheduler configuration MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read/write)
sge_search_unspecified_node() -- search for a node which is not specified
static lListElem *sge_search_unspecified_node(lListElem *ep)
The function walks through the sharetree looking for the first node which has no name. A node with no name means that it was created as a result of a dangling or circular child reference.
ep - root of the tree
the first node which has no name or NULL if all nodes have names
ulong_parse_date_time_from_string() -- Parse string into date/time ulong
bool ulong_parse_date_time_from_string(u_long32 *this_ulong, lList **answer_list, const char *string)
???
u_long32 *this_ulong - ??? lList **answer_list - ??? const char *string - ???
bool -
MT-NOTE: ulong_parse_date_time_from_string() is MT safe
usage_list_sum() -- sum up usage of two lists
void usage_list_sum(lList *usage_list, const lList *add_usage_list)
Add the usage reported in add_usage_list to usage_list. Summing up of usage will only be done for certain attributes: - cpu - io - iow - mem - vmem - maxvmem - all ru_* attributes (see man getrusage.2)
lList *usage_list - the usage list to contain all usage const lList *add_usage_list - usage to add to usage_list
MT-NOTE: usage_list_sum() is MT safe
userset_is_ar_user() -- may user request advance reservations
bool userset_is_ar_user(lList *lp, const char *username)
???
lList *lp - US_Type const char *username - user name
bool - true if user has permission false if user has no permission
MT-NOTE: userset_is_ar_user() is MT safe
userset_list_validate_access() -- all user sets names in list must exist
int userset_list_validate_access(lList *acl_list, int nm, lList **alpp)
All the user set names in the acl_list must be defined in the qmaster user set lists. The user set is diferentiated from user names by @ sign
lList *acl_list - the acl list to check int nm - field name lList **alpp - answer list pointer
int - STATUS_OK if no error, STATUS_EUNKNOWN otherwise
MT-NOTE: userset_list_validate_access() is not MT safe
verify_host_name() -- verify a hostname
bool verify_host_name(lList **answer_list, const char *host_name)
Verifies if a hostname is correct (regarding maximum length etc.).
lList **answer_list - answer list to pass back error messages const char *host_name - the hostname to verify
bool - true on success, false on error with error message in answer_list
MT-NOTE: verify_host_name() is MT safe
verify_str_key() -- Generic function for verifying object names
an_status_t verify_str_key(lList **alpp, const char *str, size_t str_length, const char *name, int table)
Verifies object names. The following verification tables are used QSUB_TABLE job account strings (see qsub(1) -A for characters not allowed) QSUB_TABLE job name (see qsub(1) -N for characters not allowed) KEY_TABLE parallel environment names (see sge_pe(5)) KEY_TABLE calendar names (see calendar_conf(5)) KEY_TABLE cluster queue names (see queue_conf(5)) KEY_TABLE project names (see project(5)) KEY_TABLE userset names (see access_list(5)) KEY_TABLE department names (see access_list(5)) KEY_TABLE checkpoint interface name (see checkpoint(5)) KEY_TABLE user name (see user(5)) KEY_TABLE hostgroup names (see hostgroup(5)) WC_TABLE wc_pe_names (see sge_types(5)) KEY_TABLE event client name (internal purposes only) KEY_TABLE JAPI session key (internal purposes only) Note, there is test_sge_utility
lList **alpp - answer list const char *str - string to be verified size_t str_length - length of the string to be verified const char *name - verbal description of the object unsigned table - verification table to be used
an_status_t - STATUS_OK upon success
MT-NOTE: verify_str_key() is MT safe
var_list_parse_from_string() -- parse vars from string list
int var_list_parse_from_string(lList **lpp, const char *variable_str, int check_environment)
Parse a list of variables ("lpp") from a comma separated string list ("variable_str"). The boolean "check_environment" defined wether the current value of a variable is taken from the environment of the calling process.
lList **lpp - VA_Type list const char *variable_str - source string int check_environment - boolean
int - error state 0 - OK >0 - Error
MT-NOTE: var_list_parse_from_string() is MT safe
var_list_verify() -- verify contents of a variable list
bool var_list_verify(const lList *lp, lList **answer_list)
Verifies the contents of a variable list. Variable names may not be NULL or empty strings.
const lList *lp - the list to verify lList **answer_list - answer list to pass back error messages
bool - true on success, false in case of errors, error message in answer_list
MT-NOTE: var_list_verify() is MT safe
QETI_Type - Queue End Time Iterator building blocks
SGE_DOUBLE(QETI_total) Keeps information about total amount of the resource instance. It would be nice if that in information were also contained in the RUE_Type element referenced via the resource utilization entry QETI_resource_instance. Unfortunately this is not the case so we keep it here separately. SGE_REF(QETI_resource_instance) Reference to a resource utilization entry (RUE_Type element) that keeps all information about resource utilization of a particular resource instance. SGE_REF(QETI_queue_end_next) Reference to the next entry in the resource utilization diagram (RDE_Type elemnt). All next pointers related to all resource instances represent the state of a sge_qeti_t iterator.
Qeti != Yeti
RDE_Type - Resource Diagram Entry
SGE_ULONG(RDE_time) Time of resource diagram entry SGE_DOUBLE(RDE_amount) Amount since that time
A list of resource diaram entries represents a diagram showing resource progression over time. E.g. the following resource diagram N ^ | +-------+ | +-----+ | J3 | | | +---+-------+--+ | | J1 | J2 | +---+-----+--------------+-----> t 0 4 10 14 22 25 is respresented by the the following table t | N ---+--- 0 | 0 4 | 3 10 | 2 14 | 4 22 | 2 25 | 2
RUE_Type - Resource Utilization Entry
SGE_STRING(RUE_name) Name of the resource the entry is about SGE_DOUBLE(RUE_utilized_now) Currently used amount SGE_LIST(RUE_utilized) A resource diagram indicating future utilization SGE_DOUBLE(RUE_utilized_now_nonexclusive) Currently used amount of implicitly used exclusive resources SGE_LIST(RUE_utilized_nonexclusive) A resource diagram indicating future utilization of implicitly used exclusive resources
A resource utilization entry contains all information about utilization of a particular resouce at any time. The resources managed with resource utilization entries are parallel environment slot resource, global resources, host resources and resources. For a not looking ahead information about the amount utilized now (RUE_utilized_now) is sufficient: A(0) = C - U(0) For resource reservation schedulers also information about future utilization over time is required (RUE_utilized): A(t) = C - U(t) For advance reservation additional information is needed for each single reservation to reflect reserved resource amount over time (RUE_reservations). Based on this the resource amount available for a job can be determined depending on the advance reservation: A1(t) = C - U(t) - ( R2(t) + ... + RN(t) ) A2(t) = C - U(t) - ( R1(t) + ... + RN(t) ) : : : AN(t) = C - U(t) - ( R1(t) + R2(t) + ... ) and for jobs that do not use an advance reservation the smallest resource amount is available: A(t) = C - U(t) - ( R1(t) + R2(t) + ... + RN(t) )
AN_Type - CULL answer element
SGE_ULONG(AN_status) status of an answer (e.g STATUS_NOCOMMD) SGE_STRING(AN_text) printable error text SGE_ULONG(AN_quality) answer quality (e.g ANSWER_QUALITY_ERROR)
CULL element holding information for an answer of a request.
AnswerList - Object used to return errors/warning/info
Answer elements and lists are used to exchange information about the level of success of an operation between caller and callee. Especially in GDI answers, elements and lists are used to transfer error information from server components to clients. Example: void caller(void) { lList *answer_list = NULL; callee(&answer_list); if (answer_list_has_error(&answer_list)) { try_to_handle_error(); lFreeList(&answer_list); } } void callee(lList **answer_list) { char *s = malloc(256); if (s == NULL) { answer_list_add(answer_list, "no memory", STATUS_ERROR, ANSWER_QUALITY_ERROR); return; } }
MT-NOTE: the answer list module is MT safe
answer_exit_if_not_recoverable() -- Exit on certain errors
void answer_exit_if_not_recoverable(const lListElem *answer)
This function checks if "answer" is an unrecoverable error. (answer_is_recoverable() is used to check this.) The error text will then be printed to stderr and the calling process will be terminated with exit code 1.
const lListElem *answer - AN_Type element
This function may never return.
This function may never return.
answer_get_quality_text() -- Get quality text
const char* answer_get_quality_text(const lListElem *answer)
Returns a string representation for the quality of the "answer"
const lListElem *answer - AN_Type list
const char* - String
MT-NOTE: answer_get_quality_text() is MT safe
answer_get_status() -- Return the error status.
u_long32 answer_get_status(const lListElem *answer)
Return the error status of "answer".
const lListElem *answer - AN_Type element
u_long32 - error status
MT-NOTE: answer_get_status() is MT safe
answer_has_quality() -- Check for certain answer quality
bool answer_has_quality(const lListElem *answer, answer_quality_t quality)
Return true (1) if "answer" has the given "quality"
const lListElem *answer - AN_Type element answer_quality_t quality - Quality id
bool - true or false
MT-NOTE: answer_has_quality() is MT safe
answer_is_recoverable() -- Check for recoverable error
int answer_is_recoverable(const lListElem *answer)
This function returns true (1) if "answer" is an error which the calling function application may recover from. The following errors are handled as nonrecoverable: STATUS_NOQMASTER STATUS_NOCOMMD STATUS_ENOKEY
const lListElem *answer - AN_Type element
int - true or false
MT-NOTE: answer_is_recoverable() is MT safe
answer_list_add() -- Add an answer to an answer list
int answer_list_add(lList **answer_list, const char *text, u_long32 status, answer_quality_t quality)
This function creates a new answer element (using "quality", "status" and "text"). The new element will be appended to "answer_list" If "answer_list" is NULL, no action is performed. If the list pointed to by "answer_list" is NULL, a new list will be created.
lList **answer_list - AN_Type list const char *text - answer text u_long32 status - answer status answer_quality_t quality - answer quality
int - error state true - OK false - error occured
MT-NOTE: answer_list_add() is MT safe
answer_list_add_sprintf() -- Format add an answer to an answer list
bool answer_list_add_sprintf(lList **answer_list, u_long32 status, answer_quality_t quality, const char *fmt, ...)
This function creates a new answer element having the properties "status", "quality", and a message text created from fmt and the following variable argument list. The new element will be appended to "answer_list". If "answer_list" is NULL, no action is performed. If the list pointed to by "answer_list" is NULL, a new list will be created.
lList **answer_list - AN_Type list u_long32 status - answer status answer_quality_t quality - answer quality const char *fmt - format string to create message (printf) ... - arguments used for formatting message
bool - true on success, else false
MT-NOTE: answer_list_add_sprintf() is MT safe
answer_list_append_list() -- Append two lists
void answer_list_append_list(lList **answer_list, lList **new_list)
Append "new_list" after "answer_list". *new_list will be NULL afterwards
lList **answer_list - AN_Type list lList **new_list - AN_Type list
void - None
answer_list_handle_request_answer_list() -- handle res. of request
int answer_list_handle_request_answer_list(lList **answer_list, FILE *stream)
Processes the answer list that results from a GDI request (sge_gdi or sge_gdi_multi). Outputs any errors and warnings and returns the first error or warning status code. The answer list is freed.
lList **answer_list - answer list to process FILE *stream - output stream
int - first error or warning status code or STATUS_OK
MT-NOTE: answer_list_handle_request_answer_list() is MT safe
answer_list_has_error() -- Is an "error " in the list
bool answer_list_has_error(lList **answer_list)
The function returns true (1) if the "answer_list" containes at least one error answer element
lList **answer_list - AN_Type list
bool - true or false
MT-NOTE: answer_list_has_error() is MT safe
answer_list_has_quality() -- Contains list
int answer_list_has_quality(lList **answer_list, answer_quality_t quality)
The function returns true (1) if the "answer_list" contains at least one answer element with the given "quality".
lList **answer_list - AN_Type list answer_quality_t quality - quality value
bool - true or false
MT-NOTE: answer_list_has_quality() is MT safe
answer_list_log() -- output and free answer_list
bool answer_list_log(lList **answer_list, bool is_free_list, bool show_info)
Prints all messages contained in "answer_list". The ERROR, WARNING and INFO macros will be used for output. If the "answer_list" contains at least one error then this function will return true. If there is no error contained in 'answer_list' then this function will return with a value of false. "*answer_list" will only be freed and set to NULL, if is_free_list is true.
lList **answer_list - AN_Type list bool is_free_list - if true, frees the answer list bool show_info - log also info messages
MT-NOTE: answer_list_print_err_warn() is MT safe
answer_list_on_error_print_or_exit() -- Print and/or exit
void answer_list_on_error_print_or_exit(lList **answer_list, FILE *stream)
The error texts of all answer elements within "answer_list" are printed to "stream". If an unrecoverable error is detected the calling process will be terminated.
lList **answer_list - AN_Type list FILE *stream - output stream
MT-NOTE: answer_list_on_error_print_or_exit() is MT safe
answer_list_output() -- output and free answer_list
bool answer_list_output(lList **answer_list)
Prints all messages contained in "answer_list". The ERROR, WARNING and INFO macros will be used for output. If the "answer_list" contains at least one error then this function will return true. If there is no error contained in 'answer_list' then this function will return with a value of false. "*answer_list" will be freed and set to NULL.
lList **answer_list - AN_Type list
MT-NOTE: answer_list_output() is MT safe
answer_list_print_err_warn() -- Print and/or exit
int answer_list_print_err_warn(lList **answer_list, const char *err_prefix, const char *warn_prefix)
Prints all messages contained in "answer_list". All error messages will be printed to stderr with an an initial "err_prefix". All warning and info messages will be printed to stdout with the prefix "warn_prefix". If the "answer_list" contains at least one error then this function will return with a positive return value. This value is the errror status of the first error message. If there is no error contained in 'answer_list' than this function will return with a value of 0. "*answer_list" will be freed.
lList **answer_list - AN_Type list const char *err_prefix - e.g. "qsub: " const char *warn_prefix - e.g. MSG_WARNING
MT-NOTE: answer_list_print_err_warn() is MT safe
answer_list_replace() -- replace an answer list
void answer_list_replace(lList **answer_list, lList **new_list)
free *answer_list and replace it by *new_list.
lList **answer_list - AN_Type lList **new_list - AN_Type
void - none
MT-NOTE: answer_list_replace() is MT safe
answer_list_to_dstring() -- Copy answer to dstring without newline
void answer_list_to_dstring(const lList *alp, dstring *diag)
Copy answer list text into dstring with each element separated by a newline character.
const lList *alp - AN_Type list dstring *diag - destination dstring
void -
MT-NOTE: answer_list_to_dstring() is MT safe
answer_log() -- output answer
bool answer_log(lListElem *answer)
Prints the message contained in "answer". The CRITICAL, ERROR, WARNING and INFO macros will be used for output.
lListElem *answer - AN_Type element
bool - true if answer is an error, false otherwise and if answer == NULL
MT-NOTE: answer_log() is MT safe
answer_print_text() -- Prints error text
void answer_print_text(const lListElem *answer, FILE *stream const char *prefix, const char *suffix)
Prints "prefix", the error text of "answer" and "suffix" to "stream".
const lListElem *answer - AN_Type element FILE *stream - Output stream const char *prefix - Introductional message const char *prefix - Final message
MT-NOTE: answer_print_text() is MT safe
answer_to_dstring() -- Copy answer to dstring without newline
void answer_to_dstring(const lListElem *answer, dstring *diag)
Copy answer text into dstring without newline character.
const lListElem *answer - AN_Type element
dstring *diag - destination dstring
void -
MT-NOTE: answer_to_dstring() is MT safe
attr_create() -- Returns a new attribute element
static lListElem * attr_create(lList **answer_list, const char *href, void *value, const lDescr *descriptor, int href_nm, int value_nm)
If an error occures "answer_list" will be filled with an error message. "href" is the hostname or hgroupname of the new element. "value" is a pointer to the new value for that attribute. "descriptor" is the CULL descriptor wich will be used to create the new element. "href_nm" is the CULL name of the field where the "href" name will be stored and "value_nm" defines the value of the field which will be filled with the "value".
lList **answer_list - AN_Type list const char *href - host oder hgroupname void *value - pointer to the attributes value const lDescr *descriptor - CULL descriptor int href_nm - CULL field name host or hgroupname int value_nm - CULL field name for the value
lListElem * - new CULL element or NULL in case on an error
There are typesafe versions of this function. Have a look into the headerfile and look for TEMPLATE_ATTR_PROTO. These macro creates the typesafe versions. E.g. str_attr_create() ulng_attr_create() bool_attr_create() ... strlist_attr_create() MT-NOTE: attr_create() is MT safe
attr_list_add() -- Add a new attribute entry to a list
static bool attr_list_add(lList **this_list, lList **answer_list, lListElem **attr, int flags, lList **ambiguous_href_list, const lDescr *descriptor, int href_nm, int value_nm)
"this_list" and "attr" must have the same "descriptor". "href_nm" defines one cull field within "attr" which containes a hostname or hgroup-name. "value_nm" containes the value of that concerned attribute. "answer_list" will be filled in case of an error. "flags" can be used to influence the behaviour of this function in case of duplicates or other ambiguities within the resulting list. "ambiguous_href_list" might be used as output parameter for this function. Find more detailes in the description of the flags parameter below.
lList **this_list - attribute list lList **answer_list - AN_Type list lListElem **attr - attribute pointer int flags - behaviour bitmask HOSTATTR_OVERWRITE - If there is already an element in "this_list" which has the same hostname or hgroup, then the value of this element will be overwritten if this flag is set. If this flag is not given and the function should add a duplicate, then this will be counted as function error. HOSTATTR_ALLOW_AMBIGUITY - If the resulting "this_list" would result in an ambigous configuration for a ceratin host then this is allowed if the flag is given. Otherwise it will be rejected. In that case "ambiguous_href_list" will be filled with the conflicting hostnames. lList **ambiguous_href_list - HR_Type list const lDescr *descriptor - CULL descriptor int href_nm - CULL field name int value_nm - CULL value name
static bool - error state true - success false - error
MT-NOTE: attr_list_add() is not MT safe
attr_list_add_set_del() -- add/replace/delete an attribute entry
static bool attr_list_add_set_del(lList **this_list, lList **answer_list, const char *hostname, void *value, bool remove, const lDescr *descriptor, int href_nm, int value_nm)
This function can be used to remove an entry from "this_list" or it can add a new entry or replace an existing one. Find a more detailed description in sgeobj/attr/attr_create()
lList **this_list - cull list of type "descriptor" lList **answer_list - AN_Type list const char *hostname - hostname or hgroup name void *value - pointer to value bool remove - true -> remove the element const lDescr *descriptor - CULL descriptor int href_nm - CULL field name int value_nm - CULL value name
static bool - error status true - success false - error
MT-NOTE: attr_list_add_set_del() is MT safe
BN_Type -- CULL binding element
SGE_ULONG(RN_min) minimum or start value of an id range (e.g. 1) SGE_ULONG(RN_max) maximum or end value of an id range (e.g. 9) SGE_ULONG(RN_step) stepsize (e.g. 2)
CULL element holding values which define a id range (e.g. 1-9:2 => 1, 3, 5, 7, 9). Lists of this CULL element are hold within a CULL job element (JB_Type) to hold job array task ids. Several functions may be used to access/modify/delete range elements and range lists. You may find them in the 'SEE ALSO' section. It is highly advised to use these access functions because they assure and require a defined structure of elements and lists.
centry_create() -- Create a preinitialized centry element
lListElem * centry_create(lList **answer_list, const char *name)
Create a preinitialized centry element with the given "name".
lList **answer_list - AN_Type const char *name - full name
lListElem * - CE_Type element
centry_elem_validate() -- validates a element and checks for duplicates
int centry_elem_validate(lListElem *centry, lList *centry_list, lList *answer_list)
Checks whether the configuration within the new centry is okay or not. A centry is valid when it satisfies the following rules: name : has to be unique Short cu : has to be unique Type : every type from the list (string, host, cstring, int, double, boolean, memory, time) Consumable : can only be defined for: int, double, memory, time Relational operator: - for consumables: only <= - for non consumables: - string, host, cstring: only ==, != - boolean: only == - int, double, memory, time: ==, !=, <=, <, =>, > Requestable : for all attribute default value : only for consumables The type for built-in attributes is not allowed to be changed! When no centry list is passed in, the check for unique name and short cuts is skipped.
lListElem *centry - the centry list, which should be validated lList *centry_list - if not null, the function checks, if the centry element is already in the list lList *answer_list - contains the error messages
bool false - error (the anwer_list contains the error message) true - okay
centry_fill_and_check() -- fill and check the attribute
int centry_fill_and_check(lListElem *cep, bool allow_empty_boolean, bool allow_neg_consumable)
fill and check the attribute
lListElem *cep - CE_Type, this object will be checked lList** answer_list - answer list int allow_empty_boolean - boolean true - NULL values of boolean attributes will be replaced with "true" false - NULL values will be handled as error int allow_neg_consumable - boolean true - negative values for consumable resources are allowed. false - function will return with -1 if it finds consumable resources with a negative value
0 on success -1 on error an error message will be written into SGE_EVENT
centry_is_referenced() -- Is centry element referenced?
bool centry_is_referenced(const lListElem *centry, lList **answer_list, const lList *master_cqueue_list, const lList *master_exechost_list, const lList *master_sconf_list)
Is the centry element referenced in a sublist of "master_queue_list", "master_exechost_list" or "master_sconf_list".
const lListElem *centry - CE_Type lList **answer_list - AN_Type const lList *master_cqueue_list - CQ_Type const lList *master_exechost_list - EH_Type
bool - true or false
centry_list_fill_request() -- fills and checks list of complex entries
int centry_list_fill_request(lList *centry_list, lList *master_centry_list, bool allow_non_requestable, bool allow_empty_boolean, bool allow_neg_consumable)
This function fills a given list of complex entries with missing attributes which can be found in the complex. It checks also wether the given in the centry_list-List are valid.
lList *this_list - resources as complex list CE_Type lList **answer_list - answer list lList *master_centry_list - the global complex list bool allow_non_requestable - needed for qstat -l or qmon customize dialog int allow_empty_boolean - boolean true - NULL values of boolean attributes will be replaced with "true" false - NULL values will be handled as error int allow_neg_consumable - boolean true - negative values for consumable resources are allowed. false - function will return with -1 if it finds consumable resources with a negative value
int - error 0 on success -1 on error an error message will be written into SGE_EVENT
centry_list_get_master_list() -- return master list
lList ** centry_list_get_master_list(void)
Return master list.
void - NONE
lList ** - CE_Type master list
centry_list_init_double() -- Initialize double from string
bool centry_list_init_double(lList *this_list)
Initialize all double values contained in "this_list"
lList *this_list - CE_Type list
bool - true
centry_list_locate() -- Find Centry element
lListElem *centry_list_locate(const lList *this_list, const char *name)
Find CEntry element with "name" in "this_list".
const lList *this_list - CE_Type list const char *name - name of an CE_Type entry
lListElem * - CE_Type element
centry_list_sort() -- Sort a CE_Type list
bool centry_list_sort(lList *this_list)
Sort a CE_Type list
lList *this_list - CE_Type list
bool - error state true - success false - error
centry_print_resource_to_dstring() -- Print to dstring
bool centry_print_resource_to_dstring(const lListElem *this_elem, dstring *string)
Print resource string (memory, time) to dstring.
const lListElem *this_elem - CE_Type dstring *string - dynamic string
bool - error state true - success false - error
MT-NOTE: centry_print_resource_to_dstring() is MT safe
centry_urgency_contribution() -- Compute urgency for a particular resource
double centry_urgency_contribution(int slots, const char *name, double value, const lListElem *centry)
The urgency contribution for a particular resource 'name' is determined based on the 'slot' amount and using 'value' as per slot request. The urgency value in the 'centry' element is used.
int slots - The slot amount assumed. const char *name - The resource name. double value - The per slot request. const lListElem *centry - The centry element (CE_Type)
double - The resulting urgency contribution
MT-NOTES: centry_urgency_contribution() is MT safe
ckpt_is_referenced() -- Is a given CKPT referenced in other objects?
bool ckpt_is_referenced(const lListElem *ckpt, lList **answer_list, const lList *master_job_list, const lList *master_cqueue_list)
This function returns true if the given "ckpt" is referenced in at least one of the objects contained in "master_job_list" or "master_cqueue_list". If this is the case than a corresponding message will be added to the "answer_list".
const lListElem *ckpt - CK_Type object lList **answer_list - AN_Type list const lList *master_job_list - JB_Type list const lList *master_cqueue_list - CQ_Type list
bool - true or false
ckpt_list_do_all_exist() -- Do all ckpt's exist?
bool ckpt_list_do_all_exist(const lList *ckpt_list, lList **answer_list, const lList *ckpt_ref_list)
Test if the checkpointing objects whose name is contained in "ckpt_ref_list" is contained in "ckpt_list".
const lList *ckpt_list - CK_Type list lList **answer_list - AN_Type list const lList *ckpt_ref_list - ST_Type list containing ckpt names
bool - true if all ckpt objects exist
ckpt_list_get_master_list() -- Return pointer to master ckpt list
lList ** ckpt_list_get_master_list(void)
Return pointer to master ckpt list
lList ** - master ckpt list
ckpt_list_locate -- find a ckpt object in a list
lListElem *ckpt_list_locate(lList *ckpt_list, const char *ckpt_name)
This function will return a ckpt object by name if it exists.
lList *ckpt_list - CK_Type object const char *ckpt_name - name of the ckpt object.
NULL - ckpt object with name "ckpt_name" does not exist !NULL - pointer to the cull element (CK_Type)
ckpt_validate -- validate all ckpt interface parameters
int ckpt_validate(lListElem *ep, lList **alpp);
This function will test all ckpt interface parameters. If all are valid then it will return successfull.
ep - element which sould be verified. answer - answer list where the function stored error messages
[answer] - error messages will be added to this list STATUS_OK - success STATUS_EUNKNOWN or STATUS_EEXIST - error
MT-NOTE: ckpt_validate() is not MT safe
sge_parse_checkpoint_attr() -- make "when" bitmask from string
int sge_parse_checkpoint_attr(const char *attr_str)
Parse checkpoint "when" string and return a bitmask.
const char *attr_str - when string
int - bitmask of checkpoint specifers 0 if attr_str == NULL or nothing set or value may be a time value
MT-NOTE: sge_parse_checkpoint_attr() is MT safe
policy_hierarchy_char2enum() -- Return value for a policy char
policy_type_t policy_hierarchy_char2enum(char character)
This function returns a enum value for the first letter of a policy name.
char character - "O", "F" or "S"
policy_type_t - enum value MT-NOTE: not thread safe, needs LOCK_SCHED_CONF(read)
policy_hierarchy_enum2char() -- Return policy char for a value
char policy_hierarchy_enum2char(policy_type_t value)
Returns the first letter of a policy name corresponding to the enum "value".
policy_type_t value - enum value
char - "O", "F", "S", "D" MT-NOTE: not thread safe, needs LOCK_SCHED_CONF(read)
policy_hierarchy_verify_value() -- verify a policy string
int policy_hierarchy_verify_value(const char* value)
The function tests whether the given policy string (value) is i valid.
const char* value - policy string
int - 0 -> OK 1 -> ERROR: one char is at least twice in "value" 2 -> ERROR: invalid char in "value" 3 -> ERROR: value == NULL MT-NOTE: is MT safe, uses only the given data.
sconf_ph_fill_array() -- fill the policy array
void sconf_ph_fill_array(policy_hierarchy_t array[], const char *value)
Fill the policy "array" according to the characters given by "value". value == "FODS": policy_hierarchy_t array[4] = { {FUNCTIONAL_POLICY, 1}, {OVERRIDE_POLICY, 1}, {DEADLINE_POLICY, 1}, {SHARE_TREE_POLICY, 1} }; value == "FS": policy_hierarchy_t array[4] = { {FUNCTIONAL_POLICY, 1}, {SHARE_TREE_POLICY, 1}, {OVERRIDE_POLICY, 0}, {DEADLINE_POLICY, 0} }; value == "OFS": policy_hierarchy_t hierarchy[4] = { {OVERRIDE_POLICY, 1}, {FUNCTIONAL_POLICY, 1}, {SHARE_TREE_POLICY, 1}, {DEADLINE_POLICY, 0} }; value == "NONE": policy_hierarchy_t hierarchy[4] = { {OVERRIDE_POLICY, 0}, {FUNCTIONAL_POLICY, 0}, {SHARE_TREE_POLICY, 0}, {DEADLINE_POLICY, 0} };
policy_hierarchy_t array[] - array with at least POLICY_VALUES values const char* value - "NONE" or any combination of the first letters of the policy names (e.g. "OFSD")
"array" will be modified MT-NOTE: is MT safe, uses LOCK_SCHED_CONF(read)
sconf_ph_print_array() -- print hierarchy array
void sconf_ph_print_array(policy_hierarchy_t array[])
Print hierarchy array in the debug output
policy_hierarchy_t array[] - array with at least POLICY_VALUES values MT-NOTE: is MT save, no lock needed, works on the passed in data
cqueue_create() -- Create a new cluster queue object
lListElem * cqueue_create(lList **answer_list, const char *name)
Returns a new cluster queue object with the name "name".
lList **answer_list - AN_Type list const char *name - cluster queue name
lListElem * - CQ_Type object or NULL
cqueue_is_a_href_referenced() -- Is one href referenced
bool cqueue_is_a_href_referenced(const lListElem *this_elem, const lList *href_list, bool only_hostlist)
Returns true if at least one host contained in "href_list" is referenced in the cluster queue "this_elem". If "only_hostlist" is true then only the hostlist will be tested and all parameter lists will be ignored.
const lListElem *this_elem - CQ_Type object const lList *href_list - HR_Type list bool only_hostlist - check only hostlist and ignore all parameter lists
bool - at least one object is referenced
cqueue_is_hgroup_referenced() -- is a hgroup referenced in cqueue
bool cqueue_is_hgroup_referenced(const lListElem *this_elem, const lListElem *hgroup)
Is the given "hgroup" object referenced in the cluster queue "this_elem".
const lListElem *this_elem - CQ_Type const lListElem *hgroup - HGRP_Type
bool - true if "hgroup" is referenced
cqueue_is_href_referenced() -- is a host/hostgroup referenced in cqueue
bool cqueue_is_href_referenced(const lListElem *this_elem, const lListElem *href, bool only_hostlist)
Is the given "href" (host or hostgroup referenece) used in the definition of the cluster queue "this_elem"? If "only_hostlist" is true then only the hostlist will be tested and all parameter lists will be ignored.
const lListElem *this_elem - CQ_Type const lListElem *href - HR_Type bool only_hostlist - check only hostlist and ignore all parameter lists
bool - true if it is referenced
cqueue_list_add_cqueue() -- Add a cluster queue to its master list
bool cqueue_list_add_cqueue(lListElem *queue)
Add a cluster queue in its master list.
lListElem *queue - CQ_Type
bool - error state true - success false - error
cqueue_list_find_all_matching_references() -- as it says
bool cqueue_list_find_all_matching_references(const lList *this_list, lList **answer_list, const char *cqueue_pattern, lList **qref_list)
Find all cqueues in "this_list" where the cqueue name matches the pattern "cqueue_pattern". The names of that cqueues will be added to the sublist "qref_list" (QR_Type). "answer_list" will contain an error message if this function failes.
const lList *this_list - CQ_Type lList **answer_list - AN_Type const char *cqueue_pattern - fnmatch patterm lList **qref_list - QR_Type list
bool - error state true - success false - error
MT-NOTE: cqueue_list_find_all_matching_references() is MT safe
cqueue_list_find_hgroup_references() -- find hgroup references
bool cqueue_list_find_hgroup_references(const lList *this_list, lList **answer_list, const lListElem *hgroup, lList **string_list)
This function add each cqueue name contained in "this_list" to "string_list" where "hgroup" is referenced. Errors will be reported via "answer_list".
const lList *this_list - CQ_Type lList **answer_list - AN_Type const lListElem *hgroup - HGRP_Type lList **string_list - ST_Type
bool - error state true - success false - error
MT-NOTE: cqueue_list_find_hgroup_references() is MT safe
cqueue_list_locate() -- Find a cluster queue in list
lListElem * cqueue_list_locate(const lList *this_list, const char *name)
Find the cluster queue with name "name" in the list "this_list".
const lList *this_list - CQ_Type list const char *name - cluster queue name
lListElem * - cluster queue object or NULL
cqueue_list_locate_qinstance() -- finds a certain qinstance
lListElem * cqueue_list_locate_qinstance(lList *cqueue_list, const char *full_name)
Returns a certain qinstance with the name "full_name" from the master cqueue list given by "cqueue_list".
lList *cqueue_list - CQ_Type const char *full_name - qinstance name of the form <CQNAME>@<HOSTNAME>
lListElem * - QU_Type
MT-NOTE: cqueue_list_locate_qinstance() is MT safe
cqueue_list_locate_qinstance_msg() -- finds a certain qinstance
lListElem * cqueue_list_locate_qinstance_msg(lList *cqueue_list, const char *full_name, bool raise_error)
Returns a certain qinstance with the name "full_name" from the master cqueue list given by "cqueue_list".
lList *cqueue_list - CQ_Type const char *full_name - qinstance name of the form <CQNAME>@<HOSTNAME> bool raise_error - true - show error messages - false - suppress error messages
lListElem * - QU_Type
MT-NOTE: cqueue_list_locate_qinstance_msg() is MT safe
cqueue_list_set_tag() -- tags each cqueue and optionally qinstance
void cqueue_list_set_tag(lList *this_list, u_long32 tag_value, bool tag_qinstances)
Tags all cqueues contained in "this_list" with the value "tag_value". Optionally all qinstances contained in the CQ_qinstances-sublist will be tagged too if "tag_qinstances" is true.
lList *this_list - CQ_Type u_long32 tag_value - value bool tag_qinstances - true if instances should be tagged
void - None
MT-NOTE: cqueue_list_set_tag() is MT safe
cqueue_locate_qinstance() -- returns one qinstance from a cqueue
lListElem * cqueue_locate_qinstance(const lListElem *this_elem, const char *hostname)
Finds the queue instance locateted on the host "hostname" of a given cluster queue "this_elem".
const lListElem *this_elem - CQ_Type object const char *hostname - resolved hostname
lListElem * - qinstance object or NULL
cqueue_name_split() -- Get the CQ and host part of a QI name
bool cqueue_name_split(const char *name, dstring *cqueue_name, dstring *host_domain, bool *has_hostname, bool *has_domain)
Splits a qinstance name into its components. Examples: QI-name cqueue_name host_domain has_hostname has_domain ------------------------------------------------------------------ all.q all.q "" false false all.q@hostname all.q hostname true false all.q@@hgrp all.q @hgrp false true
const char *name - CQ/QD or QI name dstring *cqueue_name - CQ part of the name dstring *host_domain - host or hostgroup or nothing bool *has_hostname - is "host_domain" a hostname bool *has_domain - if "host_domain" a hostgroup
bool - error state always true - success
cqueue_set_template_attributes() -- Set default attributes
bool cqueue_set_template_attributes(lListElem *this_elem, lList **answer_list)
This function initializes all attributes of an empty cluster queue with default values. Please note that "this_elem" has to be "empty" before this function is called.
lListElem *this_elem - CQ_Type lList **answer_list - AN_Type
bool - error state true - success false - error
cqueue_trash_used_href_setting() -- trash certain setting
bool cqueue_trash_used_href_setting(lListElem *this_elem, lList **answer_list, const char *hgroup_or_hostname)
Trash all attribute specific overwritings in "this_elem" for the give host or hgroup "hgroup_or_hostname". Errors will be reported in "answer_list".
lListElem *this_elem - CQ_Type lList **answer_list - AN_Type const char *hgroup_or_hostname - host or hgroup name
bool - error result true - success false - error
MT-NOTE: cqueue_trash_used_href_setting() is MT safe
cqueue_verify_attributes() -- check all cluster queue attributes
bool cqueue_verify_attributes(lListElem *cqueue, lList **answer_list, lListElem *reduced_elem, bool in_master)
Check all cluster queue settings (and correct them if possible). - test that there is exact one default setting - check that there is only one setting for used hgroups/hosts - resolve hostnames - test attribute values
lListElem *cqueue - CQ_Type object to be verified lList **answer_list - AN_Type list lListElem *reduced_elem - reduced CQ_Type. Containes only those attributes to be checked bool in_master - true if this function is called in the master code
bool - error state true - success false - error
cqueue_xattr_pre_gdi() --
bool cqueue_xattr_pre_gdi(lList *this_list, lList **answer_list)
This function makes sure that a cqueue elements has the necessary information before it is sent to qmaster as a modify gdi request
lList *this_list - CQ_Type lList **answer_list - AN_Type
bool - error state true - success false - error ("answer_list" containes more information
MT-NOTE: cqueue_xattr_pre_gdi() is MT safe
cqueue_is_used_in_subordinate() -- checks for cqueue references
bool cqueue_is_used_in_subordinate(const char *cqueue_name, lListElem *cqueue)
The function goes through all cq subordinate definition and looks for the cq_name handed in. If it is found, the function will return true.
const char *cqueue_name - cq name to look for const lListElem *cqueue - cq to look in
bool - true - a reference was found
MT-NOTE: cqueue_is_used_in_subordinate() is MT safe
double_print_int_to_dstring() -- Print a double into a dstring as an int
lListElem * double_print_int_to_dstring(double value, dstring *string)
Print a double into a dstring as an int.
double value - the value to print dstring *string - the dstring to receive the value
bool - returns false if value is out of range for an int
MT-NOTE: double_print_int_to_dstring() is MT safe
double_print_to_dstring() -- Print a double into a dstring
lListElem * double_print_to_dstring(double value, dstring *string)
Print a double into a dstring.
double value - the value to print dstring *string - the dstring to receive the value
bool - returns false if something goes wrong
MT-NOTE: double_print_to_dstring() is MT safe
feature_activate() -- switches the active featureset
void feature_activate(featureset_ id)
Marks the current active featureset within the Master_FeatureSet_List as inactive and flags the featureset given as parameter as active.
id - feature set constant
modifies the Master_FeatureSet_List
MT-NOTE: feature_activate() is MT safe
feature_get_active_featureset_id() -- current active featureset
feature_id_t feature_get_active_featureset_id()
return an id of the current active featureset
feature_id_t - (find the definition in the .h file)
MT-NOTE: feature_get_active_featureset_id() is MT safe
feature_get_already_read_from_file()
void feature_get_already_read_from_file(int i)
Returns value of per thread global variable already_read_from_file.
feature_get_featureset_id() -- Value for a featureset string
feature_id_t feature_get_featureset_id(char* name)
This function returns the corresponding enum value for a given featureset string
char* name - feature set name earlier known as product mode string
feature_id_t
MT-NOTE: feature_get_featureset_id() is MT safe
feature_get_featureset_name() -- return the product mode string
char* feature_get_featureset_name(feature_id_t id)
returns the corresponding modestring for a featureset constant
feature_id_t id - constant
mode string
MT-NOTE: feature_get_featureset_name() is MT safe
feature_get_master_featureset_list()
lList **feature_get_master_featureset_list(void)
Returns pointer to location where per thread global list Master_FeatureSet_List is stored.
feature_get_product_name() -- get product name string
char* feature_get_product_name(featureset_product_name_id_t style)
This function will return a text string containing the the product name. The return value depends on the style parameter. An invalid style value will automatically be interpreted as FS_SHORT.
style - FS_SHORT = return short name FS_LONG = return long name FS_VERSION = return version FS_SHORT_VERSION = return short name and version FS_LONG_VERSION = return long name and version buffer - buffer provided by caller the string returned by this function points to this buffer
char* - string
MT-NOTE: feature_get_product_name() is MT safe
feature_initialize() -- initialize this module
static void feature_initialize(void)
build up the CULL list "Master_FeatureSet_List" (FES_Type) with information found in the array "enabled_features_mask"
static array enabled_features_mask[][]
initialized Master_FeatureSet_List
MT-NOTE: feature_initialize() is MT safe
feature_initialize_from_string() -- tag one featureset as active
int feature_initialize_from_string(char *mode)
This function interprets the mode string and tags the corresponding featureset enty within the Master_FeatureSet_List as active.
char *mode - product mode string (valid strings are defined in the arry featureset_list[])
0 OK -3 unknown mode-string
MT-NOTE: feature_initialize_from_string() is MT safe
feature_is_enabled() -- 0/1 whether the feature is enabled
bool feature_is_enabled(feature_id_t id)
return true or false whether the given feature is enabled or disabled in the current active featureset
feature_id_t id
true or false
MT-NOTE: feature_is_enabled() is MT safe
feature_mt_init() -- Initialize feature code for multi threading use.
void feature_mt_init(void)
Set up feature code. This function must be called at least once before any of the feature oriented functions can be used. This function is idempotent, i.e. it is safe to call it multiple times. Thread local storage for the feature code state information is reserved.
void - NONE
void - NONE
MT-NOTE: feature_mt_init() is MT safe
feature_once_init() -- One-time feature code initialization.
static feature_once_init(void)
Create access key for thread local storage. Register cleanup function. This function must be called exactly once.
void - none
void - none
MT-NOTE: feature_once_init() is MT safe.
feature_set_already_read_from_file()
void feature_set_already_read_from_file(int i)
Set per thread global variable already_read_from_file.
feature_state_destroy() -- Free thread local storage
static void feature_state_destroy(void* theState)
Free thread local storage.
void* theState - Pointer to memory which should be freed.
static void - none
MT-NOTE: feature_state_destroy() is MT safe.
feature_state_init() -- Initialize feature code state.
static void feature_state_init(struct feature_state_t* theState)
Initialize feature code state.
struct feature_state_t* theState - Pointer to feature state structure.
static void - none
MT-NOTE: feature_state_init() is MT safe.
HGRP_Type - CULL hostgroup element
SGE_HOST(HGRP_name) Name of the hostgroup SGE_LIST(HGRP_host_list) List of hostnames and/or hostgroup names
HGRP_Type elements are used to define groups of hosts. Each group will be identified by a unique name. Each hostgroup might refer to none, one or multiple hosts and/or hostgroups. This object makes it possible to define a network of hostgroups and hosts. -------------- | | V | 0:x ------------- -----| | HGRP_Type | ------------ ------------- ------------> | hostname | 0:x ------------ Example Following diagram shows a network of 9 hostgroups (A; B; C; D; E; G; H; I). Each of those groups references one host (A -> a; B -> b; C -> c; ...). Additionally some of those hostgroups refer to one (A -> C; B -> C; C -> E; ...) or two hostgroups (E -> F,G; F -> H,I) The connections are all uni-directional, you have to read the diagram from the left to the right. ----- ----- | A | -- a | H | -- h ----- \ / ----- ----- ----- | C | -- c | F | -- f ----- / ----- ----- / \ ----- \ ----- | B | -- b | E | -- e | I | -- i ----- ----- ----- ----- / \ ----- | D | -- d | G | -- g ----- ----- Several functions exist to create such networks and to find certain sets of hosts and hostgroups within such a network: hgroup_find_references("E", &answer, master_list, &hosts, &groups) hosts -> e groups -> F, G hgroup_find_all_references("E", &answer, master_list, &hosts, &groups) hosts -> e, f, g, h, i groups -> F, G, H, I hgroup_find_referencees("E", &answer, master_list, &groups) groups -> C, D hgroup_find_all_referencees("E", &answer, master_list, &groups) groups -> A, B, C, D
hgroup_add_references() -- Add a host or group reference
bool hgroup_add_references(lListElem *this_elem, lList **answer_list, const lList *href_or_groupref)
Add a host or group reference.
lListElem *this_elem - HGRP_Type elem lList **answer_list - AN_Type list const lList *href_or_groupref - HR_Type list
bool - error state true - Success false - Error
hgroup_check_name() -- determine if the name is a valid hgroup name
void check_hgroup_name(lList **answer_list, const char* name)
Determine if the given name is a valid hostgroup name. If not add an approbiate error to the answer_list
lList **answer_list - answer list where errors are stored const char* name - name of the hostgroup
bool - result true - name contains a valid name for a hostgroup false - name is not a valid name for a hostrgroup
MT-NOTE: check_hgroup_name() is not MT safe
hgroup_create() -- Create a new hgroup.
lListElem* hgroup_create(lList **answer_list, const char *name, lList *href_or_groupref)
Create a new hostgroup.
lList **answer_list - AN_Type list const char *name - name lList *href_or_groupref - list of hosts for this hgroup bool is_name_validate - if true, the hgrp name is validated. Should be done all the time, there is only one case in qconf in that the name has to be ignored.
lListElem* - new element or NULL
hgroup_find_all_referencees() -- find groups refering to this group
bool hgroup_find_all_referencees(const lListElem *this_elem, lList **answer_list, lList *master_list, lList **occupants_groups)
Find all hostgroups from 'master_list' which reference the hostgroup 'this_elem'. The name of these hostgroups will be returned in the hreference list 'occupants_groups'. 'answer_list' will contain error messages if the function is not successfull
const lListElem *this_elem - HGRP_Type element lList **answer_list - AN_Type list const lList *master_list - list of all existing HGRP_Type elements lList **occupants_groups - HR_Type list
bool - exit state true - Success false - Error
hgroup_find_all_references() -- Find referenced host and groups
bool hgroup_find_all_references(const lListElem *this_elem, lList **answer_list, lList *master_list, lList **used_hosts, lList **used_groups)
Find directly or indirectly referenced hgroup names. 'master_list' has to be the list of all existing hgroups. 'used_hosts' and 'used_groups' will contain the names of hosts and groups referenced by 'this_elem'.
const lListElem *this_elem - HGRP_Type lList **answer_list - AN_Type list const lList *master_list - HGRP_Type list lList **used_hosts - HR_Type list lList **used_groups - HR_Type list
bool - error state true - Success false - Error
Extremely poor performance. Try not to use this function.
hgroup_find_referencees() -- Find groups refering to this group
bool hgroup_find_referencees(const lListElem *this_elem, lList **answer_list, lList *master_list, lList **occupants_groups lList **occupants_queues)
Find all hostgroups from 'master_list' which reference the hostgroup 'this_elem'. The name of these hostgroups will be returned in the hreference list 'occupants_groups'. 'answer_list' will contain error messages if the function is not successfull
const lListElem *this_elem - HGRP_Type lList **answer_list - AN_Type const lList *master_hgroup_list - HGRP_Type master list const lList *master_cqueue_list - CQ_Type lList **occupants_groups - HR_Type lList **occupants_queues - ST_Type
bool - Error state true - Success false - Error
hgroup_find_references() -- find directly referenced hosts and groups
bool hgroup_find_references(const lListElem *this_elem, lList **answer_list, lList *master_list, lList **used_hosts, lList **used_groups)
Find all hgroups which are directly referenced by 'this_elem' 'master_list' has to be the list of all existing hgroups. 'used_hosts' and 'used_groups' will contain the names of hosts and groups after a call to this function.
const lListElem *this_elem - HGRP_Type lList **answer_list - AN_Type const lList *master_list - HGRP_Type lList **used_hosts - HR_Type lList **used_groups - HR_Type
bool - Error state true - Success false - Error
hgroup_list_exists() -- Do hostgroups really exist.
bool hgroup_list_exists(const lList *this_list, lList **answer_list, const lList *href_list)
This functions returns true if all hostgroups given by the parameter "href_list" exist in "this_list". If one or more objects are missing a corresponding error message will be returned via "answer_list".
const lList *this_list - HGRP_Type lList **answer_list - AN_Type const lList *href_list - HR_Type
bool - true or false
hgroup_list_find_matching() -- Find hgroups which match pattern
bool hgroup_list_find_matching(const lList *this_list, const char *hgroup_pattern, lList **href_list)
Selects all hostgroups of "this_list" which match the pattern "hgroup_pattern". All matching hostgroup names will be added to "href_list"
const lList *this_list - HGRP_Type list const char *hgroup_pattern - hostgroup pattern lList **used_hosts - HR_Type list
bool - error state true - success false - error
hgroup_list_find_matching_and_resolve() -- Finds hostnames
bool hgroup_list_find_matching_and_resolve(const lList *this_list, const char *hgroup_pattern, lList **used_hosts)
Selects all hostgroups of "this_list" which match the pattern "hgroup_pattern". All hostnames which are directly or indirectly referenced will be added to "used_hosts"
const lList *this_list - HGRP_Type const char *hgroup_pattern - fnmatch pattern lList **used_hosts - HR_Type
bool - error state true - Success false - Error
hgroup_list_get_master_list() -- Returns master list
lList **hgroup_list_get_master_list(void)
Returns master list containing all existing hostgroup objects.
void - none
lList** - HGRP_Type list
hgroup_list_locate() -- Find a group by name
lListElem* hgroup_list_locate(const lList *this_list, const char *group)
Find a 'group' in 'this_list'.
const lList *this_list - HGRP_Type list const char *group - group name
lListElem* - found element or NULL
host_get_load_value() -- return a load value of an exec host
const char* host_get_load_value(lListElem *host, const char *name)
Returns a certain load value for a certain host.
lListElem *host - the host to query const char *name - the name of the load value
const char* - string describing the load value
lListElem *host = lGetElemHost(Master_Host_List, EH_name, "myhost"); const char *value = host_get_load_value(host, "np_load_avg"); printf("The load on host myhost is %s\n", value);
host_is_referenced() -- Is a given host referenced in other objects?
bool host_is_referenced(const lListElem *host, lList **answer_list, const lList *queue_list const lList *hgrp_list)
This function returns true if the given "host" is referenced in a cqueue contained in "queue_list" or in a host group. If this is the case than a corresponding message will be added to the "answer_list".
const lListElem *host - EH_Type, AH_Type or SH_Type object lList **answer_list - AN_Type list const lList *queue_list - CQ_Type list const lList *hgrp_list - HGRP_Type list (Master list)
int - true (1) or false (0)
host_list_merge() -- merge global host settings into exec hosts
bool host_list_merge(lList *this_list)
Merges settings from the global host to the exec hosts objects. Currently this applies only to the report_variables attribute.
lList *this_list - the exec host list to work on
bool - true on success, else false
MT-NOTE: host_list_merge() is MT safe
host_merge() -- merge global host settings into an exec host
bool host_merge(lListElem *host, const lListElem *global_host)
Merges settings from the global host object into a specific exec host. Use the global settings, if no host specific settings are done. Currently this applies only to the report_variables attribute.
lListElem *host - the host object to hold the merged config const lListElem *global_host - the global host object
bool - true on success, else false
MT-NOTE: host_merge() is MT safe
href_list_add() -- Add host or hostgroup reference.
bool href_list_add(lList **this_list, lList **answer_list, const char *host_or_group)
Add a host or hostgroup given by 'host_or_group' into the list 'this_list'. If the function is successfull then the function returns 'true' otherwise it will add an entry into 'answer_list' and return with 'false'. If 'this_list' does not exist than it will be created.
lList **this_list - HR_Type list lList **answer_list - AN_Type list const char *host_or_group - host or group name
bool - error state true - Success false - Error
href_list_append_to_dstring() -- Print href-list to dstring
bool href_list_append_to_dstring(const lList *this_list, dstring *string)
Print href-list to dstring
const lList *this_list - HR_Type dstring *string - dynamic string
bool - Error state true - Success false - Error
href_list_compare() -- Finds additional entries in list
bool href_list_compare(const lList *this_list, lList **answer_list, const lList *list, lList **add_hosts, lList **add_groups, lList **equity_hosts, lList **equity_groups)
This function will find differences between two hostref lists given by 'this_list' and 'list'. Hosts and hostgroups which are only in 'this_list' can be found in 'add_hosts' and 'add_groups'. References which are contained in both lists can be found in 'equity_hosts' and 'equity_groups' after a call to this function. If the calling function is not interested in one ore more of the result lists than NULL should be used as parameter. The calling function is responsible to free all result lists. If the callee is also interested in the references which are only part of 'list' than this function can not be used. href_list_find_diff() should be used in this case.
const lList *this_list - HR_Type list to comapre lList **answer_list - AN_Type list const lList *list - 2nd HR_Type list to be compared lList **add_hosts - HR_Type list lList **add_groups - HR_Type list lList **equity_hosts - HR_Type list lList **equity_groups - HR_Type list
bool - error state true - Success false - Error
href_list_debug_print() -- Prints HR_Type list into TOP_LAYER
void href_list_debug_print(const lList *this_list, const char *prefix)
Prints prefix and HR_Type "this_list" into TOP_LAYER of debug output if this_list exists.
const lList *this_list - HR_Type list const char *prefix - prefix string
void - None
href_list_find_all_referencees() -- Find occupying hosts and groups
bool href_list_find_all_referencees(const lList *this_list, lList **answer_list, const lList *master_list, lList **occupant_groups)
Finds recursivly all hostgroups which occupy the hostgroups mentioned in 'this_list'. 'master_list' is the list of all existing hostgroups. Occupying hostgroups will be added to 'occupant_groups'. In case of any errors 'answer_list' will be filled.
const lList *this_list - RH_Type lList **answer_list - AH_Type const lList *master_list - HGRP_Type lList **occupant_groups - RH_Type
bool - error state true - Success false - Error
href_list_find_all_references() -- Find referenced hosts and hgroups
bool href_list_find_all_references(const lList *this_list, lList **answer_list, const lList *master_list, lList **used_hosts, lList **used_groups)
Finds all hosts and hostgroups which are directly and inderectly referenced by the hostgroups mentioned in 'this_list'. 'master_list' is the list of all existing hostgroups. Referenced hosts and hostgroups will be added to 'used_hosts' and 'used_groups'. In case of any errors 'answer_list' will be filled.
const lList *this_list - RN_Type lList **answer_list - AN_Type const lList *master_list - HGRP_Type lList **used_hosts - RN_Type lList **used_groups - RN_Type
bool - error state true - Success false - Error
href_list_find_diff() -- difference between two lists
bool href_list_find_diff(const lList *this_list, lList **answer_list, const lList *list, lList **add_hosts, lList **rem_hosts, lList **add_groups, lList **rem_groups)
Will identify differences between 'this_list' and 'list'. hosts which are only in 'this_list' will be copied into 'add_hosts' hosts which are only in 'list' will be copied into 'rem_hosts' groups which are only in 'this_list' will be copied to 'add_groups' groups which are only in 'this' will be copied to 'rem_groups' The calling context is responsible to free all result lists. If the callee is not interested in one or more of the resultlist than NULL should be used as parameter for this function.
const lList *this_list - HR_Type list to be compared lList **answer_list - AN_Type list const lList *list - 2nd HR_Type list to be compared lList **add_hosts - HR_Type list lList **rem_hosts - HR_Type list lList **add_groups - HR_Type list lList **rem_groups - HR_Type list
bool - error state true - Success false - Error
href_list_find_effective_diff() -- Resolves groups and creates diff
bool href_list_find_effective_diff(lList **answer_list, const lList *add_groups, const lList *rem_groups, const lList *master_list, lList **add_hosts, lList **rem_hosts)
Resolves host names of all groups contained in "add_groups" and "rem_groups". Hostnames not part of both resulting hostgroup sets will be stored in "add_hosts" and "rem_hosts".
lList **answer_list - AN_Type list const lList *add_groups - HR_Type list1 (hgroups) const lList *rem_groups - HR_Type list2 (hgroups) const lList *master_list - HGRP_Type list of all hgroups lList **add_hosts - resolved "add_groups" hosts not part of "rem_groups" lList **rem_hosts - resolved "rem_groups" hosts not part of "add_hosts"
bool - error state true - Success false - Error
href_list_find_referencees() -- Find occupying hosts and hgroups
bool href_list_find_referencees(const lList *this_list, lList **answer_list, const lList *master_list, lList **occupant_groups)
Finds hostgroup references which directy occupy at least one of the hostgroups mentioned in 'this_list'. 'master_list' is the list of all existing hostgroups. Directly occupying hostgroups will be added to 'occupant_groups'. In case of any errors 'answer_list' will be filled.
const lList *this_list - HR_Type lList **answer_list - AN_Type const lList *master_list - HGRP_Type lList **occupant_groups - HR_Type
bool - error state true - Success false - Error
href_list_find_references() -- Find referenced hosts and groups
bool href_list_find_references(const lList *this_list, lList **answer_list, const lList *master_list, lList **referenced_hosts, lList **referenced_groups)
Finds hosts and hostgroups, which are directy referenced in the hostgroups mentioned in 'this_list'. 'master_list' is the list of all existing hostgroups. Directly referenced hosts and hostgroups will be added to 'used_hosts' and 'used_groups'. In case of any errors 'answer_list' will be filled.
const lList *this_list - HR_Type lList **answer_list - AN_Type const lList *master_list - HGRP_Type lList **used_hosts - HR_Type lList **used_groups - HR_Type
bool - error state true - Success false - Error
href_list_has_member() -- Is reference already in list
bool href_list_has_member(const lList *this_list, const char *host_or_group)
Is the given host or hostgroup ('host_or_group') already contained in the reference list?
const lList *this_list - HR_Type list const char *host_or_group - hostname or hgroup
bool - error state true - Success false - Error
href_list_locate() -- Find an entry in the reference list
lListElem* href_list_locate(const lList *this_list, const char *name)
Find an entry in the reference list.
const lList *this_list - HR_Type const char *name - host or groupname
lListElem* - Pointer to host or hostgroup element or NULL
href_list_make_uniq() -- remove duplicates
void href_list_make_uniq(lList *this_list, lList **answer_list)
Remove duplicates from "this_list"
lList *this_list - HR_Type list lList **answer_list - AN_Type list
void - none
href_list_remove_existing() -- Removes entries from list
bool href_list_remove_existing(lList **this_list, lList **answer_list, lList *list)
Removes all entries contained in "list" will be removed from "this_list" if they exist.
lList **this_list - HR_Type list lList **answer_list - AN_Type list lList *list - HR_Type list
bool - Error state true - Success false - Error
href_list_resolve_hostnames() -- resolve hostnames
bool href_list_resolve_hostnames(lList *this_list, lList **answer_list, bool ignore_errors
Resolve hostnames contained in 'this_list'. Depending on the 'ignore_errors' parameter the function will either fail if a host is not resolvable or this will be ignored.
lList *this_list - HR_Type list lList **answer_list - AN_Type list bool ignore_errors - ignore if a host is not resolveable
bool - error state true - Success false - Error
JAT_Type - CULL array task
SGE_ULONG(JAT_task_number) ---> JAT_id Unique task number assigned during task creation. SGE_ULONG(JAT_status) ---> merge status, state and hold First part of the state (see also JAT_hold, JAT_state) SGE_ULONG(JAT_start_time) Tasks start time. SGE_ULONG(JAT_end_time) Tasks end time. Only used in Execd to simulate job runs. SGE_ULONG(JAT_hold) Second part of the state (user, operator, system hold) (see also JAT_status, JAT_state) SGE_STRING(JAT_granted_pe) Name of a granted parallel environment SGE_ULONG(JAT_job_restarted) Was the task restarted (due to reschedule/migrate)? JG: TODO: it is no boolean, but misused for other information! SGE_LIST(JAT_granted_destin_identifier_list) Granted destination identifier list (JG_Type) SGE_STRING(JAT_master_queue) ---> == first element of JAT_granted_destin_identifier_list? Master queue SGE_ULONG(JAT_state) Third part of state (see also JAT_hold, JAT_status) SGE_ULONG(JAT_pvm_ckpt_pid) ---> still used? Any reference to PVM? SGE_ULONG(JAT_pending_signal) SGE_ULONG(JAT_pending_signal_delivery_time) SGE_ULONG(JAT_pid) ---> move up SGE_STRING(JAT_osjobid) Unique id which applies to all os processes started on behalf of this task. Set during the startup phase of the jobscript. Meaning depends on the architecture of that host were the task is started. SOLARIS/LINUX/ALPHA - supplementary group id IRIX - array session id SGE_LIST(JAT_usage_list) Raw usage from data collector. No longer used by schedd. Scaled by qmaster to JAT_scaled_usage_list. 'UA_Type' list. Not spooled. SGE_LIST(JAT_scaled_usage_list) Scaled usage set by qmaster, used by schedd. 'UA_Type' list. Not spooled. SGE_ULONG(JAT_fshare) Functional shares associated with the job. Set and used by schedd. Stored to qmaster for displaying. Not spooled. SGE_DOUBLE(JAT_tix) Total tickets. Set by schedd, saved to qmaster. Sent to PTF. Not Spooled SGE_DOUBLE(JAT_oticket) Override tickets set by schedd. Saved to qmaster and sent to PTF. Not spooled. SGE_DOUBLE(JAT_fticket) Functional tickets set bye schedd. Saved to qmaster and sent to PTF. Not spooled. SGE_DOUBLE(JAT_sticket) Share-tree tickets set by schedd. Saved to qmaster. Not spooled. SGE_DOUBLE(JAT_share) Job targeted proportion set by schedd. Saved to qmaster. Not spooled. SGE_ULONG(JAT_suitable) ---> only for output. SGE_LIST(JAT_task_list, PET_Type) List of running parallel tasks SGE_LIST(JAT_finished_task_list, FPET_Type) List of finished parallel tasks - contains only task names. SGE_LIST(JAT_previous_usage_list) SGE_OBJECT(JAT_pe_object) PE object granted to this task (PE_Type), only used in execd SGE_ULONG(JAT_next_pe_task_id) Used locally in execd to store next pe task id for this jatask on this execd. SGE_DOUBLE(JAT_progress_in_former_runs) The proportion of the total job run time earlier runs achieved and secured. No where used. SGE_ULONG(JAT_stop_initiate_time) The time when the action to initiate a job finish (i.e. job termination, or checkpoint creation) was triggered or re-triggered. SGE_DOUBLE(JAT_prio ) The GE priority derived from weighted normalized tickets and weighted normalized static urgency. Changes with task due to GE ticket dependency. Not spooled. SGE_DOUBLE(JAT_ntix ) Relative importance due to JAT_tix amount in the range between 0.0 and 1.0. Not spooled. SGE_ULONG(JAT_wallclock_limit) Resulting wallclock_limit. If not requested the minimum by queue h_rt's.
JAT_Type elements make sense only in conjunction with JB_Type elements. One element of each type is necessary to hold all data for the execution of one job. One JB_Type element and x JAT_Type elements are needed to execute an array job with x tasks. ----------- 1:x ------------ | JB_Type |<---------------->| JAT_Type | ----------- ------------ The relation between these two elements is defined in the 'JB_ja_tasks' sublist of a 'JB_Type' element. This list will contain all belonging JAT_Type elements. The 'JAT_Type' CULL element contains all attributes in which one array task may differ from another array task of the same array job. The 'JB_Type' element defines all attributes wich are equivalent for all tasks of an array job. A job and an array job with one task are equivalent concerning their data structures. Both consist of one 'JB_Type' and one 'JAT_Type' element. 'JAT_Type' elements contain dynamic data which accrue during the execution of a job. Therefore it is not necessary to create these elements during the submission of a (array) job, but after the job has been dispatched.
ja_task_add_finished_pe_task() -- remember finished parallel task
bool ja_task_add_finished_pe_task(lListElem *ja_task, const char *pe_task_id)
To avoid duplicate handling of finished parallel tasks (which could be triggered by sge_execd sending task end reports multiple times until it receives an ack from qmaster), the ja_task object (JAT_Type) contains a list of finished parallel tasks. ja_task_add_finished_pe_task tries to add a new parallel task to this list. If an entry with the given pe_task_id already exists, the function returns false, else true.
lListElem *ja_task - the ja_task to check/modify const char *pe_task_id - the pe_task_id to check/insert
bool - error state true - if the pe_task_id did not yet exist and could be inserted, false - if the pe_task_id already existed.
ja_task_clear_finished_pe_tasks() -- clear finished task list
bool ja_task_clear_finished_pe_tasks(lListElem *ja_task)
A ja_task contains a list of all finished parallel tasks (see also sgeobj/ja_task/ja_task_add_finished_pe_task()). In certain circumstances (e.g. if a ja_task is rescheduled), it is necessary to clear this list. ja_task_clear_finished_pe_tasks removes the complete sublist including the contained task ids.
lListElem *ja_task - the ja_task to modify
bool - true, if the list could be cleared, false, if no list of finished pe_tasks existed.
ja_task_list_print_to_string() -- print task id ranges into string
void ja_task_list_print_to_string(const lList *ja_task_list, dstring *range_string)
The ids of all tasks contained in 'ja_task_list' will be printed into 'range_string'.
const lList *ja_task_list - JAT_Type list dstring *range_string - dynamic string
ja_task_list_split_group() -- Splits a list into two parts
lList* ja_task_list_split_group(lList **ja_task_list)
All tasks which have the same state (JAT_status, JAT_state) like the first element of 'ja_task_list' will be removed from i 'ja_task_list' and returned by this function.
lList **ja_task_list - JAT_Type list
lList* - JAT_Type list (elements with equivalent state)
ja_task_message_add() -- add a message to the message list of a task
bool ja_task_message_add(lListElem *this_elem, u_long32 type, const char *message)
Adds a message in the "JAT_message_list"-message list of "this_elem" "type" will be the message type. "message" is the text string stored int the new element of the sublist.
lListElem *this_elem - JAT_Type element u_long32 type - message type id const char *message - message
bool - error state true - success false - error
MT-NOTE: ja_task_message_add() is MT safe
ja_task_message_trash_all_of_type_X() -- Trash messages of certain type
bool ja_task_message_trash_all_of_type_X(lListElem *this_elem, u_long32 type)
Trash all messages from the sublist of JAT_message_list which are of the given "type".
lListElem *this_elem - JAT_Type element u_long32 type - type id
bool - error state true - success false - error
MT-NOTE: ja_task_message_trash_all_of_type_X() is MT safe
ja_task_search_pe_task() -- Find a certain PE Task
lListElem* ja_task_search_pe_task(const lListElem *ja_task, const char **pe_task_id)
Find a certain PE Task with "pe_task_id" in "ja_task"
const lListElem *ja_task - JAT_Type element const char *pe_task_id - PE task id string (e.g. "1.speedy")
lListElem* - PET_Type
GR_Type - CULL group element
SGE_ULONG (GR_group) Group IDs of a process.
JB_Type - CULL job element
Job identification and dependencies =================================== SGE_ULONG(JB_job_number) ---> JB_id Uniq job number. SGE_STRING(JB_job_name) Job name ("qsub/qalter -N job_name") SGE_XULONG(JB_version) SGE_LIST(JB_jid_request_list) job requested dependencies (JRE_Type only JRE_job_name) SGE_LIST(JB_jid_predecessor_list) Predecessor jobs (JRE_Type only JRE_job_name) SGE_LIST(JB_jid_successor_list) Sucessor jobs (JRE_Type only JRE_job_number) SGE_LIST(JB_ja_ad_request_list) job requested array dependencies (JRE_Type only JRE_job_name) SGE_LIST(JB_ja_ad_predecessor_list) Predecessor array jobs (JRE_Type only JRE_job_name) SGE_LIST(JB_ja_ad_successor_list) Sucessor array jobs (JRE_Type only JRE_job_number) SGE_STRING(JB_session) Jobs session (JAPI session tag for job event selection) Project/Department ================== SGE_STRING(JB_project) Project name (qsub -P project_name) SGE_STRING(JB_department) Department name. Set by scheduler. Data related to job script =========================== SGE_STRING(JB_directive_prefix) Command prefix for jobscript ("qsub -C prefix") for parsing special comments in the script file. SGE_XSTRING(JB_exec_file) ---> is the path to the locally spooled copy on the execution daemon, it is script what actually gets executed, In the case of a binary, is unused. SGE_STRING(JB_script_file) ---> is the path to the job as sent from the CLI, is the path on the submit host In the case of a binary, is the path to the binary SGE_ULONG(JB_script_size) ---> really needed? SGE_STRING(JB_script_ptr) ---> the pointer to the character area of the jobscript Time information ================ SGE_RULONG(JB_submission_time) SGE_ULONG(JB_execution_time) When should the job start ("qsub/qalter -a date_time") SGE_ULONG(JB_deadline) Deadline initiation time. (qsub -dl date_time) User related information ======================== SGE_RSTRING(JB_owner) ---> rename to JB_user to be consistent? SGE_RULONG(JB_uid) SGE_RSTRING(JB_group) SGE_RULONG(JB_gid) SGE_STRING(JB_account) Account string ("qsub/qalter -A account string") Submission environment ====================== SGE_STRING(JB_cwd) Current working directory during qsub ("qsub -cwd") SGE_BOOL(JB_notify) Notify job of impending kill/stop signal. ("qsub -notify") SGE_ULONG(JB_type) Start job immediately or not at all. ("qsub -now") JG: TODO: it is no boolean, but misused for other information! SGE_BOOL(JB_reserve) Specifies a reservation is desired by the user ("-R y|n"). Available for non-immediate job submissions. Irrespective of the users desire a job reservation is made o only in reservation scheduling mode o only until the maximum number of reservations during a scheduling run is not exceeded when the order comes at this job. The maximum number (SC_max_reservation) can be specified in sched_conf(5). o only for non-immediate jobs Default is 'n'. SGE_ULONG(JB_ar) ---> JB_ar Uniq advance reservation number. SGE_ULONG(JB_priority) Priority ("qsub/qalter -p priority") SGE_ULONG(JB_jobshare) Priority ("qsub/qalter -js jobshare") SGE_LIST(JB_shell_list, PN_Type) Command interpreter to be used (PN_Type). ("qsub/qalter -S shell") SGE_ULONG(JB_verify) Triggers "verify" messages. (qsub -verify) SGE_LIST(JB_env_list) Export these env variables (VA_Type). ("qsub -V"). SGE_TLIST(JB_context, VA_Type) Custom attributes (name,val) pairs (VA_Type). ("qsub/qalter -ac/-dc context_list") SGE_LIST(JB_job_args) Job arguments (ST_Type). SGE_LIST(JB_binding) Binding strategy for execution host (and later scheduler) Checkpointing/Restart ===================== SGE_ULONG(JB_checkpoint_attr) ----> merge all checkpointing stuff to one object? Checkpoint attributes ("qsub/qalter -c interval_flags") SGE_STRING(JB_checkpoint_name) Name of ckpt object ("qsub/qalter -ckpt ckpt_name") SGE_OBJECT(JB_checkpoint_object, CK_Type) Ckpt object which will be sent from qmaster to execd. SGE_ULONG(JB_checkpoint_interval) Checkpoint frequency ("qsub/qalter -c seconds") SGE_ULONG(JB_restart) Is job rerunable? ("qsub/qalter -r y/n") JG: TODO: it is no boolean, but misused for other information! Job I/O ======= SGE_LIST(JB_stdout_path_list) Pathname for stdout (PN_Type). ("qsub/qalter -o path_name") SGE_LIST(JB_stderr_path_list) Std error path streams (PN_Type). ("qsub/qalter "-e path_name") SGE_LIST(JB_stdin_path_list) Std input path streams (PN_Type). ("qsub/qalter "-i path_name") SGE_BOOL(JB_merge_stderr) Merge stdout and stderr? ("qsub/qalter -j y|n") Resource requests ================= SGE_LIST(JB_hard_resource_list, CE_Type) Hard resource requirements/limits/restrictions (CE_Type). ("qsub -l resource_list") SGE_LIST(JB_soft_resource_list, CE_Type) Soft resource requirements/limits/restrictions (CE_Type). ("qsub -l resource_list") SGE_LIST(JB_hard_queue_list) ----> why separated from other requests? Hard queue list (QR_Type). ("qsub -q dest_identifier") SGE_LIST(JB_soft_queue_list) ----> why separated from other requests? Soft queue list (QR_Type). ("qsub/qselect -q dest_identifier") Mail options ============ SGE_ULONG(JB_mail_options) Mail options ("qsub/qalter -m mail_options") SGE_LIST(JB_mail_list) Mail recipiants (MR_Type). ("qsub/qalter -M mail_list) Parallel Job info ================= SGE_STRING(JB_pe) Name of requested PE or wildcard expression for matching PEs SGE_LIST(JB_pe_range) PE slot range (RN_Type). Qmaster ensure it is ascending and normalized. SGE_LIST(JB_master_hard_queue_list) Master queue list (QR_Type). ("qsub -masterq queue_list") Security related data ===================== SGE_XSTRING(JB_tgt) Kerberos client TGT SGE_XSTRING(JB_cred) DCE/Kerberos credentials Data related to array jobs ========================== SGE_LIST(JB_ja_structure) Elements describe task id range structure during the submission time of a (array) job (RN_Type). ("qsub -t tid_range") SGE_LIST(JB_ja_n_h_ids) Just submitted array task without hold state (RN_Type). ("qsub -t tid_range") SGE_LIST(JB_ja_u_h_ids) Just submitted and user hold applied (RN_Type). ("qsub -h -t tid_range") ("qalter -h u/U jid.tid1-tid2:step") SGE_LIST(JB_ja_s_h_ids) Just submitted and system hold applied (RN_Type). ("qalter -h s/S jid.tid1-tid2:step") SGE_LIST(JB_ja_o_h_ids) Just submitted and operator hold applied (RN_Type). ("qalter -h o/O jid.tid1-tid2:step") SGE_LIST(JB_ja_a_h_ids) Just submitted and array hold applied (RN_Type). ("qalter -hold_jid_ad wc_job_list") SGE_LIST(JB_ja_z_ids) Zombie task ids (RN_Type). SGE_LIST(JB_ja_template) Template for new tasks. The schedd thread stores initial tickets in this element. (JAT_Type) SGE_LIST(JB_ja_tasks) List of array tasks (in case of array jobs) or one task (in case of a job) (JAT_Type). Data used only in scheduler =========================== SGE_HOST(JB_host) host job is executing on. Local to scheduler. Not spooled. SGE_REF(JB_category) Category string reference used in scheduler. Misc ==== SGE_LIST(JB_user_list) List of usernames (qsub/qalter -u username_list). ---> qsub -u does not exist. Not part of a job, but only userd for qalter request as where condition. Could most probably be passed via lCondition. SGE_LIST(JB_job_identifier_list) ---> condition for qalter? Then it should better be passed via condition. (ID_Type) SGE_XULONG(JB_verify_suitable_queues) ---> qalter? SGE_XULONG(JB_soft_wallclock_gmt) ---> the same as complex s_rt? SGE_XULONG(JB_hard_wallclock_gmt) ---> the same as complex h_rt? SGE_DOUBLE(JB_urg ) Absolute static urgency importance. The admin can use arbitrary weighting factors in the formula used to determine this number. So any value is possible. Needed only when scheduling code is run. Not spooled. SGE_DOUBLE(JB_nurg ) Relative importance due to static urgency in the range between 0.0 and 1.0. No need to make this a per task attribute as long as waiting time and deadline remain job attributes. Not spooled. SGE_DOUBLE(JB_nppri ) Relative importance due to Posix priority in the range between 0.0 and 1.0. No need to make this a per task attribute as long as the POSIX priority remains a job attribute. Not spooled. SGE_DOUBLE(JB_rrcontr ) Combined contribution to static urgency from all resources. This can be any value. Actually this is a property of job category. This field is needed only to provide it for diagnosis purposes it as per job information via GDI. Not spooled. SGE_DOUBLE(JB_dlcontr ) Contribution to static urgency from job deadline. This can be any value. No need to make this a per task attribute as long a deadline is a job attribute. Increases over time. Not spooled. SGE_DOUBLE(JB_wtcontr ) Contribution to static urgency from waiting time. This can be any value. No need to make this a per task attribute as long as waiting time is a job attribute. Increases over time. Not spooled. SGE_ULONG(JB_override_tickets) - override tickets assigned by admin. (qalter -ot tickets). SGE_LIST(JB_qs_args) ---> qsi? Arguments for foreign queuing system (ST_Type). Either delete it, or recycle it to be used with starter_method. SGE_LIST(JB_path_aliases) Path aliases list (PA_Type). SGE_ULONG(JB_pty) Interactive job should be started in a pty. 0=no, 1=yes, 2=use default. SGE_ULONG(JB_ja_task_concurrency) The number of concurrent array tasks executing at any given time.
JB_Type elements make only sense in conjunction with JAT_Type elements. One element of each type is necessary to hold all data for the execution of one job. One JB_Type element and x JAT_Type elements are needed to execute an array job with x tasks. ----------- 1:x ------------ | JB_Type |<---------------->| JAT_Type | ----------- ------------ The relation between these two elements is defined in the 'JB_ja_tasks' sublist of a 'JB_Type' element. This list will contain all belonging JAT_Type elements. The 'JAT_Type' CULL element containes all attributes in which one array task may differ from another array task of the same array job. The 'JB_Type' element defines all attributes wich are equivalent for all tasks of an array job. A job and an array job with one task are equivalent concerning their data structures. Both consist of one 'JB_Type' and one 'JAT_Type' element.
PRO_Type - CULL process element
SGE_ULONG (PRO_pid) Process id of the element SGE_ULONG (PRO_utime) Number of jiffies that this process has been scheduled in user mode. SGE_ULONG (PRO_stime) Number of jiffies that this process has been scheduled in kernel mode. SGE_ULONG64 (PRO_vsize) Virtual memory size in bytes. SGE_LIST (PRO_groups) GR_Type list with all groups associated with this process. SGE_BOOL (PRO_rel) Flag if this process belongs to a GE job. SGE_BOOL (PRO_run) Flag if this process is still running. SGE_ULONG (PRO_io) IO statistic for the running process.
jb_now -- macros to handle flag JB_type
JOB_TYPE_IMMEDIATE JOB_TYPE_QSH JOB_TYPE_QLOGIN JOB_TYPE_QRSH JOB_TYPE_QRLOGIN JOB_TYPE_NO_ERROR When a job of this type fails and the error condition usually would result in the job error state the job is finished. Thus no qmod -c "*" is supported.
job_add_as_zombie() -- add task into zombie id list
void job_add_as_zombie(lListElem *zombie, lList **answer_list, u_long32 ja_task_id)
Adds a task into the zombie id list (JB_ja_z_ids)
lListElem *zombie - JB_Type lList **answer_list - AN_Type u_long32 ja_task_id - Task id to be inserted
job_add_parent_id_to_context() -- add parent jobid to job context
void job_add_parent_id_to_context(lListElem *job)
If we have JOB_ID in environment implicitly put it into the job context variable PARENT if was not explicitly set using "-sc PARENT=$JOBID". By doing this we preserve information about the relationship between these two jobs.
lListElem *job - JB_Type element
void - None
job_check_correct_id_sublists() -- test JB_ja_* sublists
void job_check_correct_id_sublists(lListElem *job, lList **answer_list)
Test following elements of "job" whether they are correct: JB_ja_structure, JB_ja_n_h_ids, JB_ja_u_h_ids, JB_ja_s_h_ids, JB_ja_o_h_ids, JB_ja_a_h_ids, JB_ja_z_ids The function will try to correct errors within this lists. If this is not possible an error will be returned in "answer_list".
lListElem *job - JB_Type element lList **answer_list - AN_Type list
void - none
job_check_owner() -- check the owner of a job
int job_check_owner(const char *user_name, u_long32 job_id)
Checks if the owner of the job specified by job_id is the user given by user_name.
const char *user_name - the user name u_long32 job_id - the job number lList master_job_list - a ref to the master job list
int - -1, if the job cannot be found 0, if the user is the job owner 1, if the user is not the job owner
job_check_qsh_display() -- check DISPLAY variable for qsh jobs
int job_check_qsh_display(const lListElem *job, lList **answer_list, bool output_warning)
Checks the DISPLAY variable for qsh jobs: - existence - empty string - local variable In each error cases, an appropriate error message is generated. If output_warning is set to true, an error message is output. In each case, an error message is written into answer_list.
const lListElem *job - the job to check lList **answer_list - answer list to take error messages, if NULL, no answer is passed back. bool output_warning - output error messages to stderr?
int - STATUS_OK, if function call succeeds, else STATUS_EUNKNOWN.
To fully hide the data representation of the DISPLAY settings, functions job_set_qsh_display and job_get_qsh_display would be usefull.
job_count_pending_tasks() -- Count number of pending tasks
bool job_count_pending_tasks(lListElem *job, bool count_all)
This function returns the number of pending tasks of a job.
lListElem *job - JB_Type bool - number of tasks or simply 0/1 if count_all is 'false'
int - number of tasks or simply 0/1 if count_all is 'false'
job_create_hold_id_lists() -- Lists for hold combinations
void job_create_hold_id_lists(const lListElem *job, lList *id_list[16], u_long32 hold_state[16])
This function creates sixteen 'id_lists'. Tasks whose id is contained in an id list has the hold state combination delivered by 'hold_state'. After using 'id_list' the function job_destroy_hold_id_lists() has to be called to free allocated memory.
const lListElem *job - JB_Type lList *id_list[16] - NULL initialized pointer array u_long32 hold_state[16] - Array for hold state combinations
job_create_task() -- Create an array task
lListElem* job_create_task(lListElem *job, lList **answer_list, u_long32 ja_task_id)
This function return the array task with the id 'ja_task_id' if it exists in the JB_ja_tasks-sublist of 'job'. A new element will be created in the sublist of 'job' and a pointer to the new element will be returned. Errors may be found in the 'answer_list'
lListElem *job - JB_Type lList **answer_list - AN_Type u_long32 ja_task_id - array task id
lListElem* - JAT_Type element
In case of errors, the function should return a message in a given answer_list (answer_list != NULL).
job_delete_not_enrolled_ja_task() -- remove unenrolled task
void job_delete_not_enrolled_ja_task(lListElem *job, lList **answer_list, u_long32 ja_task_number)
Removes an unenrolled pending task from the id lists.
lListElem *job - JB_Type lList **answer_list - AN_Type u_long32 ja_task_number - Task to be removed
job_destroy_hold_id_lists() -- destroy hold combination lists
void job_destroy_hold_id_lists(const lListElem *job, lList *id_list[16])
This function frees all memory allocated by a previous call of job_create_hold_id_lists().
const lListElem *job - JB_Type lList *id_list[16] - array of RN_Type lists
job_enroll() -- enrolls a array task into the JB_ja_tasks lists
lListElem *job_enroll(lListElem *job, lList **answer_list, u_long32 ja_task_number)
The task with 'ja_task_number' will be enrolled into the JB_ja_tasks list of 'job' when this function is called.
lListElem *job - JB_Type lList **answer_list - AN_Type u_long32 ja_task_number - task number
lListElem * - the ja_task
job_get_biggest_enrolled_task_id() -- find biggest enrolled tid
u_long32 job_get_biggest_enrolled_task_id(const lListElem *job)
Returns the biggest task id currently existing in a job which is enrolled in the JB_ja_tasks sublist of 'job'. If no task is enrolled 0 will be returned.
const lListElem *job - JB_Type element
u_long32 - task id or 0
job_get_biggest_unenrolled_task_id() -- find biggest unenrolled id
u_long32 job_get_biggest_unenrolled_task_id(const lListElem *job)
Returns the biggest task id currently existing in a job which is not enrolled in the JB_ja_tasks sublist of 'job'. If no task is enrolled 0 will be returned.
const lListElem *job - JB_Type element
u_long32 - task id or 0
job_get_enrolled_ja_tasks() -- num. of enrolled array tasks
u_long32 job_get_not_enrolled_ja_tasks(const lListElem *job)
This function returns the number of tasks enrolled in the JB_ja_tasks sublist.
const lListElem *job - JB_Type
u_long32 - number of tasks
job_get_env_string() -- get value of certain job env variable
const char* job_get_env_string(const lListElem *job, const char *variable)
Return the string value of the job environment "variable". Please note: The "*_O_*" env variables get their final name shortly before job execution. Find more information in the comment of job_initialize_env()
const lListElem *job - JB_Type element const char* variable - environment variable name
const char* - value of "variable"
job_get_hold_state() -- Returns the hold state of a task
u_long32 job_get_hold_state(lListElem *job, u_long32 ja_task_id)
Returns the hold state of a job/array-task
lListElem *job - JB_Type u_long32 ja_task_id - array task id
u_long32 - hold state (see MINUS_H_TGT_*)
job_get_id_string() -- get an id string for a job/jatask/petask
const char * job_get_id_string(u_long32 job_id, u_long32 ja_task_id, const char *pe_task_id)
Returns an id string for a certain job, ja task or pe task. The function should be used in any code that outputs ids, e.g. in error strings to ensure we have the same output format everywhere. If the ja_task_id is 0, only the job id is output.
u_long32 job_id - the job id u_long32 ja_task_id - the ja task id or 0 to output only job_id const char *pe_task_id - optionally the pe task id dstring *buffer - a buffer to be used for printing the id string
const char* - pointer to a static buffer. It is valid until the next call of the function.
MT-NOTE: job_get_id_string() is MT safe
job_get_ja_task_hold_state() -- Hold state of unenrolled task
u_long32 job_get_ja_task_hold_state(const lListElem *job, u_long32 ja_task_id)
Returns the hold state of a task which is not enrolled in the JB_ja_tasks list of 'job'
const lListElem *job - JB_Type u_long32 ja_task_id - valid ja task id
u_long32 - hold state
job_get_ja_task_template() -- create a ja task template
lListElem* job_get_ja_task_template_pending(const lListElem *job, u_long32 ja_task_id)
The function returns a pointer to a template array task element. This task represents a currently submitted pending task.
const lListElem *job - JB_Type u_long32 ja_task_id - array task number
lListElem* - template task (JAT_Type)
job_get_ja_task_template_hold() -- create a ja task template
lListElem* job_get_ja_task_template_pending(const lListElem *job, u_long32 ja_task_id)
The function returns a pointer to a template array task element. This task represents a currently submitted pending task. The task number (JAT_task_number) of this template task will be initialized with the value given by 'ja_task_id'. The hold state of the task (JAT_hold) will be initialized with the 'hold_state' value. The function job_get_ja_task_hold_state() may be used to get the current hold state of an unenrolled pending task.
const lListElem *job - JB_Type u_long32 ja_task_id - array task number
lListElem* - template task (JAT_Type)
job_get_ja_task_template_pending() -- create a ja task template
lListElem* job_get_ja_task_template_pending(const lListElem *job, u_long32 ja_task_id)
The function returns a pointer to a template array task element. This task represents a currently submitted pending task (no hold state). The task number (JAT_task_number) of this template task will be initialized with the value given by 'ja_task_id'.
const lListElem *job - JB_Type u_long32 ja_task_id - array task number
lListElem* - template task (JAT_Type)
MT-NOTE: job_get_ja_task_template_pending() is MT safe
job_get_ja_tasks() -- returns number of array tasks
u_long32 job_get_ja_tasks(const lListElem *job)
This function returns the overall number of tasks in an array job.
const lListElem *job - JB_Type
u_long32 - number of tasks
job_get_job_key() -- create a unique key
const char* job_get_job_key(u_long32 job_id)
Creates a unique key consisting of the job_id. The job id can reread by calling job_parse_key().
u_long32 job_id - job id
const char* - pointer to a static buffer containing the key. The result is only valid until the next call of the function.
MT-NOTE: job_get_job_key() is MT safe
job_get_key() -- create a unique key
const char* job_get_key(u_long32 job_id, u_long32 ja_task_id, const char *pe_task_id, dstring *buffer)
Creates a unique key consisting of job_id, ja_task_id and pe_task_id. This key can again be split into its components by a call to job_parse_key().
u_long32 job_id - job id u_long32 ja_task_id - ja task id const char *pe_task_id - pe task id dstring *buffer - dstring buffer used to generate the key
const char* - pointer to the key, stored within buffer
MT-NOTE: job_get_key() is MT safe
job_get_not_enrolled_ja_tasks() -- num. of unenrolled tasks
u_long32 job_get_not_enrolled_ja_tasks(const lListElem *job)
This function returns the number of tasks not enrolled in the JB_ja_tasks sublist.
const lListElem *job - JB_Type
u_long32 - number of tasks
job_get_request() -- Returns the requested centry name
lListElem * job_get_request(const lListElem *this_elem, const char **centry_name)
Returns the requested centry name if it is requested by the give job (JB_Type).
const lListElem *this_elem - JB_Type element const char *centry_name - name
lListElem * - CE_Type element
MT-NOTE: job_get_request() is MT safe
job_get_shell_start_mode() -- get shell start mode for 'job'
const char* job_get_shell_start_mode(const lListElem *job, const lListElem *queue, const char *conf_shell_start_mode)
Returns a string identifying the shell start mode for 'job'.
const lListElem *job - JB_Type element const lListElem *queue - QU_Type element const char *conf_shell_start_mode - shell start mode of configuration
const char* - shell start mode
job_get_smallest_enrolled_task_id() -- find smallest enrolled tid
u_long32 job_get_smallest_enrolled_task_id(const lListElem *job)
Returns the smallest task id currently existing in a job which is enrolled in the JB_ja_tasks sublist of 'job'. If no task is enrolled 0 will be returned.
const lListElem *job - JB_Type element
u_long32 - task id or 0
job_get_smallest_unenrolled_task_id() -- get smallest id
u_long32 job_get_smallest_unenrolled_task_id(const lListElem *job)
Returns the smallest task id currently existing in a job which is not enrolled in the JB_ja_tasks sublist of 'job'. If all tasks are enrolled 0 will be returned.
const lListElem *job - JB_Type element
u_long32 - task id or 0
job_get_state_string() -- write job state flags into a string
void job_get_state_string(char *str, u_long32 op)
This function writes the state flags given by 'op' into the string 'str'
char *str - containes the state flags for 'qstat'/'qhost' u_long32 op - job state bitmask
job_get_submit_ja_tasks() -- array size during job submittion
u_long32 job_get_submit_ja_tasks(const lListElem *job)
The function returns the ammount of tasks the job had during it's submittion
const lListElem *job - JB_Type
u_long32 - number of tasks
job_get_submit_task_ids() -- Submit time task specification
void job_get_submit_task_ids(const lListElem *job, u_long32 *start, u_long32 *end, u_long32 *step)
The function returns the "start", "end" and "step" numbers which where used to create "job" (qsub -t <range>).
const lListElem *job - JB_Type element u_long32 *start - first id u_long32 *end - last id u_long32 *step - step size (>=1)
job_has_soft_requests() -- Has the job soft requests?
bool job_has_soft_requests(lListElem *job)
True (1) will be returned if the job has soft requests.
lListElem *job - JB_Type
bool - true or false
MT-NOTES: job_has_soft_requests() is MT safe
job_initialize_env() -- initialize environment (partially)
void job_initialize_env(lListElem *job, lList **answer_list, const lList* path_alias_list)
Initialize the environment sublist (JB_env_list) of "job". Path aliasing ("path_alias_list") has to be initialized before this function might be called. Following enironment variables will be added: <VAR_PREFIX>O_HOME <VAR_PREFIX>O_LOGNAME <VAR_PREFIX>O_PATH <VAR_PREFIX>O_SHELL <VAR_PREFIX>O_TZ <VAR_PREFIX>O_HOST <VAR_PREFIX>O_WORKDIR <VAR_PREFIX>O_MAIL This function will be used in SGE/EE client applications. Clients do not know which prefix should be used for job environment variables ("SGE_" or other). Therefore we use the define <VAR_PREFIX> which will be replaced shortly before the job is started.
lListElem *job - JB_Type element lList **answer_list - AN_Type list pointer const lList* path_alias_list - PA_Type list
job_initialize_id_lists() -- initialize task id range lists
void job_initialize_id_lists(lListElem *job, lList **answer_list)
Initialize the task id range lists within "job". All tasks within the JB_ja_structure element of job will be added to the JB_ja_n_h_ids list. All other id lists stored in the "job" will be deleted.
lListElem *job - JB_Type element lList **answer_list - AN_Type list pointer
int - return state -1 - error 0 - OK
MT-NOTE: job_initialize_id_lists() is MT safe
job_is_array() -- Is "job" an array job or not?
bool job_is_array(const lListElem *job)
The function returns true (1) if "job" is an array job with more than one task.
const lListElem *job - JB_Type element
bool - true or false
job_is_ckpt_referenced() -- Does job reference the given CKPT?
bool job_is_ckpt_referenced(const lListElem *job, const lListELem *ckpt)
The function returns true if "job" references the checkpointing object "ckpt".
const lListElem *job - JB_Type element const lListElem *ckpt - CK_Type object
bool - true or false
job_is_enrolled() -- Is a certain array task enrolled
bool job_is_enrolled(const lListElem *job, u_long32 task_number)
This function will return true (1) if the array task with 'task_number' is not enrolled in the JB_ja_tasks sublist of 'job'.
const lListElem *job - JB_Type u_long32 task_number - task_number
bool - true or false
job_is_ja_task_defined() -- was this task submitted
bool job_is_ja_task_defined(const lListElem *job, u_long32 ja_task_number)
This function will return true (1) if the task with 'ja_task_number' is defined within the array 'job'. The task is defined when 'ja_task_number' is enclosed in the task id range which was specified during submit time (qsub -t).
const lListElem *job - JB_Type u_long32 ja_task_number - task number
bool - true or false
MT-NOTE: job_is_ja_task_defined() is MT safe
job_is_parallel() -- Is "job" a parallel job?
bool job_is_parallel(const lListElem *job)
This function returns true if "job" is a parallel job (requesting a parallel environment).
const lListELem *job - JB_Type element
bool - true or false
job_is_pe_referenced() -- Does job reference the given PE?
bool job_is_pe_referenced(const lListElem *job, const lListElem *pe)
The function returns true if "job" references the "pe". This is also the case if job requests a wildcard PE and the wildcard name matches the given pe name.
const lListElem *job - JB_Type element const lListElem *pe - PE_Type object
int - true or false
job_is_tight_parallel() -- Is "job" a tightly integrated par. job?
bool job_is_tight_parallel(const lListElem *job, const lList *pe_list)
This function returns true if "job" is really a tightly integrated parallel job.
const lListElem *job - JB_Type element const lList *pe_list - PE_Type list with all existing PEs
bool - true or false
job_is_zombie_job() -- Is 'job' a zombie job
bool job_is_zombie_job(const lListElem *job)
True will be returned if 'job' is a zombie job.
const lListElem *job - JB_Type
bool - true or false
job_list_add_job() -- Creates a joblist and adds an job into it
int job_list_add_job(lList **job_list, const char *name, lListElem *job, int check)
A 'job_list' will be created by this function if it does not already exist and 'job' will be inserted into this 'job_list'. 'name' will be the name of the new list. If 'check' is true (1) than the function will test whether there is already an element in 'job_list' which has the same 'JB_job_number' like 'job'. If this is true than -1 will be returned by this function.
lList **job_list - JB_Type const char *name - name of the list lListElem *job - JB_Type element int check - Does the element already exist?
int - error code 1 => invalid parameter -1 => check failed: element already exists 0 => OK
job_list_locate() -- find job in a list
lListElem* job_list_locate(lList *job_list, u_long32 job_id)
Returns the job element within "job_list" having "job_id" as primary key.
lList *job_list - JB_Type list u_long32 job_id - job id
lListElem* - JB_Type element
job_list_register_new_job() -- try to register a new job
int job_list_register_new_job(const lList *job_list, u_long32 max_jobs, int force_registration)
This function checks whether a new job would exceed the maximum of allowed jobs per cluster ("max_jobs"). If the limit would be exceeded then the function will return 1 otherwise 0. In some situations it may be necessary to force the registration of a new job (reading jobs from spool area). This may be done with "force_registration".
const lListElem *job - JB_Type element u_long32 max_jobs - maximum number of allowed jobs per user int force_registration - force job registration
int - 1 => limit would be exceeded 0 => otherwise
job_might_be_tight_parallel() -- Tightly integrated job?
bool job_might_be_tight_parallel(const lListElem *job, const lList *pe_list)
This functions returns true if "job" might be a tightly integrated job. True will be returned if (at least one) pe matching the requested (wildcard) pe of a job has "contol_slaves=true" in its configuration.
const lListElem *job - JB_Type element const lList *pe_list - PE_Type list with all existing PEs
bool - true or false
job_parse_key() -- parse a key generated by job_get_key()
bool job_parse_key(char *key, u_long32 *job_id, u_long32 *ja_task_id, char **pe_task_id, bool *only_job)
Parse a key generated by job_get_key() and split it into its components.
char *key - key to be parsed u_long32 *job_id - pointer to job_id u_long32 *ja_task_id - pointer to ja_task_id char **pe_task_id - pointer to pe_task_id bool *only_job - true, if only a job id is contained in key, else false.
bool - true, if the key could be parsed, else false
MT-NOTE: job_get_key() is MT safe The pe_task_id is only valid until the passed key is deleted!
job_resolve_host_for_path_list() -- resolves hostnames in path lists
int job_resolve_host_for_path_list(const lListElem *job, lList **answer_list, int name)
Resolves hostnames in path lists.
const lListElem *job - the submited cull list lList **answer_list - AN_Type element int name - a JB_Type (JB_stderr_path_list or JB_stout_path_list)
int - error code (STATUS_OK, or ...)
job_search_task() -- Search an array task
lListElem* job_search_task(const lListElem *job, lList **answer_list, u_long32 ja_task_id)
This function return the array task with the id 'ja_task_id' if it exists in the JB_ja_tasks-sublist of 'job'. If the task is not found in the sublist, NULL is returned.
const lListElem *job - JB_Type lList **answer_list - AN_Type u_long32 ja_task_id - array task id
lListElem* - JAT_Type element
In case of errors, the function should return a message in a given answer_list (answer_list != NULL). MT-NOTE: job_search_task() is MT safe
job_set_env_string() -- set value of certain job env variable
void job_set_env_string(lListElem *job, const char* variable, const char *value)
Set the string "value" of the job environment "variable". Please note: The "*_O_*" env variables get their final name shortly before job execution. Find more information in the comment of job_initialize_env()
lListElem *job - JB_Type element const char* variable - environment variable name const char* value - new value
job_set_hold_state() -- Changes the hold state of a task.
void job_set_hold_state(lListElem *job, lList **answer_list, u_long32 ja_task_id, u_long32 new_hold_state)
This function changes the hold state of a job/array-task.
lListElem *job - JB_Type lList **answer_list - AN_Type u_long32 ja_task_id - Array task id u_long32 new_hold_state - hold state (see MINUS_H_TGT_*)
job_set_submit_task_ids() -- store the initial range ids in "job"
int job_set_submit_task_ids(lListElem *job, u_long32 start, u_long32 end, u_long32 step)
The function stores the initial range id values ("start", "end" and "step") in "job". It should only be used in functions initializing new jobs.
lListElem *job - JB_Type job u_long32 start - first id u_long32 end - last id u_long32 step - step size
int - 0 -> OK 1 -> no memory
MT-NOTE: job_set_submit_task_ids() is MT safe
jobscript_get_key() -- create a unique key
const char* jobscript_get_key(lListElem *jep, dstring *buffer)
Creates a unique key consisting of job_id and jobscript name This key can again be split into its components by a call to jobscript_parse_key()
u_long32 job_id - job id dstring *buffer - buffer
const char* - pointer to a static buffer containing the key. The result is only valid until the next call of the function.
MT-NOTE: jobscript_get_key() is MT safe
jobscript_parse_key() -- parse a key generated by job_get_key()
const char * job_parse_key(char *key, const char **exec_file)
Parse a key generated by jobscript_get_key()
char *key - key to be parsed onst char **exec_file - exec_file name to unlink
const char * the database job key
MT-NOTE: jobscript_parse_key() is MT safe
job_is_binary() -- Was "job" job submitted with -b y?
bool job_is_binary(const lListElem *job)
This function returns true if "job" is a "binary" job which was e.g. submitted with qsub -b y
const lListELem *job - JB_Type element
bool - true or false
job_is_requesting_consumable() -- Is job requesting resources of type CONSUMABLE_JOB?
bool job_is_requesting_consumable(lListElem *jep, const char *resoure_name)
This function returns true if "job" is requesting a resource with type CONSUMABLE_JOB.
lListELem *jep - JB_Type element const char *resource_name - Name of resource
bool - true or false
JSV_Type - CULL job submission verification element
SGE_STRING(JSV_name) name of this element, no hashing because there are not much SGE_STRING(JSV_command) absolute path of the script SGE_STRING(JSV_pid) pid of the process SGE_REF(JSV_in) stdin to the process (type: FILE*) SGE_REF(JSV_out) stdout of the process (type: FILE*) SGE_REF(JSV_err) stderr of the process (type: FILE*) SGE_BOOL(JSV_has_to_restart) should we restart the ls script? SGE_LIST(JSV_incomplete) current values we got from the script SGE_LIST(JSV_complete) last complete set of send values SGE_ULONG(JSV_last_mod) last modification time of ls script
The attributes of this element show the state of a jsv script. A list of these elements is used in submit clients and master process.
jsv_create() -- creates a new JSV object and initializes its attributes
static lListElem * jsv_create(const char *name, const char *context, lList **answer_list, const char *jsv_url, const char *type, const char *user, const char *scriptfile)
Returns a new JSV instance.
const char *name - Name od the new JSV element const char *context - JSV_CONTEXT_CLIENT or thread name lList **answer_list - AN_Type list const char *jsv_url - JSV URL const char *type - type part of 'jsv_url' const char *user - user part of 'jsv_url' const char *scriptfile - path part of 'jsv_url'
static lListElem * - JSV_Type element
MT-NOTE: jsv_create() is MT safe
jsv_do_communication() -- Starts communicating with a JSV script
bool jsv_do_communication(sge_gdi_ctx_class_t *ctx, lListElem *jsv, lList **answer_list)
Start a communication cycle to verify one job. The job to be verified has to be store in 'jsv' as attribute 'JSV_new_job'. Depending on the response of the JSV instance certain attributes in the 'jsv' will be changes (JSV_restart, JSV_soft_shutdown, JSV_done, JSV_new_job)
sge_gdi_ctx_class_t *ctx - GE context lListElem *jsv - JSV_Type instance lList **answer_list - AN_Type list
bool - error state true - success false - error
MT-NOTE: jsv_do_communication() is MT safe
jsv_do_verify() -- verify a job using JSV's
bool jsv_do_verify(sge_gdi_ctx_class_t* ctx, const char *context, lListElem **job, lList **answer_list, bool holding_lock)
This function verifies a job specification using one or multiple JSVs. The 'context' string will be used to identify which JSV's should be executed. In commandline clients the string "JSV_CONTEXT_CLIENT" has to be passed to this function. In qmaster context the name of the thread which calls this function has to be provided. If multiple JSVs should be executed then the job specification of 'job' will be passed to the first JSV. This specification might be changed during the verification process. The result will be passed to the second JSV process which might also adjust job specification parameters. This will either continue until the last JSV returns successfully or until a JSV rejects the job. 'job' is input and output parameter. It might either be unchanged, partially changed or completely removed. Therfore 'job' might not be element in a list when the function is called. 'holding_lock' notifies the function that the calling function is holding the global lock. In that case the global lock will be released during the verification process. After that the global lock will be aquired again. This function will return 'true' if the verification process was successfull. In that case 'job' contains the job specification of the verified job with all adjustments which might have been requested during the verification process of all JSV's. If the job was rejected by one of the JSVs then the return value of this funtion will be 'false' and the answer list will eiter contain the error reason which was provided by the rejecting JSV script/binary or it will contain a uniform message that the job was rejected due to JSV verification. If the job is acceped or accepted with modifications the returned value will be 'true'.
sge_gdi_ctx_class_t* ctx - context object const char *context - JSV_CONTEXT_CLIENT or thread name lListElem **job - pointer or a job (JB_Type) lList **answer_list - answer_list for messages bool holding_lock - is the calling thread holding the global lock
bool - error state true - success job is accepted or accepted with modifications false - error job is rejected
MT-NOTE: jsv_do_verify() is MT safe
jsv_is_enabled() -- is JSV enabled in the given context
bool jsv_is_enabled(void)
Returns if there are active JSV instances which have to be triggered. As a side effect the function updates the JSV (restart) if the configuration setting changed in master.
void - NONE
bool - is jsv active true - there are active JSVs false - JSV is not configured
MT-NOTE: jsv_is_enabled() is MT safe
jsv_list_add() -- adds a new JSV
bool jsv_list_add(const char *name, const char *context, lList **answer_list, const char *jsv_url)
By calling this function a new JSV element will be registered internally. The JSV will be initialized with the values 'name", 'context', and 'jsv_url'. The 'name' and 'context' will be used to identify the JSV. In command line clients the 'context' string JSV_CONTEXT_CLIENT should be passed to this function. Within qmaster the name of the thread which calls this function sould be used as 'context' string. The JSV data structures will be initialized but the JSV is not started when this function returns. In case of any errors the 'answer_list' will be filled and the function will return with the value 'false' instead of 'true'.
const char *name - JSV name (used for error messages) const char *context - JSV context name (to identify this JSV) lList **answer_list - AN_Type answer list const char *jsv_url - JSV URL
bool - error state true - success false - false
MT-NOTE: jsv_list_add() is MT safe
jsv_list_remove() -- remove a JSV script
bool jsv_list_remove(const char *name, const char *context)
Remove all JSV scripts were 'name' and 'context' matches.
const char *name - name of a JSV script const char *context - JSV_CLIENT_CONTEXT or thread name
bool - error status true - success false - error
MT-NOTE: jsv_list_remove() is MT safe
jsv_list_remove_all() -- Remove all JSV elements
bool jsv_list_remove_all(void)
Remove all JSV elements from the global 'jsv_list'
void - None
bool - error state true - success false - failed
MT-NOTE: jsv_list_remove_all() is MT safe
jsv_list_update() -- update configuration and state of a JSV
bool jsv_list_update(const char *name, const char *context, lList **answer_list, const char *jsv_url)
A call to this function either updates the configuration and/or state of a existing JSV or it creates a new one. 'name' and 'context' are used to identify if the JSV already exists. If it does not exist then it will be created. If the JSV exists then it is tested if the provided 'jsv_url' is different from the jsv_url stored in the JSV element. In that case the provided 'jsv_url' will be used as new configuration value. If the JSV process is already running then it will be stopped. The process will also be stopped if the script file which was used to create the JSV process has been changed.
const char *name - name of the JSV element const char *context - context string which indentifies JSVs lList **answer_list - AN_Type answer list const char *jsv_url - JSV URL string
bool - error state true - success false - error
MT-NOTE: jsv_list_update() is not MT safe
jsv_send_command() -- sends a command to a JSV script
bool jsv_send_command(lListElem *jsv, lList **answer_list, const char *message)
Sends the 'message' to the 'jsv' script. If this fails then 'answer_list' will be filled.
lListElem *jsv - JSV element lList **answer_list - answer list const char *message - null terminated string
bool - error state true - success false - failed
MT-NOTE: jsv_send_command() is MT safe
jsv_start() -- Start a JSV isntance
bool jsv_start(lListElem *jsv, lList **answer_list)
A call to this function starts a new JSV instance if it is currently not running. Handles to pipe ends will be stored internally so that it is possible to communicate with the process which was started by this function.
lListElem *jsv - JSV_Type data structure lList **answer_list - AN_Type list where error messages are stored.
bool - error state true - success false - error
MT-NOTE: jsv_start() is not MT safe
jsv_url_parse() -- parses a JSV URL
bool jsv_url_parse(dstring *jsv_url, lList **answer_list, dstring *type, dstring *user, dstring *path, bool in_client)
This function parses the given 'jsv_url' and fills the dstring 'type', 'user' and 'path' with the parsed elements. If one of the elements was not specified with the JSV URL then the corresponding variable will not be changed. A JSV URL has following format: jsi_url := client_jsv_url | server_jsv_url ; server_jsi_url := [ type ":" ] [ user "@" ] path ; client_jsi_url := [ type ":" ] path ; Within client JSVs it is not allowed to specify a user. This function has to be used with value 'true' for the parameter 'in_client'. If an error happens during parsing then this function will fill 'answer_list' with a corresponding message and the function will return with value 'false' otherwiese 'true' will be returned.
dstring *jsv_url - dstring containing a JSV url lList **answer_list - answer_list dstring *type - "script" dstring *user - specified username or NULL dstring *path - absolute path to a script or binary bool in_client - true in commandline clients false within qmaster
bool - error state true - success false - error
MT-NOTE: jsv_url_parse() is MT safe
LS_Type - CULL load sensor element
SGE_STRING(LS_name) name of this load sensor, no hashing, we only have few loadsensors/host SGE_STRING(LS_command) absolute path of the ls script SGE_STRING(LS_pid) pid of the ls process SGE_REF(LS_in) stdin to the ls process (type: FILE*) SGE_REF(LS_out) stdout of the ls process (type: FILE*) SGE_REF(LS_err) stderr of the ls process (type: FILE*) SGE_BOOL(LS_has_to_restart) should we restart the ls script? SGE_ULONG(LS_tag) tag for internal use SGE_LIST(LS_incomplete) current values we got from the ls script SGE_LIST(LS_complete) last complete set of ls values SGE_ULONG(LS_last_mod) last modification time of ls script
The attributes of this element show the state of a load sensor. A list of these elements is used in the execd.
mailrec_parse() -- Parse a list of mail recipients
int mailrec_parse(lList **lpp, const char *mail_str)
Parse a list of mail recipients. user[@host][,user[@host],...]
lList **lpp - MR_Type list const char *mail_str - stringlist of mail recipients
int - error state 0 - success >0 - error
MT-NOTE: mailrec_parse() is MT safe
mailrec_unparse() -- Build a string of mail reipients
int mailrec_unparse(lList *head, char *mail_str, unsigned int mail_str_len)
Build a string of mail reipients ("user@host,user,...")
lList *head - MR_Type list char *mail_str - buffer to be filled unsigned int mail_str_len - size of buffer
int - error state 0 - success >0 - error
manop_is_manager() -- is a certain user manager?
bool manop_is_manager(const char *user_name)
Checks if the user given by user name is a manager.
const char *user_name - user name
bool - true or false
Operator/Manager should be a property of a user. Then the function would be user_is_manager - much more plausible
manop_is_operator() -- is a certain user operator?
bool manop_is_operator(const char *user_name)
Checks if the user given by user name is a operator. A manager is implicitly also an operator.
const char *user_name - user name
bool - true or false
Operator/Manager should be a property of a user. Then the function would be user_is_operator - much more plausible
Object Handling -- utilities for sgeobj object access
This module provides utility functions for accessing CULL objects, e.g. getting a string representation for fields, setting field contents from string representation etc.
Object-Typedefs -- typedefs for generic object handling
The enumeration sge_object_type defines different object and message types. The following types are defined: SGE_TYPE_ADMINHOST SGE_TYPE_CALENDAR SGE_TYPE_CKPT SGE_TYPE_CONFIG SGE_TYPE_GLOBAL_CONFIG SGE_TYPE_EXECHOST SGE_TYPE_JATASK SGE_TYPE_PETASK SGE_TYPE_JOB SGE_TYPE_JOB_SCHEDD_INFO SGE_TYPE_MANAGER SGE_TYPE_OPERATOR SGE_TYPE_SHARETREE SGE_TYPE_PE SGE_TYPE_PROJECT SGE_TYPE_CQUEUE SGE_TYPE_QINSTANCE SGE_TYPE_SCHEDD_CONF SGE_TYPE_SCHEDD_MONITOR SGE_TYPE_SHUTDOWN SGE_TYPE_MARK_4_REGISTRATION SGE_TYPE_SUBMITHOST SGE_TYPE_USER SGE_TYPE_USERSET SGE_TYPE_CUSER SGE_TYPE_CENTRY SGE_TYPE_ZOMBIE SGE_TYPE_SUSER SGE_TYPE_RQS SGE_TYPE_AR SGE_TYPE_JOBSCRIPT If usermapping is enabled, an additional object type is defined: SGE_TYPE_HGROUP The last value defined as obect type is SGE_TYPE_ALL.
object_append_field_to_dstring() -- object field to string
const char * object_append_field_to_dstring(const lListElem *object, lList **answer_list, dstring *buffer, const int nm, char string_quotes)
Returns a string representation of a given object attribute. If errors arrise they are returned in the given answer_list. Data will be created in the given dynamic string buffer. For some fields a special handling is implemented, e.g. mapping bitfields to string lists.
const lListElem *object - object to use lList **answer_list - used to return error messages dstring *buffer - buffer used to format the result const int nm - attribute to output char string_quotes - character to be used for string quoting '\0' means no quoting
const char * - string representation of the attribute value (pointer to the string in the dynamic string buffer, or NULL if an error occured.
For sublists, subobjects and references NULL is returned.
For the handled special cases, the dstring is cleared, the default handling appends to the dstring buffer.
object_append_raw_field_to_dstring() -- object field to string
const char * object_append_raw_field_to_dstring(const lListElem *object, lList **answer_list, dstring *buffer, const int nm, char string_quotes)
Returns a string representation of a given object attribute. If errors arrise they are returned in the given answer_list. Data will be created in the given dynamic string buffer. For some fields a special handling is implemented, e.g. mapping bitfields to string lists.
const lListElem *object - object to use lList **answer_list - used to return error messages dstring *buffer - buffer used to format the result const int nm - attribute to output char string_quotes - character to be used for string quoting '\0' means no quoting
const char * - string representation of the attribute value (pointer to the string in the dynamic string buffer, or NULL if an error occured.
For sublists, subobjects and references NULL is returned.
For the handled special cases, the dstring is cleared, the default handling appends to the dstring buffer.
object_delete_range_id() -- del certain id from an range_list
void object_delete_range_id(lListElem *object, lList **answer_list, const int rnm, const u_long32 id)
Deletes a certain id from an objects sublist that is a range list.
lListElem *object - the object to handle lList **answer_list - error messages will be put here const int rnm - attribute containing the range list const u_long32 id - id to delete
object_get_name_prefix() -- get prefix of cull attribute name
const char * object_get_name_prefix(const lDescr *descr, dstring *buffer)
Returns the prefix that is used in attribute names characterizing the object type (e.g. "QU_" for the QU_Type).
const lDescr *descr - object type to use dstring *buffer - buffer that is used to return the result
const char * - the prefix or NULL, if an error occured
object_get_name_prefix(QU_Type, buffer) = "QU_" object_get_name_prefix(JB_Type, buffer) = "JB_"
The function relies on object_get_primary_key. This function only is implemented for some object types. For types not handled in object_get_primary_key, NULL will be returned.
object_get_primary_key() -- get primary key for object type
int object_get_primary_key(const lDescr *descr)
Returns the primary key field for a given object type.
const lDescr *descr - the object type (descriptor)
int - name (nm) of the primary key field or NoName (-1) on error.
Only implemented for selected object types. It would be better to have the necessary data in the object description, e.g. via a field property CULL_PRIMARY_KEY. Function interface breaks style guide - either we would have to pass an object, or call it descr_get_primary_key.
object_get_type() -- return type (descriptor) for object
const lDescr * object_get_type(const lListElem *object)
Returns the cull type (descriptor) for a certain object. This descriptor can be different from the objects descriptor, as the objects descriptor can come from an object created from communication, can be a partial descriptor etc.
const lListElem *object - the object to analyze
const lDescr * - the object type / descriptor
object_has_type() -- has an object a certain type?
bool object_has_type(const lListElem *object, const lDescr *descr)
Checks if an object has a certain type. The check is done by looking up the primary key field in descr and checking, if this key field is contained in the given object.
const lListElem *object - object to check const lDescr *descr - type to check against
bool - true, if the object has the given type, else false
As looking up the primary key of an object is only implemented for selected types, this function also will work only for these object types.
object_name_get_type() -- Return type id of a certain object
sge_object_type object_name_get_type(const char *name)
returns the type id a an object given by "name" We allow to pass in names in the form <object_name>:<key>, e.g. USERSET:deadlineusers.
const char *name - object name
sge_object_type - type of the object
MT-NOTE: object_name_get_type() is MT safe
object_parse_field_from_string() -- set object attr. from str
bool object_parse_field_from_string(lListElem *object, lList **answer_list, const int nm, const char *value)
Sets a new value for a certain object attribute. The new value is passed as parameter in string format. For some fields a special handling is implemented, e.g. mapping string lists to bitfields.
lListElem *object - the object to change lList **answer_list - used to return error messages const int nm - the attribute to change const char *value - the new value
bool - true on success, false, on error, error description in answer_list
Sublists, subobjects and references cannot be set with this function.
object_parse_raw_field_from_string() -- set object attr. from str
bool object_parse_raw_field_from_string(lListElem *object, lList **answer_list, const int nm, const char *value)
Sets a new value for a certain object attribute. The new value is passed as parameter in string format.
lListElem *object - the object to change lList **answer_list - used to return error messages const int nm - the attribute to change const char *value - the new value
bool - true on success, false, on error, error description in answer_list
Sublists, subobjects and references cannot be set with this function.
object_set_range_id() -- store the initial range ids in "job"
int object_set_range_id(lListElem *job, u_long32 start, u_long32 end, u_long32 step)
The function stores the initial range id values ("start", "end" and "step") in the range list of an object. It should only be used in functions initializing objects range lists.
lListElem *object - object to handle const int rnm - attribute containing the range list u_long32 start - first id u_long32 end - last id u_long32 step - step size
int - 0 -> OK 1 -> no memory
MT-NOTE: object_set_range_id() is MT safe
object_type_free_master_list() -- free the master list
bool object_type_free_master_list(const sge_object_type type)
Frees the masterlist for a certain type of objects.
const sge_object_type type - the object type
bool - true, if the list existed and could be freed, else false
object_type_get_descr() -- get the descriptor for an event type
const lDescr* object_type_get_descr(const sge_object_type type)
Returns the CULL element descriptor for the object type associated with the given event.
const sge_object_type type - the event type
const lDescr* - the descriptor, or NULL, if no descriptor is associated with the type
object_type_get_descr(SGE_TYPE_JOB) will return the descriptor JB_Type, object_type_get_descr(SGE_TYPE_SHUTDOWN) will return NULL
object_type_get_key_nm() -- get the primary key attribute for type
int object_type_get_key_nm(const sge_object_type type)
Returns the primary key attribute for the object type associated with the given event type.
const sge_object_type type - event type
int - the key number (struct element nm of the descriptor), or -1, if no object type is associated with the event type
object_type_get_key_nm(SGE_TYPE_JOB) will return JB_job_number object_type_get_key_nm(SGE_TYPE_SHUTDOWN) will return -1
object_type_get_master_list() -- get master list for object type
lList** object_type_get_master_list(const sge_object_type type)
Returns a pointer to the master list holding objects of the given type.
const sge_object_type type - the object type
lList** - the corresponding master list, or NULL, if the object type has no associated master list
object_type_get_master_list(SGE_TYPE_JOB) will return a pointer to the Master_Job_List. object_type_get_master_list(SGE_TYPE_SHUTDOWN) will return NULL, as this object type has no associated master list.
object_type_get_name() -- get a printable name for event type
const char* object_type_get_name(const sge_object_type type)
Returns a printable name for an event type.
const sge_object_type type - the event type
const char* - string describing the type
object_type_get_name(SGE_TYPE_JOB) will return "JOB"
sge_master_list() -- get master list for object type
lList** sge_master_list(const object_description *object_base, const sge_object_type type)
Returns a pointer to the master list holding objects of the given type.
const sge_object_type type - the object type
lList** - the corresponding master list, or NULL, if the object type has no associated master list
object_type_get_master_list(SGE_TYPE_JOB) will return a pointer to the Master_Job_List. object_type_get_master_list(SGE_TYPE_SHUTDOWN) will return NULL, as this object type has no associated master list.
RN_Type - CULL path alias element
SGE_STRING(PA_origin) original path SGE_HOST(PA_submit_host) submit hostname SGE_HOST(PA_exec_host) destination execution host SGE_STRING(PA_translation) path translation for the original path
CULL element holding information necessary to realize path aliasing. (Find more information in the --PathAlias ADOC comment)
PathAlias - Path aliasing mechanism for SGE/EE
Sometimes the directory structure on the different submit, execution hosts is not exactly the same. This makes it necessary to map certain paths for specific hosts. The administrators/users have the possibility to activate path aliasing by creating one or more of following files: $SGE_ROOT/$CELL/common/sge_aliases $HOME/.sge_aliases The file format is documentied in the ADOC commet for the function path_alias_read_from_file(). The files are interpreted as follows: - after a submit client (qsub, qmon, ...) has retrieved the current working directory, the cluster global path aliasing file is read, if present. The user path aliasing file is read afterwards, as if it were appended to the global file. - as soon as both files are read, the path aliasing information is passed along with the submitted job. - On the execution host the aliasing information will be evaluated. The leading part of the current working directory will be replaced if the execution host entry of the path alias matches the executing host.
path_alias_list_get_path() -- map path according alias table
int path_alias_list_get_path(const lList *path_aliases, lList **alpp, const char *inpath, const char *myhost, char *outpath, int outmax)
"path_aliases" is used to map "inpath" for the host "myhost" into its alias path which will be written into the buffer "outpath" of size "outmax".
const lList *path_aliases - alias table (PA_Type) lList **alpp - AN_Type list pointer const char *inpath - input path const char *myhost - hostname char *outpath - result path int outmax - size of "outpath"
int - return state 0 - OK
MT-NOTE: path_alias_list_get_path() is MT safe
path_alias_list_initialize() -- initialize path_alias_list
int path_alias_list_initialize(lList **path_alias_list, lList **alpp, const char *user, const char *host)
Intitialize "path_alias_list" according to the different path aliasing files. Following files will be used if available: $SGE_ROOT/$CELL/common/sge_aliases $HOME/.sge_aliases
lList **path_alias_list - PA_Type list pointer lList **alpp - AN_Type list pointer const char *user - username const char *host - hostname
int - return state -1 - error 0 - OK
MT-NOTE: path_alias_list_initialize() is MT safe
path_alias_read_from_file() -- read file content to list
#include <sgeobj/sge_path_alias.h> static int path_alias_read_from_file(lList **path_alias_list, lList **alpp, char *file_name)
Read and parse the file with the name "file_name" and append entries into "path_alias_list". Errors will be logged in "alpp". File format: - Blank lines and lines beginning with a # sign in the first column are skipped. - Each line - other than a blank line or a line preceded by # - must contain four strings separated by any number of blanks or tabs. - The first string specifies a source path, the second a submit host, the third an execution host, and the fourth the source path replacement. - Both the submit and the execution host entries may consist of only a * sign, which matches any host.
lList **path_alias_list - PA_Type list pointer lList **alpp - AN_Type list pointer char *file_name - name of an alias file
static int - error state -1 - Error 0 - OK
MT-NOTE: path_alias_read_from_file() is MT safe
PE_Type -- CULL
SGE_STRING(PE_name) name of the pe SGE_ULONG(PE_slots) number of total slots SGE_LIST(PE_user_list) US_Type; list of allowed users SGE_LIST(PE_xuser_list) US_Type; list of not allowed users SGE_STRING(PE_start_proc_args) cmd line sequence for starting the pe SGE_STRING(PE_stop_proc_args) cmd line sequence for stopping the pe SGE_STRING(PE_allocation_rule) number of processors per machine SGE_BOOL(PE_control_slaves) whether slave tasks get fed into execd SGE_BOOL(PE_job_is_first_task) whether the job script also starts first task like with pvm or job script is just a starter doing no work like with mpi, dmake --> has only a meaning when PE_control_slaves is true SGE_LIST(PE_resource_utilization, RUE_Type) internal field; used only to store number used slots this field gets not spooled, updated dynamically SGE_STRING(PE_urgency_slots) Specifies what slot amount shall be used when computing jobs static urgency in case of jobs with slot range PE requests. The actual problem is that when determining the urgency number the number of slots finally assigned is not yet known. The following settings are supported: min/max/avg/<fixed integer> SGE_STRING(PE_qsort_args) Specifies the dynamic library, function name, and string arguments that should be called instead of the queue sort function once the candidate queues for a job have been located. The format is: library_name function_name [strings_arguments ...]. The entire string is passed to the function as the second argument. NOTE: This is only available when compiled with -DSGE_PQS_API SGE_BOOL(PE_accounting_summary) For tightly integrated parallel jobs. Specifies if a single accounting record is written for the whole job, or if every task gets an individual accounting record.
pe_create_template -- build up a generic pe object
lListElem *pe_create_template(char *pe_name);
build up a generic pe object
pe_name - name used for the PE_name attribute of the generic pe object. If NULL then "template" is the default name.
!NULL - Pointer to a new CULL object of type PE_Type NULL - Error
MT-NOTE: pe_set_slots_used() is MT safe
pe_debit_slots() -- Debit pos/neg number of slots from PE
void pe_debit_slots(lListElem *pep, int slots, u_long32 job_id)
Increases or decreses the number of slots used with a PE.
lListElem *pep - The PE (PE_Type) int slots - Pos/neg number of slots. u_long32 job_id - Job id for monitoring purposes.
MT-NOTE: pe_debit_slots() is MT safe
pe_is_matching() -- Does Pe name match the wildcard?
bool pe_is_matching(const lListElem *pe, const char *wildcard)
The function returns true (1) if the name of the given "pe" matches the "wildcard".
const lListElem *pe - PE_Type element const char *wildcard - wildcard
bool - true or false
pe_is_referenced() -- Is a given PE referenced in other objects?
bool pe_is_referenced(const lListElem *pe, lList **answer_list, const lList *master_job_list, const lList *master_cqueue_list)
This function returns true (1) if the given "pe" is referenced in at least one of the objects contained in "master_job_list" or "master_cqueue_list". If this is the case than a corresponding message will be added to the "answer_list".
const lListElem *pe - PE_Type object lList **answer_list - AN_Type list const lList *master_job_list - JB_Type list const lList *master_cqueue_list - CQ_Type list
bool - true or false
pe_list_do_all_exist() -- Check if a list of PE's really exists
bool pe_list_do_all_exist(const lList *pe_list, lList **answer_list, const lList *pe_ref_list, bool ignore_make_pe)
Check if all PE's in "pe_ref_list" really exist in "pe_list". If "ignore_make_pe" is 'true' than the test for the PE with the name "make" will not be done.
const lList *pe_list - PE_Type list lList **answer_list - AN_Type list const lList *pe_ref_list - ST_Type list of PE names bool ignore_make_pe - bool
bool true - if all PE's exist false - if at least one PE does not exist
MT-NOTE: pe_urgency_slots() is MT safe
pe_list_find_matching() -- Find a PE matching wildcard expr
const lListElem* pe_list_find_matching(lList *pe_list, const char *wildcard)
Try to find a PE that matches the given "wildcard" expression.
const lList *pe_list - PE_Type list const char *wildcard - Wildcard expression
lListElem* - PE_Type object or NULL
pe_list_locate() -- Locate a certain PE
lListElem* pe_list_locate(lList *pe_list, const char *pe_name)
Locate the PE with the name "pe_name".
lList *pe_list - PE_Type list const char *pe_name - PE name
lListElem* - PE_Type object or NULL
MT-NOTE: pe_list_locate() is MT safe
pe_set_slots_used() -- Set number of used PE slots
int pe_set_slots_used(lListElem *pe, int slots)
Sets the number of used PE slots.
lListElem *pe - The pe object (PE_Type) int slots - Number of slots.
int - 0 on success -1 on error
MT-NOTE: pe_set_slots_used() is MT safe
pe_get_slots_used() -- Returns used PE slots
int pe_get_slots_used(const lListElem *pe)
Returns the number of currently used PE slots.
const lListElem *pe - The PE object (PE_Type)
int - number of currently used PE slots or -1 on error
MT-NOTE: pe_get_slots_used() is MT safe
pe_urgency_slots() -- Compute PEs urgency slot amount for a slot range
int pe_urgency_slots(const lListElem *pe, const char *urgency_slot_setting, const lList* range_list)
Compute PEs urgency slot amount for a slot range. The urgency slot amount is the amount that is assumed for a job with a slot range before an assignment.
const lListElem *pe - PE_Type object. const char *urgency_slot_setting - Ugency slot setting as in sge_pe(5) const lList* range_list - RN_Type list.
int - The slot amount.
MT-NOTE: pe_urgency_slots() is MT safe
pe_validate() -- validate a parallel environment
int pe_validate(int startup, lListElem *pep, lList **alpp)
Ensures that a new pe is not a duplicate of an already existing one and checks consistency of the parallel environment: - pseudo parameters in start and stop proc - validity of the allocation rule - correctness of the queue list, the user list and the xuser list
lListElem *pep - the pe to check lList **alpp - answer list pointer, if an answer shall be created, else NULL - errors will in any case be output using the Grid Engine error logging macros. int startup - are we in qmaster startup phase?
int - STATUS_OK, if everything is ok, else other status values, see libs/gdi/sge_answer.h
MT-NOTE: pe_validate() is not MT safe
pe_validate_qsort_args() -- Ensures the qsort_args setting is valid by verifying that the dynamic link library can be loaded. This function is presumably called during startup and whenever a PE is created or modified.
int pe_validate_qsort_args(lList **alpp, const char *qsort_args, lListElem *pe, void **lib, void **fn)
Validates urgency slot setting.
lList **alpp - On error a context message is returned. const char *qsort_args - The qsort_args string lListElem *pe - The new or existing PE void **lib - The returned handle of the dynamically linked library void **fn - The returned address of the dynamically linked function
int - values other than STATUS_OK indicate error condition
MT-NOTE: pe_validate_qsort_args() is not MT safe
pe_validate_slots() -- Ensure urgency slot setting is valid.
int pe_validate_slots(lList **alpp, u_long32 slots)
Validates slot setting.
lList **alpp - On error a context message is returned. u_long32 slots - The slots value.
int - values other than STATUS_OK indicate error condition
MT-NOTE: pe_validate_slots() is MT safe
pe_validate_urgency_slots() -- Ensure urgency slot setting is valid.
int pe_validate_urgency_slots(lList **alpp, const char *s)
Validates urgency slot setting.
lList **alpp - On error a context message is returned. const char *s - The urgency slot string to be validated.
int - values other than STATUS_OK indicate error condition
MT-NOTE: pe_validate_urgency_slots() is MT safe
PET_Type - CULL pe task request element
Job identification ================== SGE_ULONG(PETR_jobid) SGE_ULONG(PETR_jataskid) Submission information ====================== SGE_STRING(PETR_queuename) SGE_STRING(PETR_owner) SGE_STRING(PETR_cwd) SGE_LIST(PETR_path_aliases) SGE_LIST(PETR_environment) Time information ================ SGE_ULONG(PETR_submission_time)
Objects of PETR_Type are used to request the start of a task in a tightly integrated parallel job.
PET_Type - CULL pe task request element
Job identification ================== SGE_ULONG(PETR_jobid) SGE_ULONG(PETR_jataskid) Submission information ====================== SGE_STRING(PETR_queuename) SGE_STRING(PETR_owner) SGE_STRING(PETR_cwd) SGE_LIST(PETR_path_aliases) SGE_LIST(PETR_environment) Time information ================ SGE_ULONG(PETR_submission_time)
Objects of PETR_Type are used to request the start of a task in a tightly integrated parallel job.
PET_Type - CULL pe task request element
Job identification ================== SGE_ULONG(PETR_jobid) SGE_ULONG(PETR_jataskid) Submission information ====================== SGE_STRING(PETR_queuename) SGE_STRING(PETR_owner) SGE_STRING(PETR_cwd) SGE_LIST(PETR_path_aliases) SGE_LIST(PETR_environment) Time information ================ SGE_ULONG(PETR_submission_time)
Objects of PETR_Type are used to request the start of a task in a tightly integrated parallel job.
PET_Type - CULL pe task element
Job identification ================== SGE_STRING(PET_id) The pe task id. It is unique per job. SGE_STRING(PET_name) Optional name of a pe task. Not yet completely implemented, but it could be used to pass information to be shown by qstat. Runtime control information =================== SGE_ULONG(PET_status) Status of the pe job, see defines in libs/gdi/sge_jobL.h. SGE_LIST(PET_granted_destin_identifier_list) Granted destination identifier list. Will contain one entry specifying the queue the pe task runs in. SGE_ULONG(PET_pid) Pid of a running pe task (process group id). SGE_STRING(PET_osjobid) os jobid of a running pe task. Usage information ================= SGE_LIST(PET_usage) SGE_LIST(PET_scaled_usage) SGE_LIST(PET_previous_usage) Time information ================ SGE_ULONG(PET_submission_time) SGE_ULONG(PET_start_time) SGE_ULONG(PET_end_time) Submission information ====================== SGE_STRING(PET_cwd) Current working directory of the pe task. If not set, the cwd from the ja task is inherited. SGE_LIST(PET_path_aliases) Path alias list for the pe task. SGE_LIST(PET_environment) Environment variables exported to the pe task. They will overwrite inherited variables from the ja task.
PET_Type objects are used to store information about tasks of tightly integrated parallel jobs (started with qrsh -inherit). Parallel tasks are sub objects of array tasks (even for non array jobs one pseudo array task is created). +---------+ 1:x +----------+ 1:x +----------+ | JB_Type |<------->| JAT_Type |<------->| PET_Type | +---------+ +----------+ +----------+
PET_Type - CULL pe task element
Job identification ================== SGE_STRING(PET_id) The pe task id. It is unique per job. SGE_STRING(PET_name) Optional name of a pe task. Not yet completely implemented, but it could be used to pass information to be shown by qstat. Runtime control information =================== SGE_ULONG(PET_status) Status of the pe job, see defines in libs/gdi/sge_jobL.h. SGE_LIST(PET_granted_destin_identifier_list) Granted destination identifier list. Will contain one entry specifying the queue the pe task runns in. SGE_ULONG(PET_pid) Pid of a running pe task (process group id). SGE_STRING(PET_osjobid) os jobid of a running pe task. Usage information ================= SGE_LIST(PET_usage) SGE_LIST(PET_scaled_usage) SGE_LIST(PET_previous_usage) Time information ================ SGE_ULONG(PET_submission_time) SGE_ULONG(PET_start_time) SGE_ULONG(PET_end_time) Submission information ====================== SGE_STRING(PET_cwd) Current working directory of the pe task. If not set, the cwd from the ja task is inherited. SGE_LIST(PET_path_aliases) Path alias list for the pe task. SGE_LIST(PET_environment) Environment variables exported to the pe task. They will overwrite inherited variables from the ja task.
PET_Type objects are used to store information about tasks of tightly integrated parallel jobs (started with qrsh -inherit). Parallel tasks are sub objects of array tasks (even for non array jobs one pseudo array task is created). +---------+ 1:x +----------+ 1:x +----------+ | JB_Type |<------->| JAT_Type |<------->| PET_Type | +---------+ +----------+ +----------+
PET_Type - CULL pe task element
Job identification ================== SGE_STRING(PET_id) The pe task id. It is unique per job. SGE_STRING(PET_name) Optional name of a pe task. Not yet completely implemented, but it could be used to pass information to be shown by qstat. Runtime control information =================== SGE_ULONG(PET_status) Status of the pe job, see defines in libs/gdi/sge_jobL.h. SGE_LIST(PET_granted_destin_identifier_list) Granted destination identifier list. Will contain one entry specifying the queue the pe task runns in. SGE_ULONG(PET_pid) Pid of a running pe task (process group id). SGE_STRING(PET_osjobid) os jobid of a running pe task. Usage information ================= SGE_LIST(PET_usage) SGE_LIST(PET_scaled_usage) SGE_LIST(PET_previous_usage) Time information ================ SGE_ULONG(PET_submission_time) SGE_ULONG(PET_start_time) SGE_ULONG(PET_end_time) Submission information ====================== SGE_STRING(PET_cwd) Current working directory of the pe task. If not set, the cwd from the ja task is inherited. SGE_LIST(PET_path_aliases) Path alias list for the pe task. SGE_LIST(PET_environment) Environment variables exported to the pe task. They will overwrite inherited variables from the ja task.
PET_Type objects are used to store information about tasks of tightly integrated parallel jobs (started with qrsh -inherit). Parallel tasks are sub objects of array tasks (even for non array jobs one pseudo array task is created). +---------+ 1:x +----------+ 1:x +----------+ | JB_Type |<------->| JAT_Type |<------->| PET_Type | +---------+ +----------+ +----------+
pe_task_sum_past_usage() -- sum up pe tasks past usage
lListElem* pe_task_sum_past_usage(lListElem *container, const lListElem *pe_task)
The pe task list of a ja task can contain one container element to hold the usage of finished pe tasks no longer stored in the task list. This function adds the usage of pe_task to the usage of container.
lListElem *container - container object to hold past usage const lListElem *pe_task - the pe task from which to copy usage
lListElem* - the container object
pe_task_sum_past_usage_all() -- sum up all pe tasks past usage
lListElem* pe_task_sum_past_usage_all(lList *pe_task_list)
Similar to pe_task_sum_past_usage, but will sum up the usage of all pe tasks in a task list to the container object in this list. If the container object does not yet exist, it will be created.
lList *pe_task_list - the pe task list to process
lListElem* - the container object
pe_task_sum_past_usage_list() -- sum up pe tasks past usage
lListElem* pe_task_sum_past_usage_list(lList *pe_task_list, const lListElem *pe_task)
Similar to pe_task_sum_past_usage. The container is retrieved from pe_task_list, if it does not yet exist it is created and inserted into pe_task_list as first element.
lList *pe_task_list - list containing the container object const lListElem *pe_task - the pe task from which to copy usage
lListElem* - the container object
qinstance_check_owner() -- check if a user is queue owner
bool qinstance_check_owner(const lListElem *queue, const char *user_name)
Checks if the given user is an owner of the given queue. Managers and operators are implicitly owner of all queues.
const lListElem *queue - the queue to check const char *user_name - the user name to check
bool - true, if the user is owner, else false
qinstance_debit_consumable() -- Debits/Undebits consumables
int qinstance_debit_consumable(lListElem *qep, lListElem *jep, lList *centry_list, int slots)
Checks if there are nonstatic load values avaialable for the qinstance. If this is the case, then then the "unknown" state of that machine will be released.
lListElem *qep - Qinstance resource container lListElem *jep - The job (JB_Type) defining which resources and how much of them need to be (un)debited lList *centry_list - The global complex list that is needed to interpret the jobs' resource requests. int slots - The number of slots for which we are debiting. Positive slots numbers cause debiting, negative ones cause undebiting.
Returns -1 in case of an error. Otherwise the number of (un)debitations that actually took place is returned. If 0 is returned that means the consumable resources of the 'ep' object has not changed.
MT-NOTE: qinstance_debit_consumable() is MT safe
qinstance_get_name() -- returns the fullname of a qinstance object
const char * qinstance_get_name(const lListElem *this_elem, dstring *string_buffer)
Returns the fullname of a qinstance object
const lListElem *this_elem - QU_Type dstring *string_buffer - dynamic string buffer
const char * - pointer to the internal string buffer of "string_buffer"
MT-NOTE: qinstance_get_name() is MT safe
qinstance_increase_qversion() -- increase the qinstance queue version
void qinstance_increase_qversion(lListElem *this_elem)
Increase the queue version of the given qinstance "this_elem".
lListElem *this_elem - QU_Type element
void - None
MT-NOTE: qinstance_increase_qversion() is MT safe
qinstance_is_a_ckpt_referenced() -- Is an CKPT object referenced
bool qinstance_is_a_ckpt_referenced(const lListElem *this_elem)
Is an CKPT object referenced in "this_elem".
const lListElem *this_elem - CKPT_Type element
bool - test result true - a CKPT is referenced false - no CKPT is referenced
MT-NOTE: qinstance_is_a_ckpt_referenced() is MT safe
qinstance_is_a_pe_referenced() -- is a PE referenced
bool qinstance_is_a_pe_referenced(const lListElem *this_elem)
Test is at least one PE is referenced by qinstance "this_elem"
const lListElem *this_elem - QU_Type
bool - test result true - an PE is referenced false - no PE is referenced ("NONE")
MT-NOTE: qinstance_is_a_pe_referenced() is MT safe
qinstance_is_calendar_referenced() -- is the calendar referenced
bool qinstance_is_calendar_referenced(const lListElem *this_elem, const lListElem *calendar)
Is the "calendar" referenced in the qinstance "this_elem".
const lListElem *this_elem - QU_Type element const lListElem *calendar - CAL_Type element
bool - test result true - is referenced false - is not referenced
MT-NOTE: qinstance_is_calendar_referenced() is MT safe
qinstance_is_centry_a_complex_value() -- Is it a complex_value
bool qinstance_is_centry_a_complex_value(const lListElem *this_elem, const lListElem *centry)
Is the given "centry" in the list of complex_values of "this_elem".
const lListElem *this_elem - QU_Type element const lListElem *centry - CE_Type element
bool - test result true - it is a complex value false - no complex value
MT-NOTE: qinstance_is_centry_a_complex_value() is MT safe
qinstance_is_ckpt_referenced() -- Is the CKTP referenced
bool qinstance_is_ckpt_referenced(const lListElem *this_elem, const lListElem *ckpt)
Tests if the given CKPT object ("ckpt") is referenced in the qinstance "this_elem".
const lListElem *this_elem - QU_Type element const lListElem *ckpt - CKPT_Type element
bool - test result true - CKPT is referenced false - CKPT is not referenced
MT-NOTE: qinstance_is_ckpt_referenced() is MT safe
qinstance_is_pe_referenced() -- Is the PE object referenced
bool qinstance_is_pe_referenced(const lListElem *this_elem, const lListElem *pe)
Is the given PE ("pe") referenced in the qinstance element "this_elem".
const lListElem *this_elem - QU_Type element const lListElem *pe - PE_Type element
bool - test result true - is referenced false - is not referenced
MT-NOTE: qinstance_is_pe_referenced() is MT safe
qinstance_list_find_matching() -- find certain qinstances
bool qinstance_list_find_matching(const lList *this_list, lList **answer_list, const char *hostname_pattern, lList **qref_list)
Finds all qinstances in "this_list" whose hostname part matches the "hostname_pattern" (fnmatch pattern) and stores the qinstance name in "qref_list". In case of any error "answer_list" will be filled.
const lList *this_list - QU_Type list lList **answer_list - AN_Type list const char *hostname_pattern - fnmatch hostname pattern lList **qref_list - QR_Type list
bool - error result true - success
MT-NOTE: qinstance_list_find_matching() is MT safe
qinstance_list_locate() -- find a qinstance
lListElem * qinstance_list_locate(const lList *this_list, const char *hostname, const char *cqueue_name)
Find a qinstance in "this_list" which is part of the cluster queue with the name "cqueue_name" and resides on the host with the name "hostname".
const lList *this_list - QU_Type list const char *hostname - hostname const char *cqueue_name - cluster queue name
lListElem * - QU_Type element
MT-NOTE: qinstance_list_locate() is MT safe
qinstance_list_locate2() -- find a qinstance using the fullname
lListElem * qinstance_list_locate2(const lList *queue_list, const char *full_name)
find a qinstance using the fullname
const lList *queue_list - QU_Type list const char *full_name - fullname of the qinstance (<cqueue>@<hostname>)
lListElem * - QU_type element
MT-NOTE: qinstance_list_locate2() is MT safe
qinstance_list_set_tag() -- tag a list of qinstances
void qinstance_list_set_tag(lList *this_list, u_long32 tag_value)
Tag a list of qinstances ("this_list") with "tag_value".
lList *this_list - QU_Type list u_long32 tag_value - unsingned long value (not a bitmask)
void - None
MT-NOTE: qinstance_list_set_tag() is MT safe
qinstance_list_validate() -- validates and initializes qinstances
bool qinstance_list_validate(lList *this_list, lList **answer_list)
Validates qinstances attributes and initializes them if necessary.
lList *this_list - QU_Type list lList **answer_list - AN_Type
void - error result true - success false - error
MT-NOTE: qinstance_list_validate() is MT safe
qinstance_message_add() -- Adds a message to the qinstance structure
bool qinstance_message_add(lListElem *this_elem, u_long32 type, const char *message)
Adds a message to the qinstance structure
lListElem *this_elem - QU_Type u_long32 type - message type const char *message - message
bool - error state true - success false - error
MT-NOTE: qinstance_message_add() is MT safe
qinstance_message_trash_all_of_type_X() -- Trash messages
bool qinstance_message_trash_all_of_type_X(lListElem *this_elem, u_long32 type)
Removes all messages with the message "type" id.
lListElem *this_elem - QU_Type u_long32 type - message type
bool - error state true - success false - error
MT-NOTE: qinstance_message_trash_all_of_type_X() is MT safe
qinstance_set_full_name() -- set the full name of the qinstance
void qinstance_set_full_name(lListElem *this_elem)
Set the full name of the qinstance. The QU_qname name attribute will be used as input for the cqueue part and QU_qhostname as hostname part of the full name.
lListElem *this_elem - QU_Type
void - NONE
MT-NOTE: qinstance_set_full_name() is MT safe
qinstance_set_slots_used() -- Modifies the number of used slots
void qinstance_set_slots_used(lListElem *this_elem, int new_slots)
Modifies the number of used slots
lListElem *this_elem - QU_Type int new_slots - new slot value
void - NONE
MT-NOTE: qinstance_set_slots_used() is MT safe
qinstance_slots_reserved() -- the number of maximal reserved slots
int qinstance_slots_reserved(const lListElem *this_elem)
Returns the number of maximal reserved slots by all advance reservations
const lListElem *this_elem - QU_Type element
int - number of slots
MT-NOTE: qinstance_slots_reserved() is MT safe
qinstance_slots_used() -- Returns the number of currently used slots
int qinstance_slots_used(const lListElem *this_elem)
Returns the number of currently used slots.
const lListElem *this_elem - QU_Type element
int - number of slots
MT-NOTE: qinstance_slots_used() is MT safe
qinstance_validate() -- validates and initializes qinstances
bool qinstance_validate(lListElem *this_elem, lList **answer_list)
Validates qinstance attributes and initializes them if necessary.
lListElem *this_elem - QU_Type lList **answer_list - AN_Type
void - error result true - success false - error
MT-NOTE: qinstance_validate() is MT safe
qtype_append_to_dstring() -- Creates qtype bitmask as string
const char * qtype_append_to_dstring(u_long32 qtype, dstring *string)
This functions expects a "qtype" bitmask. Each bit represents a certain queue type. If it is set to 1 the corresponding type name will be appended to "string". If no bit is 1 than "NONE" will be appended to "string".
u_long32 qtype - bitmask dstring *string - string
const char * - pointer to the internal buffer of string
MT-NOTE: qtype_append_to_dstring() is MT safe
/---------------------------------------------------\ | exists | | | o-----> | |------->X | /-----------------\ | | | (suspended) | | | | | | | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !s | | | s | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !S | | | S | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !A | | | A | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !C | | | C | | | | | | <---------------| | | | | \--------/ | \-------/ | | | \-----------------/ | |- - - - - - - - - - - - - - - - - - - - - - - - - -| | /-----------------\ | | | (disabled) | | | | | | | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !u | | | u | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - - -| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !a | | | a | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - - -| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !d | | | d | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !D | | | D | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !E | | | E | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !c | | | c | | | | | | <---------------| | | | | \--------/ | \-------/ | | |- - - - - - - - - - - - - - - -|- - - - - - - - -|-| | /--------\ | /-------\ | | | o-----> | |---------------> | | | | | | !o | | | o | | | | | | <---------------| | | | | \--------/ | \-------/ | | | \-----------------/ | \---------------------------------------------------/ u := qinstance-host is unknown a := load alarm s := manual suspended A := suspended due to suspend_threshold S := suspended due to subordinate C := suspended due to calendar d := manual disabled D := disabled due to calendar c := configuration ambiguous o := orphaned P := preempted
qinstance_has_state() -- checks a qi for a given states
bool qinstance_has_state(const lListElem *this_elem, u_long32 bit)
Takes a state mask and a queue instance and checks wheather the queue is in at least one of the states. If the state mask contains U_LONG32_MAX the function will always return true.
const lListElem *this_elem - queue instance u_long32 bit - state mask
bool - true, if the queue instance has one of the requested states.
MT-NOTE: qinstance_has_state() is MT safe
qinstance_state_from_string() -- takes a state string and returns an int
u_long32 qinstance_state_from_string(const char* sstate)
Takes a string with character representations of the different states and generates a mask with the different states.
const char* sstate - each character one state lList **answer_list - stores error messages u_long32 filter - a bit filter for allowed states
u_long32 - new state or 0, if no state was set
MT-NOTE: qinstance_state_from_string() is MT safe
transition_is_valid_for_qinstance() -- is transition valid
bool transition_is_valid_for_qinstance(u_long32 transition, lList **answer_list)
Checks if the given transition is valid for a qinstance object. If the transition is valid, than true will be returned by this function.
u_long32 transition - transition id lList **answer_list - AN_Type list
bool - test result true - transition is valid false - transition is invalid
MT-NOTE: transition_is_valid_for_qinstance() is MT safe
qref_list_add() -- Add a queue reference to the list
bool qref_list_add(lList **this_list, lList **answer_list, const char *qref_string)
Add the queue reference "qref_string" to the QR_type list "this_list". Errors will be reported via return value and "answer_list".
lList **this_list - QR_Type lList **answer_list - AN_Type const char *qref_string - queue reference
bool - error state true - success false - error
qref_list_is_valid() -- check queue reference list
bool qref_list_is_valid(const lList *this_list, lList **answer_list)
This function will be used to check the hard and soft queue list. which will be defined during job submittion or redefined via qalter and qmon. This function will return successfull when: - queues are requestable and - if the contained queue-pattern matches at least one queue instance
const lList *this_list - QR_Type lList **answer_list - AN_Type
bool - error state true - success false - error
qref_list_resolve() -- resolves a list of queue reference patterns
bool qref_list_resolve(const lList *src_qref_list, lList **answer_list, lList **qref_list, bool *found_something, const lList *cqueue_list, const lList *hgroup_list, bool resolve_cqueue, bool resolve_qdomain)
Resolves a list of queue reference patterns. "src_qref_list" is the list of input patterns to be resolved. "qref_list" contains all resolved names which matched at least one of the given patterns. The master lists "cqueue_list" and "hgroup_list" are needed to resolve the pattern. "resolve_cqueue" and "resolve_qdomain" can be used to define how qreferenes are resolved. Examples: <CQ-pattern> (e.g. "*") resolve_cqueue == false => cq1 cq2 resolve_cqueue == true => cq1@hostA1 cq1@hostA2 cq1@hostB1 cq1@hostB2 cq2@hostA1 cq2@hostA2 cq2@hostB1 cq2@hostB2 <QD-pattern> (e.q "*@@hgrp*") resolve_qdomain == false => cq1@@hgrpA cq1@@hgrpB cq2@@hgrpA cq2@@hgrpB resolve_qdomain == true => cq1@hostA1 cq1@hostA2 cq1@hostB1 cq1@hostB2 cq2@hostA1 cq2@hostA2 cq2@hostB1 cq2@hostB2 <QI-pattern> (e.g "cq*@host?1") => cq1@hostA1 cq1@hostB1 cq2@hostA1 cq2@hostB1
const lList *src_qref_list - QR_Type list (input: pattern) lList **answer_list - AN_Type list lList **qref_list - QR_Type list (output: resolved qrefs) bool *found_something - a pattern matched? (output) const lList *cqueue_list - master CQ_Type list const lList *hgroup_list - master HGRP_Type list bool resolve_cqueue - resolve cqueue pattern? bool resolve_qdomain - resolve qdomain pattern?
bool - error state true - success false - error
qref_list_trash_some_elemts() -- Remove some elements from list
bool qref_list_trash_some_elemts(lList **this_list, const char *full_name)
Remove all elements from "this_list" where either the cluster queue name is equivalent with the cluster queue part of "fullname" or if the hostname is different from the hostname part of "fullname"
lList **this_list - QR_Type const char *full_name - queue instance name
bool - error state true - success false - error
RN_Type -- CULL range element
SGE_ULONG(RN_min) minimum or start value of an id range (e.g. 1) SGE_ULONG(RN_max) maximum or end value of an id range (e.g. 9) SGE_ULONG(RN_step) stepsize (e.g. 2)
CULL element holding values which define a id range (e.g. 1-9:2 => 1, 3, 5, 7, 9). Lists of this CULL element are held within a CULL job element (JB_Type) to hold job array task ids. Several functions may be used to access/modify/delete range elements and range lists. You may find them in the 'SEE ALSO' section. It is highly advised to use these access functions because they assure and require a defined structure of elements and lists. Range elements and lists stored in other CULL elements fulfil following conditions: - min <= max - step >= 1 - real range elements (e.g. 1-9:2 instead of 1-10:2) - min-ids within range elements part of the same list are in ascending order: min_id(n) < min_id(n+1) (e.g. NOT 11-20:1; 1-9:2) - ids within range elements part of the same list are non-overlapping: max_id(n) < min_id(n+1) (e.g. 1-9:2; 11-20:1; 25-28:3)
range_containes_id_less_than() -- is one id less than given id
bool range_containes_id_less_than(const lListElem *range, u_long32 id)
This function tests if at least one id in "range" is less than "id"
const lListElem *range - RN_Type element u_long32 id - number
bool - true or false
range_correct_end() -- correct end of a range element
static void range_correct_end(lListElem *this_range)
This function modifies the the 'end' id of the 'this_range' element if it is not correct. After the modification the 'end' id is the last valid id which is part of the range.
lListElem *this_range - RN_Type
'this_range' will be modified
1-6:2 (1,3,5) will be modified to 1-5:2
range_get_all_ids() -- reads 'start', 'end' and 'step'
void range_get_all_ids(const lListElem *range, u_long32 *min, u_long32 *max, u_long32 *step)
Reads 'min' (start), 'max' (end) and 'step' from a range element. If 'range' is NULL then 'min', 'max' and 'step' will be set to 0.
const lListElem *range - range element of type RN_Type u_long32 *min - start value u_long32 *max - end value u_long32 *step - step size
MT-NOTE: range_get_all_ids() is MT safe
range_get_number_of_ids() -- Number of ids within a range
u_long32 range_get_number_of_ids(const lList *this_elem)
This function determines the number of ids contained in 'this_elem'
const lList *this_elem - RN_Type element
u_long32 - number of ids
1-5:2 (1, 3, 5) => 3
range_is_id_within() -- Is id contained in range?
bool range_is_id_within(const lListElem *range, u_long32 id)
True is returned by this function if 'id' is part of 'range'
const lListElem *range - RN_Type element u_long32 id - id
bool - true or false
MT-NOTE: range_is_id_within() is MT safe
range_is_overlapping() -- Do two ranges interleave?
static bool range_is_overlapping(const lListElem *this_elem, const lListElem *range)
True will be returned when the given ranges interleave. This does not necessaryly mean that certain ids exist in both ranges.
const lListElem *this_elem - RN_Type const lListElem *range - RN_Type
static bool - false or true
1-5:3 4-10:7 => true 1-5:3 5-10:6 => true 1-5:3 6-10:4 => false
MT-NOTE: range_is_overlapping() is MT safe
range_list_calculate_difference_set() -- Difference set list
void range_list_calculate_difference_set(lList **range_list, lList **answer_list, const lList *range_list1, const lList *range_list2)
'range_list' will contain all ids part of 'range_list1' but not contained in 'range_list2'
lList **range_list - pointer to result RN_Type list lList **answer_list - pointer to AN_Type list const lList *range_list1 - first source RN_Type list const lList *range_list2 - second source RN_Type list
range_list_calculate_intersection_set() -- Intersection set
void range_list_calculate_intersection_set(lList **range_list, lList **answer_list, const lList *range_list1, const lList *range_list2)
'range_list' will contain all ids which are contained in 'range_list1' and also in 'range_list2'.
lList **range_list - pointer to result RN_Type list lList **answer_list - pointer to AN_Type list const lList *range_list1 - first source RN_Type list const lList *range_list2 - second source RN_Type list
range_list_calculate_union_set() -- Union set of two range lists
void range_list_calculate_union_set(lList **range_list, lList **answer_list, const lList *range_list1, const lList *range_list2)
All ids contained in 'range_list1' and 'range_list2' will be contained in 'range_list' after a call of this function.
lList **range_list - pointer to union set RN_Type list lList **answer_list - pointer to AN_Type list const lList *range_list1 - first source RN_Type list const lList *range_list2 - second source RN_Type list
range_list and answer_list may be modified
range_list_compress() -- Joins sequenced ranges within a list
void range_list_compress(lList *range_list)
Consecutive ranges within the list will be joined by this function. Following pre-conditions have to be fulfilled, so that this function works correctly: (1) ids have to be in ascending order (2) Only the first/last id of a range may be contained in the predecessor/successor range
lList *range_list - RN_Type list
'range_list' will be modified
1-3:1,4-5:1,6-8:2,8-10:2 => 1-5:1,6-10:2
MT-NOTE: range_list_compress() is MT safe
range_list_containes_id_less_than() -- has id less than x
bool range_list_containes_id_less_than(const lList *range_list, u_long32 id)
Is at least one id in the "range_list" less than "id"
const lList *range_list - RN_Type list u_long32 id - number
bool - true or false
range_list_get_average() -- Return average of all numbers in range.
double range_list_get_average(const lList *this_list)
The average of all numbers in the range is returned. For an empty range 0 is returned.
const lList *this_list - RN_Type list u_long32 upperbound - This is used as range upperbound if non-0
double - the average
MT-NOTES: range_list_get_average() is MT safe
range_list_get_first_id() -- First id contained in the list
u_long32 range_list_get_first_id(const lList *range_list, lList **answer_list)
The first id of the first range element of the list will be returned. If 'range_list' is NULL or empty 0 will be returned and 'answer_list' will be filled with an error message.
const lList *range_list - RN_Type list lList **answer_list - Pointer to an AN_Type list
u_long32 - First id or 0
MT-NOTE: range_list_get_first_id() is MT safe
range_list_get_last_id() -- Returns last id contained in the list
u_long32 range_list_get_last_id(const lList *range_list, lList **answer_list)
The last id of the last range element of the list will be returned. If 'range_list' is NULL or empty 0 will be returned and 'answer_list' will be filled with an error message.
const lList *range_list - RN_Type list lList **answer_list - Pointer to an AN_Type list
u_long32 - Last id or 0
range_list_get_number_of_ids() -- Determines the number of ids
u_long32 range_list_get_number_of_ids(const lList *this_list)
This function determines the number of ids contained in 'this_list'. If 'this_list' is NULL then 0 will be returned.
const lList *this_list - RN_Type list
u_long32 - number of ids
1-5:2, 7-10:3, 20-23:1 (1, 3, 5, 7, 10, 20, 21, 22, 23) => 9
MT-NOTE: range_list_get_number_of_ids() is MT safe
range_list_initialize() -- (Re)initialize a range list
void range_list_initialize(lList **this_list, lList **answer_list)
'this_list' will be created if it does not exist. If it already exists all elements contained in this list will be removed.
lList **this_list - Pointer to a RN_Type-list lList **answer_list - Pointer to a AN_Type-list or NULL
*this_list will be an empty RN_Type list *answer_list may contain error messages
range_list_insert_id() -- insert an id into a range list
void range_list_insert_id(lList **range_list, lList **answer_list, u_long32 id)
'id' will be inserted into 'range_list'.
lList **range_list - pointer to a RN_Type list lList **answer_list - pointer to a AN_Type list u_long32 id - new id
It may be possible that 'id' is multiply contained in 'range_list' after using this function. Use range_list_compress() or range_list_sort_uniq_compress() to eliminate them.
range_list and answer_list may be modified
It may be possible that 'id' is multiply contained in 'range_list' after using this function. Use range_list_compress() or range_list_sort_uniq_compress() to eliminate them.
range_list_is_empty() -- check if id lists containes ids
bool range_list_is_empty(const lList *range_list)
Returns true if "range_list" containes no ids.
const lList *range_list - RN_Type list
bool - true or false
range_list_is_id_within() -- Is id contained in range list?
bool range_list_is_id_within(const lList *range_list, u_long32 id)
True is returned by this function if 'id' is part of at least one range element of 'range_list'
const lList *range_list - RN_Type list u_long32 id - id
bool - true or false
MT-NOTE: range_list_is_id_within() is MT safe
range_list_move_first_n_ids() -- split a range list
void range_list_move_first_n_ids(lList **range_list, lList **answer_list, lList **range_list2, u_long32 n)
The first 'n' ids within 'range_list' will be moved into 'range_list2'. Error messages may be found in 'answer_list'
lList **range_list - pointer to a RN_Type list (source) lList **answer_list - pointer to an AN_Type list lList **range_list2 - pointer to a RN_Type list (destination) u_long32 n - number of ids
range_list, range_list2, answer_list may be modified
range_list_print_to_string() -- Print range list into the string
void range_list_print_to_string(const lList *this_list, dstring *string, bool ignore_step, bool comma_as_separator)
Print all ranges given in 'this_list' into the dynamic 'string'. If 'this_list' is NULL then the word "UNDEFINED" will be added to 'string'. If 'ignore_step' is 'true' then the stepsize of all ranges will be suppressed.
const lList *this_list - RN_Type dstring *string - dynamic string bool ignore_step - ignore step for printing bool comma_as_separator - use the format 1,2,3 instead of 1-2: bool print_always_as_range - even if the range has only one id
string will be modified
range_list_remove_id() -- remove an id from a range list
void range_list_remove_id(lList **range_list, lList **answer_list, u_long32 id)
'id' will be removed from 'range_list'.
lList **range_list - pointer to a RN_Type list lList **answer_list - pointer to a AN_Type list u_long32 id - new id
range_list and answer_list may be modified
range_set_all_ids() -- writes 'start', 'end' and 'step'
void range_set_all_ids(lListElem *range, u_long32 min, u_long32 max, u_long32 step)
Writes 'min' (start), 'max' (end) and 'step' into a range element
lListElem *range - range element of type RN_Type u_long32 min - start value u_long32 max - end value u_long32 step - step size
Step values will be nomalized. (e.g. 1-1:3 => 1-1:1)
Step values will be nomalized. (e.g. 1-1:3 => 1-1:1)
range_to_dstring() -- Appends a range to a dynamic string
void range_to_dstring(u_long32 start, u_long32 end, int step, dstring *dyn_taskrange_str)
Appends a range to a dynamic string.
u_long32 start - min id u_long32 end - max id int step - step size dstring *dyn_taskrange_str - dynamic string int ignore_step - ignore step for output bool use_comma_as_separator - use a comma instead of '-' and ':' for separation bool print_always_as_range - even if the range has only one id
job_report_init_from_job() -- initialize job report
void job_report_init_from_job(lListElem *job_report, const lListElem *job, const lListElem *ja_task, const lListElem *pe_task)
Initialize "job_report" from the attributes obtained from "job", "ja_task" and "pe_task".
lListElem *job_report - JR_Type object const lListElem *job - JB_Type object const lListElem *ja_task - JAT_Type object const lListElem *pe_task - PET_Type object
job_report_print_usage() -- Print usage contained in job report
void job_report_print_usage(const lListElem *job_report, FILE *fp)
Print usage information conatines in "job_report". Print the information to the given file stream "fp" or as debug messages.
const lListElem *job_report - JR_Type element FILE *fp - file stream or NULL
sge_eval_expression() -- boolean expression extension
int sge_eval_expression(u_long32 type, const char *expr, const char *value)
boolean expression extension of regular expression evaluation function fnmatch()
u_long32 type - type of resource const char *expr - expression string to be evaluated const char *value - value string to be compared for lList **answer_list - answer list to pass back error messages
int - result if expression is true or 0 - strings are the same or both NULL 1 - if is false -1 - for empty expression, null, or other error
str_list_append_to_dstring() -- append strings to dstring
const char * str_list_append_to_dstring(const lList *this_list, dstring *string, const char delimiter)
Append the strings contained in "this_list" to the dstring "string". Separate them by the character contained in "delimiter". If "this_list" is NULL or conaines no elements, "NONE" will be added to the dstring.
const lList *this_list - ST_Type list dstring *string - dynamic string const char delimiter - delimiter
const char * - pointer to the given "string"-buffer
str_list_is_valid() -- Are all strings valid
bool str_list_is_valid(const lList *this_list, lList **answer_list)
Does each element in "this_list" contain a valid string (!= NULL).
const lList *this_list - ST_Type list lList **answer_list - AN_Type list
bool - result true - all strings are != NULL false - at least one entry is NULL
str_list_parse_from_string() -- Parse a list of strings
bool str_list_parse_from_string(lList **this_list, const char *string, const char *delimitor)
Parse a list of strings from "string". The strings have to be separated by a token contained in "delimitor". for each string an element of type ST_Type will be added to "this_list".
lList **this_list - ST_Type list const char *string - string to be parsed const char *delimitor - delimitor string
bool - error state true - success false - error
MT-NOTE: str_list_parse_from_string() is MT safe
so_list_resolve() -- Resolve a generic list of subordinates into their full names.
bool so_list_resolve(const lList *so_list, lList **answer_list, lList **resolved_so_list, const char *cq_name, const char *hostname)
Goes through every entry in the so_list, retrieves the corresponding cqueue, gets the qinstance for hostname from the cqueue, and adds the qinstance's full name to the resolved_so_list. If qi_name is given, the subordinate list will be checked to make sure that it doesn't contain the queue to which the list is subordinate.
const lList *so_list - the list of subordinates to resolve lList **answer_list - answer list for errors lList **resolved_so_list - the destination list for resolved subordinates const char *cq_name - the queue name of the qinstance to which the subordinate list is subordinate const char *hostname - the hostname for the queue to which the subordinate list is subordinate
bool - error state true - success false - error
Master_SUser_List -- list of submit users
lList *Master_SUser_List;
The global variable 'Master_SUser_List' is held within the master daemon. It containes one CULL element of type 'SU_Type' for each user who submitted a job. Enties within this list have to be updated when a new job enters/leaves the SGE system
SU_Type - CULL submit users element
SU_Type +--- SU_name: username of a user submittet a job +--- SU_jobs: currently active jobs for this user (Jobs in system which are in the 'finished' state are also accounted here)
CULL element which holds information for a user which is able to submit jobs into an SGE system. The variable 'Master_SUser_List' is used to hold multiple 'SU_Type' elements within the master deamon. Use the functions mentioned in the 'see also' section to access, modify, delete 'SU_Type' elements and the 'Master_SUser_List'.
suser_check_new_job() -- checks, if a job can be registered
int suser_check_new_job(const lListElem *job, u_long32 max_u_jobs, int force_registration)
This function checks whether a new "job" would exceed the maxium number of allowed jobs per user ("max_u_jobs"). JB_owner of "job" is the username which will be used by this function to compare the current number of registered jobs with "max_u_jobs". If the limit would be exceeded than the function will return 1 otherwise 0.
const lListElem *job - JB_Type element u_long32 max_u_jobs - maximum number of allowed jobs per user int force_registration - force job registration
int - 1 => limit would be exceeded 0 => otherwise
suser_decrease_job_counter() -- decrease the users job counter
void suser_decrease_job_counter(lListElem *suser)
The job counter within "suser" will be decreased by one
lListElem *suser - SU_Type list
void - NONE
suser_job_count() - number of jobs for a given user
void suser_job_count(const lListElem *job)
number of jobs for a given user
const lListElem *job - JB_Type element
number of jobs in the system
suser_get_job_counter() -- return the users job counter
u_long32 suser_get_job_counter(lListElem *suser)
Returns the current number of jobs registed for "suser"
lListElem *suser - SU_Type element
u_long32 - number of jobs
suser_increase_job_counter() -- increase the users job counter
void suser_increase_job_counter(lListElem *suser)
The job counter within "suser" will be increased by one
lListElem *suser - SU_Type list
void - NONE
suser_list_add() -- Add a new entry (uniq) entry into a list
lListElem* suser_list_add(lList **suser_list, lList **answer_list, const char *suser_name)
This function creates a new CULL element for the user "susername" into the "suser_list". The newly created element will be returned. If an element for this user already exists than this element will be returned.
lList **suser_list - SU_Type list lList **answer_list - AN_Type list const char *suser_name - username
lListElem* - SU_Type element or NULL
suser_list_find() -- find a user entry in a list
lListElem* suser_list_find(lList *suser_list, const char *suser_name)
This function tries to find the first entry for user "suser_name" in the list "suser_list".
lList *suser_list - SU_Type list const char *suser_name - username
lListElem* - SU_Type element pointer or NULL
suser_register_new_job() -- try to register a new job
int suser_register_new_job(const lListElem *job, u_long32 max_u_jobs, int force_registration)
This function checks whether a new "job" would exceed the maximum number of allowed jobs per user ("max_u_jobs"). JB_owner of "job" is the username which will be used by this function to compare the current number of registered jobs with "max_u_jobs". If the limit would be exceeded than the function will return 1, otherwise it will increase the jobcounter of the job owner and return 0. In some situations it may be necessary to force the incrementating of the jobcounter (reading jobs from spool area). This may be done with "force_registration".
const lListElem *job - JB_Type element u_long32 max_u_jobs - maximum number of allowed jobs per user int force_registration - force job registration
int - 1 => limit would be exceeded 0 => otherwise
suser_unregister_job() -- unregister a job
void suser_unregister_job(const lListElem *job)
Decrease the jobcounter for the job owner of "job".
const lListElem *job - JB_Type element
void - NONE
usage_list_get_double_usage() -- return double usage value
double usage_list_get_double_usage(const lList *usage_list, const char *name, double def)
Searches a usage object with the given name in the given usage list. If such an element is found, returns the value of the usage object as double value. If no such element is found, return the given default value.
const lList *usage_list - the usage list const char *name - name of the element to search double def - default value
double - value of found object or default
usage_list_get_ulong_usage() -- return ulong usage value
u_long64 usage_list_get_ulong_usage(const lList *usage_list, const char *name, u_long64 def)
Searches for a usage object with the given name in the given usage list. If such an element is found, returns the value of the usage object as u_long64 value. If no such element is found, return the given default value.
const lList *usage_list - the usage list const char *name - name of the element to search u_long64 def - default value
u_long64 - value of found object or default
usage_list_set_double_usage() -- create/update a usage record
void usage_list_set_double_usage(lList *usage_list, const char *name, double value)
Updates the value of a usage record. If no usage record exists with the given name in usage_list, a new record is created.
lList *usage_list - list containing the usage record to update const char *name - name of the usage record to update double value - the new value
MT-NOTE: usage_list_set_double_usage() is MT safe
usage_list_set_ulong_usage() -- create/update a usage record
void usage_list_set_ulong_usage(lList *usage_list, const char *name, u_long64 value)
Updates the value of a usage record. If no usage record exists with the given name in usage_list, a new record is created.
lList *usage_list - list containing the usage record to update const char *name - name of the usage record to update u_long64 value - the new value
MT-NOTE: usage_list_set_ulong_usage() is MT safe
prj_list_append_to_dstring() -- append prj from list to dstring
const char* prj_list_append_to_dstring(lList *lp, dstring *string)
Append all projects in list lp to dstring string.
lList *lp - PR_Type list dstring *string - dstring to append to
const char* - NULL or resulting string of dstring
prj_list_locate() -- Find project in list
lListElem* prj_list_locate(lList *lp, const char *name)
Find project in list.
lList *lp - PR_Type list const char *name - project name
lListElem* - NULL or element pointer
user_list_locate() -- Find user in list
lListElem* user_list_locate(lList *lp, const char *name)
Find user in list.
lList *lp - UU_Type list const char *name - user name
lListElem* - NULL or element pointer
userset_get_type_string() -- get readable type definition
const char* userset_get_type_string(const lListElem *userset, lList **answer_list, dstring *buffer)
Returns a readable string of the userset type bitfield.
const lListElem *userset - the userset containing the requested information dstring *buffer - string buffer to hold the result string
const char* - resulting string
userset_is_deadline_user() -- may user submit deadline jobs.
bool userset_is_deadline_user(lList *lp, const char *username)
Ask whether a given user is allowed to sumbit deadline jobs.
lList *lp - US_Type const char *username - user name
bool - result
userset_list_locate() -- Find user in list
lListElem* userset_list_locate(lList *lp, const char *name)
Find user in list.
lList *lp - US_Type list const char *name - name
lListElem* - NULL or element pointer
userset_list_validate_acl_list() -- validate an acl list
int userset_list_validate_acl_list(lList *acl_list, lList **alpp)
Checks if all entries of an acl list (e.g. user list of a pe) are contained in the master userset list.
lList *acl_list - the acl list to check lList **alpp - answer list pointer
int - STATUS_OK, if everything is OK
userset_set_type_string() -- set userset type from string
bool userset_set_type_string(lListElem *userset, lList **answer_list, const char *value)
Takes a string representation for the userset type,
lListElem *userset - the userset to change lList **answer_list - errors will be reported here const char *value - new value for userset type
bool - true on success, false on error, error message will be in answer_list
userset_validate_entries() -- verify entries of a user set
int userset_validate_entries(lListElem *userset, lList **alpp, int start_up)
Validates all entries of a userset.
lListElem *userset - the userset to check lList **alpp - answer list pointer, if answer is expected. In any case, errors are output using the ERROR macro. int start_up - are we in the qmaster startup phase?
int - STATUS_OK, if everything is OK
VA_Type - CULL variable element
SGE_STRING(VA_variable) name of variable SGE_STRING(VA_value) value of variable
CULL element holding a variable/value pair (variable[=value])
VariableList - Object to store variable name/value pairs
In several places within SGE/EE it is necessary to store variables and their values (e.g. job environment variable, job context, ...) of following form: variable[=value][,variable[=value],...] The VA_Type CULL element is used to hold such data. Funktions in the SEE ALSO section might be used to work with VA_Type lists and elements.
var_get_sharedlib_path_name -- name of sharedlib path variable
static const char *var_get_sharedlib_path_name(void);
Returns the operating dependent name of the shared library path (e.g. LIBPATH, SHLIB_PATH, LD_LIBRARY_PATH). If the name of the sharedlib path is not known for an operating system (the port has not yet been done), a compile time error is raised.
Name of the shared lib path variable
Raising a compile time error (instead of e.g. just returning NULL or LD_LIBRARY_PATH as default) has the following reason: Setting the shared lib path is a very sensible operation concerning security. Example: If a shared linked rshd (called for qrsh execution) is executed with a faked shared lib path, operations defined in a non sge library libgdi.so might be executed as user root.
var_list_add_as_set() -- Concatenate two lists as sets
int var_list_add_as_set(lList *lp0, lList *lp1)
Concatenate two lists of equal type throwing away the second list. Elements in the second list will replace elements with the same key in the the first list. If the first list contains duplicate element keys, only the first element with a given key will be replaced by an element from the second list with the same key.
lList *lp0 - first list lList *lp1 - second list
int - error state 0 - OK -1 - Error
var_list_copy_env_vars_and_value() -- Copy env. vars
void var_list_copy_env_vars_and_value(lList **varl, const lList *src_varl, const char *ignore_prefix)
Copy all variables from "src_varl" into "varl". Ignore all variables beginning with "ignore_prefix".
lList **varl - VA_Type list const lList *src_varl - source VA_Type list const char *ignore_prefix - prefix
void - none
var_list_copy_prefix_vars() -- copy vars with certain prefix
void var_list_copy_prefix_vars(lList **varl, const lList *src_varl, const char *prefix, const char *new_prefix)
Make a copy of all entries in "src_varl" beginning with "prefix". "prefix" is replaced by "new_prefix" for all created elements. The new elements will be added to "varl".
lList **varl - VA_Type list const char *prefix - prefix string (e.g. VAR_PREFIX) const char *new_prefix - new prefix string (e.g. "SGE_")
"__SGE_PREFIX__O_HOME" ===> "SGE_O_HOME
var_list_copy_prefix_vars_undef() -- copy vars with certain prefix
void var_list_copy_prefix_vars_undef(lList **varl, const lList *src_varl, const char *prefix, const char *new_prefix)
Make a copy of all entries in "src_varl" beginning with "prefix". "prefix" is replaced by "new_prefix" for all created elements. The new elements will be added to "varl" if it is undefined in "varl".
lList **varl - VA_Type list const char *prefix - prefix string (e.g. VAR_PREFIX_NR) const char *new_prefix - new prefix string (e.g. "SGE_")
"__SGE_PREFIX2__TASK_ID" ===> "SGE_TASK_ID
var_list_delete_string -- delete a variable
void var_list_delete_string(lList **varl, const char *name);
Deletes the variable <name> from the list <varl> if it exists.
lList **varl - VA_Type list const char *name - the name of the variable
var_list_dump_to_file -- dump variables from list to file
void var_list_dump_to_file(const lList *varl, FILE *file);
Parses the list of type VA_Type <varl> containing the description of variables. Dumps all list elements to <file> in the format: <name>=<value> <name> is read from VA_variable, <value> from VA_value. Any backslashes and newlines in <value> are backslash-escaped so that values may be printed on one line with un-escaping on read.
varl - list of variables file - filehandle of a previously opened (for writing) file
var_list_get_string() -- get value of certain variable
const char* var_list_get_string(lList *varl, const char *variable)
Return the string value of a variable with the name "variable" which is stored in "varl".
lList *varl - VA_Type list const char *variable - variable name
const char* - value or NULL
var_list_remove_prefix_vars() -- remove vars with certain prefix
void var_list_remove_prefix_vars(lList **varl, const char *prefix)
Remove all entries from "varl" where the name begins with "prefix"
lList **varl - VA_Type list const char *prefix - prefix string (e.g. VAR_PREFIX)
var_list_set_int -- add/change an variable
void var_list_set_int(lList *varl, const char *name, int value);
If the variable <name> does not already exist in <varl>, it is created and initialized with <value>. Otherwise, its value is overwritten with <value>
varl - VA_Type list name - the name of the variable value - the (new) value of the variable
var_list_set_sge_u32 -- add/change a variable
void var_list_set_sge_u32(lList **varl, const char *name, u_long32 value);
If the variable <name> does not already exist in <varl>, it is created and initialized with <value>. Otherwise, its value is overwritten with <value>
lList **varl - VA_Type list const char *name - the name of the variable u_long32 value - the (new) value of the variable
var_list_set_sharedlib_path -- set shared lib path
void var_list_set_sharedlib_path(lList **varl);
Sets or replaces the shared lib path in the list of variables. The SGE shared lib path is always set to the beginning of the resulting shared lib path (security, see var_get_sharedlib_path_name())
lList **varl - list of environment variables
var_list_set_string -- add/change an variable
void var_list_set_string(lList **varl, const char *name, const char *value);
If the variable <name> does not already exist in <varl>, it is created and initialized with <value>. Otherwise, its value is overwritten with <value>
lList **varl - VA_Type list const char *name - the name of the variable const char *value - the (new) value of the variable
var_list_split_prefix_vars() -- split a list of variables
void var_list_split_prefix_vars(lList **varl, lList **pefix_vars, const char *prefix)
Move all variable elements form "varl" to "pefix_vars" which begin with "prefix". *pefix_vars will be created if is does not exist.
lList **varl - VA_Type list lList **pefix_vars - pointer to VA_Type list const char *prefix - string (e.g. VAR_PREFIX)
void - None
LDR_Type -- is a high level structure to monitor changes in consumables, which are used as load threasholds.
SGE_REF(LDR_global,CULL_ANY_SUBTYPE, CULL_DEFAULT) Reference to a global cunsumable object SGE_REF(LDR_host,CULL_ANY_SUBTYPE, CULL_DEFAULT) Reference to a host consumable object SGE_REF(LDR_queue,CULL_ANY_SUBTYPE, CULL_DEFAULT) Reference to a queue consumable object SGE_LIST(LDR_queue_ref_list, QR_Type, CULL_DEFAULT) A list of queues instances, which are using all these consumables as load thresholds.
All three consumables form a kind of queue_consumable_category. All queues which are listed in here are using the same consumables to compute the load alarm. The whole list is using references because it is easier to monitor changes in one of the consumable objects and the function calculation the load alarm for each queue knows exactly which queues need to be recalculated.
This list a fixed position list. Do not use what filtering on the elements or the code will break!
QR_Type -- sub list of queue references
SGE_REF(QR_Queue,CULL_ANY_SUBTYPE, CULL_DEFAULT References a queue instance object
Lists all queue instance objects in the same queue_consumable_category
SPC_Type -- Spooling context
SGE_STRING(SPC_name, CULL_HASH | CULL_UNIQUE) Unique name of the spooling context SGE_LIST(SPC_rules, SPR_Type, CULL_DEFAULT) List of spooling rules SGE_LIST(SPC_types, SPT_Type, CULL_DEFAULT) List of spoolable object types with references to rules.
A spooling context describes the way how objects are spooled (read and written). A spooling context contains one or multiple rules for spooling. A rule can for example describe a database connection. It also contains a list of types that can be spooled. A default entry for all types can be created; if type entries for individual types exist, these entries will be used for spooling. A type references one or multiple rules which will be executed for writing or deleting data. Exactly one rule can be defined to be the default rule for reading objects. +----------+ 1:n +----------+ | SPC_Type |----------------<| SPT_Type | +----------+ +----------+ | | | | | | | 1 | | : | | n | | | ^ | +----------+ 1:n, one is default | | SPR_Type |>----------------------+ +----------+
SPR_Type -- Spooling rule
SGE_STRING(SPR_name, CULL_HASH | CULL_UNIQUE) Unique name of the rule. SGE_STRING(SPR_url, CULL_DEFAULT) An url, e.g. a spool directory, a database url etc. SGE_REF(SPR_option_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a function to set any database specific options, e.g. whether to do database recovery at startup or not. SGE_REF(SPR_startup_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a startup function, e.g. establishing a connection to a database. SGE_REF(SPR_shutdown_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a shutdown function, e.g. disconnecting from a database or closing file handles. SGE_REF(SPR_maintenance_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a maintenance function for - creating the database tables / directories in case of filebased spooling - switching between spooling with/without history - backup - cleaning up / compressing database - etc. SGE_REF(SPR_trigger_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a trigger function. A trigger function is used to trigger regular actions, e.g. checkpointing and cleaning the transaction log in case of the Berkeley DB or vacuuming in case of PostgreSQL. SGE_REF(SPR_transaction_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) function pointer to a function beginning and ending transactions. SGE_REF(SPR_list_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function reading complete lists (master lists) from the spooling data source. SGE_REF(SPR_read_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function reading a single object from the spooling data source. SGE_REF(SPR_write_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function writing a single object. SGE_REF(SPR_delete_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function deleting a single object. SGE_REF(SPR_validate_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function validating a single object. SGE_REF(SPR_validate_list_func, CULL_ANY_SUBTYPE, CULL_DEFAULT) pointer to a function validating a list of objects. SGE_REF(SPR_clientdata, CULL_ANY_SUBTYPE, CULL_DEFAULT) clientdata; any pointer, can be used to store and reference rule specific data, e.g. file or database handles.
A spooling rule describes a certain way to store and retrieve data from a defined storage facility. Spooling rules can implement spooling to files in a certain directory or spooling into a database, to an LDAP repository etc. A spooling context can contain multiple spooling rules.
SPTR_Type -- references to rules for certain object types
SGE_BOOL(SPTR_default, CULL_DEFAULT) Defines whether the referenced rule is the default rule for reading the defined object type. SGE_STRING(SPTR_rule_name, CULL_UNIQUE) Name of the referenced rule. SGE_REF(SPTR_rule, CULL_ANY_SUBTYPE, CULL_DEFAULT) Pointer/reference to the rule to be used with the defined object type.
Elements of SPTR_Type define a mapping between object type (SPT_Type) and spooling rules (SPR_Type). One object type can be spooled (written) using multiple spooling rules. One object type will be read using one (the default) spooling rule. One spooling rule can be referenced by multiple object types.
SPT_Type -- Spooling object types
SGE_ULONG(SPT_type, CULL_HASH | CULL_UNIQUE) Unique type identifier. See enum sge_object_type in libs/gdi/sge_mirror.h SGE_TYPE_ALL describes a default type entry for all object types. SGE_STRING(SPT_name, CULL_DEFAULT) Name of the type - used for informational messages etc. SGE_LIST(SPT_rules, SPTR_Type, CULL_DEFAULT) List of rules that can be applied for a certain object type. Does not reference the rules themselves, but contains mapping objects mapping between type and rule.
Objects to be spooled have a certain type that can be identified by the sge_object_type enum. A spooling context can contain information about individual types and/or define a default behaviour for all (not individually handled) types. The spooling behaviour for a type is defined by a list of references to rules in the spooling context. One of the referenced spooling rules has to be made default rule for reading objects.
The type identifiers should not come from the mirroring interface, but be part of a more general type information handling in libgdi.
sge_generic_ckpt -- build up a generic ckpt object
lListElem* sge_generic_ckpt( char *ckpt_name );
build up a generic ckpt object
ckpt_name - name used for the CK_name attribute of the generic pe object. If NULL then "template" is the default name.
!NULL - Pointer to a new CULL object of type CK_Type NULL - Error
main() -- calendar test
int main(int argc, char* argv[])
calendar test
int argc - nr. of args char* argv[] - args
int - nr of failed tests
--AN_Type
: sgeobj answer --AN_Type--BN_Type
: sgeobj binding --BN_Type--GR_Type
: sgeobj job --GR_Type--HGRP_Type
: sgeobj hgroup --HGRP_Type--JAT_Type
: sgeobj ja_task --JAT_Type--JB_Type
: sgeobj job --JB_Type--JJ_Type
: japi --JJ_Type--JJAT_Type
: japi --JJAT_Type--JSV_Type
: sgeobj jsv --JSV_Type--LDR_Type
: spool --LDR_Type--LS_Type
: sgeobj loadsensor --LS_Type--NSV_Type
: japi --NSV_Type--Object-Handling
: sgeobj object --Object-Handling--Object-Typedefs
: sgeobj object --Object-Typedefs--PA_Type
: sgeobj path_alias --PA_Type--PE_Type
: sgeobj pe --PE_Type--PET_Type
: sgeobj pe_task --PET_Type--PET_Type
: sgeobj pe_task --PET_Type--PET_Type
: sgeobj pe_task --PET_Type--PETR_Type
: sgeobj pe_task --PETR_Type--PETR_Type
: sgeobj pe_task --PETR_Type--PETR_Type
: sgeobj pe_task --PETR_Type--PRO_Type
: sgeobj job --PRO_Type--QETI_Type
: sgeobj QETI --QETI_Type--QR_Type
: spool --QR_Type--RDE_Type
: sgeobj RDE --RDE_Type--RN_Type
: sgeobj range --RN_Type--RUE_Type
: sgeobj RUE --RUE_Type--SPC_Type
: spool --SPC_Type--SPR_Type
: spool --SPR_Type--SPT_Type
: spool --SPT_Type--SPTR_Type
: spool --SPTR_Type--State_Chart
: sgeobj qinstance_state --State_Chart--VA_Type
: sgeobj var --VA_Type-AnswerList
: sgeobj answer -AnswerList-PathAlias
: sgeobj path_alias -PathAlias-VariableList
: sgeobj var -VariableListanswer_exit_if_not_recoverable
: sgeobj answer answer_exit_if_not_recoverableanswer_get_quality_text
: sgeobj answer answer_get_quality_textanswer_get_status
: sgeobj answer answer_get_statusanswer_has_quality
: sgeobj answer answer_has_qualityanswer_is_recoverable
: sgeobj answer answer_is_recoverableanswer_list_add
: sgeobj answer answer_list_addanswer_list_add_sprintf
: sgeobj answer answer_list_add_sprintfanswer_list_append_list
: sgeobj answer answer_list_append_listanswer_list_handle_request_answer_list
: sgeobj answer answer_list_handle_request_answer_listanswer_list_has_error
: sgeobj answer answer_list_has_erroranswer_list_has_quality
: sgeobj answer answer_list_has_qualityanswer_list_has_status
: sge_answer answer_list_has_statusanswer_list_log
: sgeobj answer answer_list_loganswer_list_on_error_print_or_exit
: sgeobj answer answer_list_on_error_print_or_exitanswer_list_output
: sgeobj answer answer_list_outputanswer_list_print_err_warn
: sgeobj answer answer_list_print_err_warnanswer_list_remove_quality
: sge_answer answer_list_remove_qualityanswer_list_replace
: sgeobj answer answer_list_replaceanswer_list_to_dstring
: sgeobj answer answer_list_to_dstringanswer_log
: sgeobj answer answer_loganswer_print_text
: sgeobj answer answer_print_textanswer_to_dstring
: sgeobj answer answer_to_dstringar_get_event_from_string
: libs sge_obj ar_get_event_from_stringar_get_string_from_event
: libs sgeobj ar_get_string_from_eventar_list_locate
: sge_advance_reservation ar_list_locatear_state2dstring
: libs sgeobj ar_state2dstringar_validate
: sge_advance_reservation ar_validateattr_create
: sgeobj attr attr_createattr_list_add
: sgeobj attr attr_list_addattr_list_add_set_del
: sgeobj attr attr_list_add_set_delbinding_print_to_string
: sge_binding binding_print_to_stringcalc_pos
: sge_schedd_conf calc_poscalendar_get_current_state_and_end
: sge_calendar calendar_get_current_state_and_endcalendar_open_in_time_frame
: sge_calendar calendar_open_in_time_framecalender_state_changes
: sge_calendar calender_state_changescentry_create
: sgeobj centry centry_createcentry_elem_validate
: sgeobj centry centry_elem_validatecentry_fill_and_check
: sgeobj centry centry_fill_and_checkcentry_is_referenced
: sgeobj centry centry_is_referencedcentry_list_fill_request
: sgeobj centry centry_list_fill_requestcentry_list_get_master_list
: sgeobj centry centry_list_get_master_listcentry_list_init_double
: sgeobj centry centry_list_init_doublecentry_list_locate
: sgeobj centry centry_list_locatecentry_list_sort
: sgeobj centry centry_list_sortcentry_print_resource_to_dstring
: sgeobj centry centry_print_resource_to_dstringcentry_urgency_contribution
: sgeobj centry centry_urgency_contributionckpt_is_referenced
: sgeobj ckpt ckpt_is_referencedckpt_list_do_all_exist
: sgeobj ckpt ckpt_list_do_all_existckpt_list_get_master_list
: sgeobj ckpt ckpt_list_get_master_listckpt_list_locate
: sgeobj ckpt ckpt_list_locateckpt_validate
: sgeobj ckpt ckpt_validateclean_conf
: sge_conf clean_confclean_procList
: sge_proc clean_procListclear_pos
: sge_schedd_conf clear_poscompute_limit
: sge_calendar compute_limitconf_update_thread_profiling
: sge_conf conf_update_thread_profilingcqueue_create
: sgeobj cqueue cqueue_createcqueue_find_used_href
: sge_cqueue cqueue_find_used_hrefcqueue_get_name_from_qinstance
: sge_cqueue cqueue_get_name_from_qinstancecqueue_is_a_href_referenced
: sgeobj cqueue cqueue_is_a_href_referencedcqueue_is_hgroup_referenced
: sgeobj cqueue cqueue_is_hgroup_referencedcqueue_is_href_referenced
: sgeobj cqueue cqueue_is_href_referencedcqueue_is_used_in_subordinate
: sgeobj cqueue_is_used_in_subordinatecqueue_list_add_cqueue
: sgeobj cqueue cqueue_list_add_cqueuecqueue_list_find_all_matching_references
: sgeobj cqueue cqueue_list_find_all_matching_referencescqueue_list_find_hgroup_references
: sgeobj cqueue cqueue_list_find_hgroup_referencescqueue_list_locate
: sgeobj cqueue cqueue_list_locatecqueue_list_locate_qinstance
: sgeobj cqueue cqueue_list_locate_qinstancecqueue_list_locate_qinstance_msg
: sgeobj cqueue cqueue_list_locate_qinstance_msgcqueue_list_set_tag
: sgeobj cqueue cqueue_list_set_tagcqueue_locate_qinstance
: sgeobj cqueue cqueue_locate_qinstancecqueue_name_split
: sgeobj cqueue cqueue_name_splitcqueue_purge_host
: sge_cqueue cqueue_purge_hostcqueue_set_template_attributes
: sgeobj cqueue cqueue_set_template_attributescqueue_trash_used_href_setting
: sgeobj cqueue cqueue_trash_used_href_settingcqueue_verify_attributes
: sgeobj cqueue cqueue_verify_attributescqueue_verify_job_slots
: sge_cqueue_verify cqueue_verify_job_slotscqueue_verify_memory_value
: sge_cqueue_verify cqueue_verify_memory_valuecqueue_verify_time_value
: sge_cqueue_verify cqueue_verify_time_valuecqueue_xattr_pre_gdi
: sgeobj cqueue cqueue_xattr_pre_gdicull_parse_destination_identifier_list
: sge_qref cull_parse_destination_identifier_listcull_parse_jid_hold_list
: cull_parse_util cull_parse_jid_hold_listcull_parse_path_list
: cull_parse_util cull_parse_path_listdebit_consumable
: lib sgeobj debit_consumabledouble_print_int_to_dstring
: sgeobj double_print_int_to_dstringdouble_print_to_dstring
: sgeobj double_print_to_dstringevent_client_verify
: sge_event event_client_verifyextend_wday_range
: sge_calendar extend_wday_rangefeature_activate
: sgeobj feature feature_activatefeature_get_active_featureset_id
: sgeobj feature feature_get_active_featureset_idfeature_get_already_read_from_file
: sgeobj feature feature_get_already_read_from_filefeature_get_featureset_id
: sgeobj feature feature_get_featureset_idfeature_get_featureset_name
: sgeobj feature feature_get_featureset_namefeature_get_master_featureset_list
: sgeobj feature feature_get_master_featureset_listfeature_get_product_name
: sgeobj feature feature_get_product_namefeature_initialize
: sgeobj feature feature_initializefeature_initialize_from_string
: sgeobj feature feature_initialize_from_stringfeature_is_enabled
: sgeobj feature feature_is_enabledfeature_mt_init
: sgeobj feature feature_mt_initfeature_once_init
: sgeobj feature feature_once_initfeature_set_already_read_from_file
: sgeobj feature feature_set_already_read_from_filefeature_state_destroy
: sgeobj feature feature_state_destroyfeature_state_init
: sgeobj feature feature_state_initfprint_cull_list
: cull_parse_util fprint_cull_listfprint_name_value_list
: cull_parse_util fprint_name_value_listfprint_resource_utilizations
: cull_parse_util fprint_resource_utilizationsfprint_thresholds
: cull_parse_util fprint_thresholdsfree_procList
: sge_proc free_procListgen_procList
: sge_proc gen_procListget_algorithm
: sge_schedd_conf get_algorithmget_default_duration_str
: sge_schedd_conf get_default_duration_strget_halflife_decay_list_str
: sge_schedd_conf get_halflife_decay_list_strget_job_load_adjustments
: sge_schedd_conf get_job_load_adjustmentsget_load_adjustment_decay_time_str
: sge_schedd_conf get_load_adjustment_decay_time_strget_load_formula
: sge_schedd_conf get_load_formulaget_pr
: sge_proc get_prget_schedule_interval_str
: sge_schedd_conf get_schedule_interval_strget_usage_weight_list
: sge_schedd_conf get_usage_weight_listhgroup_add_references
: sgeobj hgroup hgroup_add_referenceshgroup_check_name
: sgeobj hgroup hgroup_check_namehgroup_create
: sgeobj hgroup hgroup_createhgroup_find_all_referencees
: sgeobj hgroup hgroup_find_all_referenceeshgroup_find_all_references
: sgeobj hgroup hgroup_find_all_referenceshgroup_find_referencees
: sgeobj hgroup hgroup_find_referenceeshgroup_find_references
: sgeobj hgroup hgroup_find_referenceshgroup_list_exists
: sgeobj hgroup hgroup_list_existshgroup_list_find_matching
: sgeobj hgroup hgroup_list_find_matchinghgroup_list_find_matching_and_resolve
: sgeobj hgroup hgroup_list_find_matching_and_resolvehgroup_list_get_master_list
: sgeobj hgroup hgroup_list_get_master_listhgroup_list_locate
: sgeobj hgroup hgroup_list_locatehost_get_load_value
: sgeobj host host_get_load_valuehost_is_referenced
: sgeobj host host_is_referencedhost_list_merge
: sgeobj host host_list_mergehost_merge
: sgeobj host host_mergehref_list_add
: sgeobj href href_list_addhref_list_append_to_dstring
: sgeobj href href_list_append_to_dstringhref_list_compare
: sgeobj href href_list_comparehref_list_debug_print
: sgeobj href href_list_debug_printhref_list_find_all_referencees
: sgeobj href href_list_find_all_referenceeshref_list_find_all_references
: sgeobj href href_list_find_all_referenceshref_list_find_diff
: sgeobj href href_list_find_diffhref_list_find_effective_diff
: sgeobj href href_list_find_effective_diffhref_list_find_referencees
: sgeobj href href_list_find_referenceeshref_list_find_references
: sgeobj href href_list_find_referenceshref_list_has_member
: sgeobj href href_list_has_memberhref_list_locate
: sgeobj href href_list_locatehref_list_make_uniq
: sgeobj href href_list_make_uniqhref_list_remove_existing
: sgeobj href href_list_remove_existinghref_list_resolve_hostnames
: sgeobj href href_list_resolve_hostnamesis_config_set
: sge_schedd_conf is_config_setis_week_entry_active
: sge_calendar is_week_entry_activeis_year_entry_active
: sge_calendar is_year_entry_activeja_task_add_finished_pe_task
: sgeobj ja_task ja_task_add_finished_pe_taskja_task_clear_finished_pe_tasks
: sgeobj ja_task ja_task_clear_finished_pe_tasksja_task_is_tightly_integrated
: sge_ja_task ja_task_is_tightly_integratedja_task_list_print_to_string
: sgeobj ja_task ja_task_list_print_to_stringja_task_list_split_group
: sgeobj ja_task ja_task_list_split_groupja_task_message_add
: sgeobj ja_task ja_task_message_addja_task_message_trash_all_of_type_X
: sgeobj ja_task ja_task_message_trash_all_of_type_Xja_task_search_pe_task
: sgeobj ja_task ja_task_search_pe_taskja_task_verify
: sge_ja_task ja_task_verifyja_task_verify_execd_job
: sge_ja_task ja_task_verify_execd_jobja_task_verify_granted_destin_identifier
: sge_ja_task ja_task_verify_granted_destin_identifierja_task_verify_granted_destin_identifier_list
: sge_ja_task ja_task_verify_granted_destin_identifier_listjb_now
: sgeobj job jb_nowjob_add_as_zombie
: sgeobj job job_add_as_zombiejob_add_parent_id_to_context
: sgeobj job job_add_parent_id_to_contextjob_check_correct_id_sublists
: sgeobj job job_check_correct_id_sublistsjob_check_owner
: sgeobj job job_check_ownerjob_check_qsh_display
: sgeobj job job_check_qsh_displayjob_count_pending_tasks
: sgeobj job job_count_pending_tasksjob_count_rescheduled_ja_tasks
: sge_job job_count_rescheduled_ja_tasksjob_create_hold_id_lists
: sgeobj job job_create_hold_id_listsjob_create_task
: sgeobj job job_create_taskjob_delete_not_enrolled_ja_task
: sgeobj job job_delete_not_enrolled_ja_taskjob_destroy_hold_id_lists
: sgeobj job job_destroy_hold_id_listsjob_enroll
: sgeobj job job_enrolljob_get_biggest_enrolled_task_id
: sgeobj job job_get_biggest_enrolled_task_idjob_get_biggest_unenrolled_task_id
: sgeobj job job_get_biggest_unenrolled_task_idjob_get_enrolled_ja_tasks
: sgeobj job job_get_enrolled_ja_tasksjob_get_env_string
: sgeobj job job_get_env_stringjob_get_hold_state
: sgeobj job job_get_hold_statejob_get_id_string
: sgeobj job job_get_id_stringjob_get_ja_task_hold_state
: sgeobj job job_get_ja_task_hold_statejob_get_ja_task_template
: sgeobj job job_get_ja_task_templatejob_get_ja_task_template_hold
: sgeobj job job_get_ja_task_template_holdjob_get_ja_task_template_pending
: sgeobj job job_get_ja_task_template_pendingjob_get_ja_tasks
: sgeobj job job_get_ja_tasksjob_get_job_key
: sgeobj job job_get_job_keyjob_get_key
: sgeobj job job_get_keyjob_get_not_enrolled_ja_tasks
: sgeobj job job_get_not_enrolled_ja_tasksjob_get_request
: sgeobj job job_get_requestjob_get_shell_start_mode
: sgeobj job job_get_shell_start_modejob_get_smallest_enrolled_task_id
: sgeobj job job_get_smallest_enrolled_task_idjob_get_smallest_unenrolled_task_id
: sgeobj job job_get_smallest_unenrolled_task_idjob_get_state_string
: sgeobj job job_get_state_stringjob_get_submit_ja_tasks
: sgeobj job job_get_submit_ja_tasksjob_get_submit_task_ids
: sgeobj job job_get_submit_task_idsjob_get_wallclock_limit
: sge_job job_get_wallclock_limitjob_has_soft_requests
: sgeobj job job_has_soft_requestsjob_initialize_env
: sgeobj job job_initialize_envjob_initialize_id_lists
: sgeobj job job_initialize_id_listsjob_is_array
: sgeobj job job_is_arrayjob_is_binary
: sgeobj job_is_binaryjob_is_ckpt_referenced
: sgeobj job job_is_ckpt_referencedjob_is_enrolled
: sgeobj job job_is_enrolledjob_is_ja_task_defined
: sgeobj job job_is_ja_task_definedjob_is_parallel
: sgeobj job job_is_paralleljob_is_pe_referenced
: sgeobj job job_is_pe_referencedjob_is_requesting_consumable
: sgeobj job_is_requesting_consumablejob_is_tight_parallel
: sgeobj job job_is_tight_paralleljob_is_zombie_job
: sgeobj job job_is_zombie_jobjob_list_add_job
: sgeobj job job_list_add_jobjob_list_locate
: sgeobj job job_list_locatejob_list_register_new_job
: sgeobj job job_list_register_new_jobjob_might_be_tight_parallel
: sgeobj job job_might_be_tight_paralleljob_parse_key
: sgeobj job job_parse_keyjob_report_init_from_job
: sgeobj report job_report_init_from_jobjob_report_print_usage
: sgeobj report job_report_print_usagejob_resolve_host_for_path_list
: sgeobj job job_resolve_host_for_path_listjob_search_task
: sgeobj job job_search_taskjob_set_env_string
: sgeobj job job_set_env_stringjob_set_hold_state
: sgeobj job job_set_hold_statejob_set_submit_task_ids
: sgeobj job job_set_submit_task_idsjob_verify
: sge_job job_verifyjob_verify_submitted_job
: sge_job job_verify_submitted_jobjobscript_get_key
: sgeobj job jobscript_get_keyjobscript_parse_key
: sgeobj job jobscript_parse_keyjoin_wday_range
: sge_calendar join_wday_rangejsv_create
: sgeobj jsv jsv_createjsv_do_communication
: sgeobj jsv jsv_do_communicationjsv_do_verify
: sgeobj jsv jsv_do_verifyjsv_is_enabled
: sgeobj jsv jsv_is_enabledjsv_list_add
: sgeobj jsv jsv_list_addjsv_list_remove
: sgeobj jsv jsv_list_removejsv_list_remove_all
: sgeobj jsv jsv_list_remove_alljsv_list_update
: sgeobj jsv jsv_list_updatejsv_send_command
: sgeobj jsv jsv_send_commandjsv_start
: sgeobj jsv jsv_startjsv_stop
: sge_jsv jsv_stopjsv_url_parse
: sgeobj jsv jsv_url_parseload_formula_is_centry_referenced
: sge_centry load_formula_is_centry_referencedlWriteElemXML
: cull list lWriteElemXMLlWriteElemXMLTo
: cull list lWriteElemXMLTolWriteListXMLTo
: cull list lWriteListXMLTomailrec_parse
: sgeobj mailrec mailrec_parsemailrec_unparse
: sgeobj mailrec mailrec_unparsemain
: test_sge_calendar mainmanop_is_manager
: sgeobj manop manop_is_managermanop_is_operator
: sgeobj manop manop_is_operatormap_consumable2str
: sge_centry map_consumable2strMaster_SUser_List
: sgeobj suser Master_SUser_Listmerge_configuration
: sge_conf merge_configurationobj_mt_init
: sge_object obj_mt_initobj_state_destroy
: sge_object obj_state_destroyobj_state_global_init
: sge_object obj_state_global_initobj_state_init
: sge_object obj_state_initobject_append_field_to_dstring
: sgeobj object object_append_field_to_dstringobject_append_raw_field_to_dstring
: sgeobj object object_append_raw_field_to_dstringobject_delete_range_id
: sgeobj object object_delete_range_idobject_get_name
: sge_object object_get_nameobject_get_name_prefix
: sgeobj object object_get_name_prefixobject_get_primary_key
: sgeobj object object_get_primary_keyobject_get_type
: sgeobj object object_get_typeobject_has_type
: sgeobj object object_has_typeobject_list_verify_cull
: sge_object object_list_verify_cullobject_name_get_type
: sgeobj object object_name_get_typeobject_parse_field_from_string
: sgeobj object object_parse_field_from_stringobject_parse_raw_field_from_string
: sgeobj object object_parse_raw_field_from_stringobject_set_range_id
: sgeobj object object_set_range_idobject_type_free_master_list
: sgeobj object object_type_free_master_listobject_type_get_descr
: sgeobj object object_type_get_descrobject_type_get_global_object_description
: sge_object object_type_get_global_object_descriptionobject_type_get_key_nm
: sgeobj object object_type_get_key_nmobject_type_get_master_list
: sgeobj object object_type_get_master_listobject_type_get_name
: sgeobj object object_type_get_nameobject_type_get_object_description
: sge_object object_type_get_object_descriptionobject_unpack_elem_verify
: sge_object object_unpack_elem_verifyobject_verify_cull
: sge_object object_verify_cullobject_verify_expression_syntax
: sge_object object_verify_expression_syntaxobject_verify_name
: sge_object object_verify_nameobject_verify_pe_range
: sge_object object_verify_pe_rangeobject_verify_string_not_null
: sge_object object_verify_string_not_nullobject_verify_ulong_not_null
: sge_object object_verify_ulong_not_nullobject_verify_ulong_null
: sge_object object_verify_ulong_nullpath_alias_list_get_path
: sgeobj path_alias path_alias_list_get_pathpath_alias_list_initialize
: sgeobj path_alias path_alias_list_initializepath_alias_read_from_file
: sgeobj path_alias path_alias_read_from_filepath_alias_verify
: sge_path_alias path_alias_verifypath_list_verify
: sge_path_alias path_list_verifypath_verify
: sge_path_alias path_verifype_create_template
: sgeobj pe pe_create_templatepe_debit_slots
: sgeobj pe pe_debit_slotspe_do_accounting_summary
: sge_pe pe_do_accounting_summarype_is_matching
: sgeobj pe pe_is_matchingpe_is_referenced
: sgeobj pe pe_is_referencedpe_list_do_all_exist
: sgeobj pe pe_list_do_all_existpe_list_find_matching
: sgeobj pe pe_list_find_matchingpe_list_locate
: sgeobj pe pe_list_locatepe_set_slots_used
: sgeobj pe pe_set_slots_usedpe_slots_used
: sgeobj pe pe_slots_usedpe_task_sum_past_usage
: sgeobj pe_task pe_task_sum_past_usagepe_task_sum_past_usage_all
: sgeobj pe_task pe_task_sum_past_usage_allpe_task_sum_past_usage_list
: sgeobj pe_task pe_task_sum_past_usage_listpe_task_verify_request
: sge_pe_task pe_task_verify_requestpe_urgency_slots
: sgeobj pe pe_urgency_slotspe_validate
: sgeobj pe pe_validatepe_validate_qsort_args
: sgeobj pe pe_validate_qsort_argspe_validate_slots
: sgeobj pe pe_validate_slotspe_validate_urgency_slots
: sgeobj pe pe_validate_urgency_slotsPERM_Type
: gdi sge PERM_Typepolicy_hierarchy_char2enum
: sgeobj conf policy_hierarchy_char2enumpolicy_hierarchy_enum2char
: sgeobj conf policy_hierarchy_enum2charpolicy_hierarchy_verify_value
: sgeobj conf policy_hierarchy_verify_valueprj_list_append_to_dstring
: sgeobj userprj prj_list_append_to_dstringprj_list_locate
: sgeobj userprj prj_list_locateqinstance_check_owner
: sgeobj qinstance qinstance_check_ownerqinstance_debit_consumable
: sgeobj qinstance qinstance_debit_consumableqinstance_get_name
: sgeobj qinstance qinstance_get_nameqinstance_has_state
: sgeobj qinstance_state qinstance_has_stateqinstance_increase_qversion
: sgeobj qinstance qinstance_increase_qversionqinstance_is_a_ckpt_referenced
: sgeobj qinstance qinstance_is_a_ckpt_referencedqinstance_is_a_pe_referenced
: sgeobj qinstance qinstance_is_a_pe_referencedqinstance_is_calendar_referenced
: sgeobj qinstance qinstance_is_calendar_referencedqinstance_is_centry_a_complex_value
: sgeobj qinstance qinstance_is_centry_a_complex_valueqinstance_is_ckpt_referenced
: sgeobj qinstance qinstance_is_ckpt_referencedqinstance_is_pe_referenced
: sgeobj qinstance qinstance_is_pe_referencedqinstance_list_find_matching
: sgeobj qinstance qinstance_list_find_matchingqinstance_list_locate
: sgeobj qinstance qinstance_list_locateqinstance_list_locate2
: sgeobj qinstance qinstance_list_locate2qinstance_list_set_tag
: sgeobj qinstance qinstance_list_set_tagqinstance_list_validate
: sgeobj qinstance qinstance_list_validateqinstance_list_verify_execd_job
: sge_qinstance qinstance_list_verify_execd_jobqinstance_message_add
: sgeobj qinstance qinstance_message_addqinstance_message_trash_all_of_type_X
: sgeobj qinstance qinstance_message_trash_all_of_type_Xqinstance_set_error
: sge_qinstance qinstance_set_errorqinstance_set_full_name
: sgeobj qinstance qinstance_set_full_nameqinstance_set_slots_used
: sgeobj qinstance qinstance_set_slots_usedqinstance_slots_reserved
: sgeobj qinstance qinstance_slots_reservedqinstance_slots_used
: sgeobj qinstance qinstance_slots_usedqinstance_state_from_string
: sgeobj qinstance_state qinstance_state_from_stringqinstance_validate
: sgeobj qinstance qinstance_validateqinstance_verify
: sge_qinstance qinstance_verifyqinstance_verify_full_name
: sge_qinstance qinstance_verify_full_nameqref_cq_rejected
: sge_qref qref_cq_rejectedqref_list_add
: sgeobj qref qref_list_addqref_list_cq_rejected
: sge_qref qref_list_cq_rejectedqref_list_host_rejected
: sge_qref qref_list_host_rejectedqref_list_is_valid
: sgeobj qref qref_list_is_validqref_list_resolve
: sgeobj qref qref_list_resolveqref_list_trash_some_elemts
: sgeobj qref qref_list_trash_some_elemtsqtype_append_to_dstring
: sgeobj qinstance qtype_append_to_dstringrange_containes_id_less_than
: sgeobj range range_containes_id_less_thanrange_correct_end
: sgeobj range range_correct_endrange_get_all_ids
: sgeobj range range_get_all_idsrange_get_number_of_ids
: sgeobj range range_get_number_of_idsrange_is_id_within
: sgeobj range range_is_id_withinrange_is_overlapping
: sgeobj range range_is_overlappingrange_list_calculate_difference_set
: sgeobj range range_list_calculate_difference_setrange_list_calculate_intersection_set
: sgeobj range range_list_calculate_intersection_setrange_list_calculate_union_set
: sgeobj range range_list_calculate_union_setrange_list_compress
: sgeobj range range_list_compressrange_list_containes_id_less_than
: sgeobj range range_list_containes_id_less_thanrange_list_get_average
: sgeobj range range_list_get_averagerange_list_get_first_id
: sgeobj range range_list_get_first_idrange_list_get_last_id
: sgeobj range range_list_get_last_idrange_list_get_number_of_ids
: sgeobj range range_list_get_number_of_idsrange_list_initialize
: sgeobj range range_list_initializerange_list_insert_id
: sgeobj range range_list_insert_idrange_list_is_empty
: sgeobj range range_list_is_emptyrange_list_is_id_within
: sgeobj range range_list_is_id_withinrange_list_move_first_n_ids
: sgeobj range range_list_move_first_n_idsrange_list_print_to_string
: sgeobj range range_list_print_to_stringrange_list_remove_id
: sgeobj range range_list_remove_idrange_set_all_ids
: sgeobj range range_set_all_idsrange_to_dstring
: sgeobj range range_to_dstringreprioritize_interval_str
: sge_schedd_conf reprioritize_interval_strrqs_append_filter_to_dstring
: sge_resource_quota rqs_append_filter_to_dstringrqs_debit_consumable
: sge_resource_quota rqs_debit_consumablerqs_debit_rule_usage
: sge_resource_quota rqs_debit_rule_usagerqs_filter_match
: sge_resource_quota rqs_filter_matchrqs_get_matching_rule
: sge_resource_quota rqs_get_matching_rulerqs_get_rue_string
: sge_resource_quota rqs_get_rue_stringrqs_is_matching_rule
: sge_resource_quota rqs_is_matching_rulerqs_list_locate
: sge_resource_quota rqs_list_locaterqs_list_verify_attributes
: sge_resource_quota rqs_list_verify_attributesrqs_match_host_scope
: sge_resource_quota rqs_match_host_scoperqs_match_user_host_scope
: sge_resource_quota rqs_match_user_host_scoperqs_parse_filter_from_string
: sge_resource_quota rqs_parse_filter_from_stringrqs_replace_request_verify
: sge_resource_quota rqs_replace_request_verifyrqs_rule_locate
: sge_resource_quota rqs_rule_locaterqs_set_defaults
: sge_resource_quota rqs_set_defaultsrqs_verify_attributes
: sge_resource_quota rqs_verify_attributesrqs_verify_filter
: sge_resource_quota rqs_verify_filterrqs_xattr_pre_gdi
: sge_resource_quota rqs_xattr_pre_gdisc_state_init
: sge_schedd_conf sc_state_initschedd_conf_set_config
: sge_schedd_conf schedd_conf_set_configsconf_best_pe_alg
: sge_schedd_conf sconf_best_pe_algsconf_create_default
: sge_schedd_conf sconf_create_defaultsconf_disable_schedd_job_info
: sge_schedd_conf sconf_disable_schedd_job_infosconf_enable_schedd_job_info
: sge_schedd_conf sconf_enable_schedd_job_infosconf_eval_set_job_category_filtering
: sge_schedd_conf sconf_eval_set_job_category_filteringsconf_eval_set_monitoring
: sge_schedd_conf sconf_eval_set_monitoringsconf_eval_set_pe_range_alg
: sge_schedd_conf sconf_eval_set_pe_range_algsconf_eval_set_profiling
: sge_schedd_conf sconf_eval_set_profilingsconf_get_compensation_factor
: sge_schedd_conf sconf_get_compensation_factorsconf_get_config
: sge_schedd_conf sconf_get_configsconf_get_config_list
: sge_schedd_conf sconf_get_config_listsconf_get_flush_finish_sec
: sge_schedd_conf sconf_get_flush_finish_secsconf_get_flush_submit_sec
: sge_schedd_conf sconf_get_flush_submit_secsconf_get_halflife_decay_list
: sge_schedd_conf sconf_get_halflife_decay_listsconf_get_halftime
: sge_schedd_conf sconf_get_halftimesconf_get_job_load_adjustments
: sge_schedd_conf sconf_get_job_load_adjustmentssconf_get_load_adjustment_decay_time
: sge_schedd_conf sconf_get_load_adjustment_decay_timesconf_get_load_formula
: sge_schedd_conf sconf_get_load_formulasconf_get_max_functional_jobs_to_schedule
: sge_schedd_conf sconf_get_max_functional_jobs_to_schedulesconf_get_max_pending_tasks_per_job
: sge_schedd_conf sconf_get_max_pending_tasks_per_jobsconf_get_max_reservations
: sge_schedd_conf sconf_get_max_reservationssconf_get_maxujobs
: sge_schedd_conf sconf_get_maxujobssconf_get_queue_sort_method
: sge_schedd_conf sconf_get_queue_sort_methodsconf_get_report_pjob_tickets
: sge_schedd_conf sconf_get_report_pjob_ticketssconf_get_reprioritize_interval
: sge_schedd_conf sconf_get_reprioritize_intervalsconf_get_schedd_job_info
: sge_schedd_conf sconf_get_schedd_job_infosconf_get_schedd_job_info_range
: sge_schedd_conf sconf_get_schedd_job_info_rangesconf_get_schedule_interval
: sge_schedd_conf sconf_get_schedule_intervalsconf_get_share_functional_shares
: sge_schedd_conf sconf_get_share_functional_sharessconf_get_share_override_tickets
: sge_schedd_conf sconf_get_share_override_ticketssconf_get_usage_weight_list
: sge_schedd_conf sconf_get_usage_weight_listsconf_get_weight_deadline
: sge_schedd_conf sconf_get_weight_deadlinesconf_get_weight_department
: sge_schedd_conf sconf_get_weight_departmentsconf_get_weight_job
: sge_schedd_conf sconf_get_weight_jobsconf_get_weight_priority
: sge_schedd_conf sconf_get_weight_prioritysconf_get_weight_project
: sge_schedd_conf sconf_get_weight_projectsconf_get_weight_ticket
: sge_schedd_conf sconf_get_weight_ticketsconf_get_weight_tickets_functional
: sge_schedd_conf sconf_get_weight_tickets_functionalsconf_get_weight_tickets_override
: sge_schedd_conf sconf_get_weight_tickets_overridesconf_get_weight_tickets_share
: sge_schedd_conf sconf_get_weight_tickets_sharesconf_get_weight_urgency
: sge_schedd_conf sconf_get_weight_urgencysconf_get_weight_user
: sge_schedd_conf sconf_get_weight_usersconf_get_weight_waiting_time
: sge_schedd_conf sconf_get_weight_waiting_timesconf_is
: sge_schedd_conf sconf_issconf_is_centry_referenced
: sge_schedd_conf sconf_is_centry_referencedsconf_is_id_in_schedd_job_info_range
: sge_schedd_conf sconf_is_id_in_schedd_job_info_rangesconf_is_job_category_filtering
: sge_schedd_conf sconf_is_job_category_filteringsconf_is_new_config
: sge_schedd_conf sconf_is_new_configsconf_is_valid_load_formula
: sge_schedd_conf sconf_is_valid_load_formulasconf_ph_fill_array
: sgeobj conf sconf_ph_fill_arraysconf_ph_print_array
: sgeobj conf sconf_ph_print_arraysconf_print_config
: sge_schedd_conf sconf_print_configsconf_reset_new_config
: sge_schedd_conf sconf_reset_new_configsconf_set_weight_tickets_override
: sge_schedd_conf sconf_set_weight_tickets_overridesconf_update_pe_alg
: sge_schedd_conf sconf_update_pe_algsconf_validate_config
: sge_schedd_conf sconf_validate_configsconf_validate_config_
: sge_schedd_conf sconf_validate_config_serf_control
: sge_resource_utilization serf_controlsetConfFromCull
: sge_conf setConfFromCullsge_ar_has_errors
: sge_advance_reservation sge_ar_has_errorssge_centry_referenced_in_rqs
: sge_resource_quota sge_centry_referenced_in_rqssge_create_cull_order_pos
: sge_order sge_create_cull_order_possge_eval_expression
: sgeobj sge_eval_expression sge_eval_expressionsge_free_cull_order_pos
: sge_order sge_free_cull_order_possge_generic_ckpt
: src sge_generic_ckptsge_master_list
: sgeobj object sge_master_listsge_objectcompress_ressources
: sge_objectcompress_ressourcessge_parse_checkpoint_attr
: sgeobj ckpt sge_parse_checkpoint_attrsge_parse_hold_list
: cull_parse_util sge_parse_hold_listsge_parse_jobtasks
: parse sge_parse_jobtaskssge_search_unspecified_node
: sge_search_unspecified_nodesge_show_conf
: sge_conf sge_show_confsge_unparse_acl_dstring
: sge_job sge_unparse_acl_dstringsge_unparse_pe_dstring
: sge_job sge_unparse_pe_dstringsge_unparse_queue_list_dstring
: sge_job sge_unparse_queue_list_dstringsge_unparse_resource_list_dstring
: sge_job sge_unparse_resource_list_dstringsge_unparse_string_option_dstring
: sge_job sge_unparse_string_option_dstringsge_unparse_ulong_option_dstring
: sge_job sge_unparse_ulong_option_dstringso_list_resolve
: sgeobj subordinate so_list_resolvestr_list_append_to_dstring
: sgeobj str str_list_append_to_dstringstr_list_is_valid
: sgeobj str str_list_is_validstr_list_parse_from_string
: sgeobj str str_list_parse_from_stringSU_Type
: sgeobj suser SU_Typesuser_check_new_job
: sgeobj suser suser_check_new_jobsuser_decrease_job_counter
: sgeobj suser suser_decrease_job_countersuser_get_job_count
: sgeobj suser suser_get_job_countsuser_get_job_counter
: sgeobj suser suser_get_job_countersuser_increase_job_counter
: sgeobj suser suser_increase_job_countersuser_list_add
: sgeobj suser suser_list_addsuser_list_find
: sgeobj suser suser_list_findsuser_register_new_job
: sgeobj suser suser_register_new_jobsuser_unregister_job
: sgeobj suser suser_unregister_jobtransition_is_valid_for_qinstance
: sgeobj qinstance_state transition_is_valid_for_qinstanceulong_parse_date_time_from_string
: sge_ulong ulong_parse_date_time_from_stringusage_list_get_double_usage
: sgeobj usage usage_list_get_double_usageusage_list_get_ulong_usage
: sgeobj usage usage_list_get_ulong_usageusage_list_set_double_usage
: sgeobj usage usage_list_set_double_usageusage_list_set_ulong_usage
: sgeobj usage usage_list_set_ulong_usageusage_list_sum
: sge_usage usage_list_sumuser_list_locate
: sgeobj userprj user_list_locateuserset_get_type_string
: sgeobj userset userset_get_type_stringuserset_is_ar_user
: sge_userset userset_is_ar_useruserset_is_deadline_user
: sgeobj userset userset_is_deadline_useruserset_list_locate
: sgeobj userset userset_list_locateuserset_list_validate_access
: sge_userset userset_list_validate_accessuserset_list_validate_acl_list
: sgeobj userset userset_list_validate_acl_listuserset_set_type_string
: sgeobj userset userset_set_type_stringuserset_validate_entries
: sgeobj userset userset_validate_entriesvalidate_load_formula
: sge_centry validate_load_formulavar_get_sharedlib_path_name
: sgeobj var var_get_sharedlib_path_namevar_list_add_as_set
: sgeobj var var_list_add_as_setvar_list_copy_env_vars_and_value
: sgeobj var var_list_copy_env_vars_and_valuevar_list_copy_prefix_vars
: sgeobj var var_list_copy_prefix_varsvar_list_copy_prefix_vars_undef
: sgeobj var var_list_copy_prefix_vars_undefvar_list_delete_string
: sgeobj var var_list_delete_stringvar_list_dump_to_file
: sgeobj var var_list_dump_to_filevar_list_get_string
: sgeobj var var_list_get_stringvar_list_parse_from_string
: sge_var var_list_parse_from_stringvar_list_remove_prefix_vars
: sgeobj var var_list_remove_prefix_varsvar_list_set_int
: sgeobj var var_list_set_intvar_list_set_sge_u32
: sgeobj var var_list_set_sge_u32var_list_set_sharedlib_path
: sgeobj var var_list_set_sharedlib_pathvar_list_set_string
: sgeobj var var_list_set_stringvar_list_split_prefix_vars
: sgeobj var var_list_split_prefix_varsvar_list_verify
: sge_var var_list_verifyverify_host_name
: sge_utility verify_host_nameverify_str_key
: sge_utility verify_str_key