1
#ifndef _SGE_REPORTING_QMASTER_H_
2
#define _SGE_REPORTING_QMASTER_H_
3
/*___INFO__MARK_BEGIN__*/
4
/*************************************************************************
6
* The Contents of this file are made available subject to the terms of
7
* the Sun Industry Standards Source License Version 1.2
9
* Sun Microsystems Inc., March, 2001
12
* Sun Industry Standards Source License Version 1.2
13
* =================================================
14
* The contents of this file are subject to the Sun Industry Standards
15
* Source License Version 1.2 (the "License"); You may not use this file
16
* except in compliance with the License. You may obtain a copy of the
17
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
19
* Software provided under this License is provided on an "AS IS" basis,
20
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
21
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
22
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
23
* See the License for the specific provisions governing your rights and
24
* obligations concerning the Software.
26
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
28
* Copyright: 2001 by Sun Microsystems, Inc.
30
* All Rights Reserved.
32
************************************************************************/
33
/*___INFO__MARK_END__*/
36
#include "sge_dstring.h"
37
#include "sge_object.h"
38
#include "sge_qmaster_timed_event.h"
39
#include "uti/sge_monitor.h"
40
#include "gdi/sge_gdi_ctx.h"
41
#include "sgeobj/sge_advance_reservation.h"
44
JL_UNKNOWN = 0, /* job is in unknown state - should never be seen */
45
JL_PENDING, /* job is pending */
46
JL_SENT, /* job has been sent to execd */
47
JL_RESENT, /* job has been resent to execd - sent hasn't been ack */
48
JL_DELIVERED, /* job has been delivered - execd replied with ack */
49
JL_RUNNING, /* job is running (reported by execd) */
50
JL_SUSPENDED, /* job has been suspended */
51
JL_UNSUSPENDED, /* job has been unsuspended */
52
JL_HELD, /* a hold was applied */
53
JL_RELEASED, /* all holds were released */
54
JL_RESTART, /* a restart of the job was requested */
55
JL_MIGRATE, /* a migration was requested */
56
JL_DELETED, /* the job has been deleted */
57
JL_FINISHED, /* the job has finished */
58
JL_ERROR, /* job is in error state */
64
reporting_initialize(lList **answer_list);
67
reporting_shutdown(sge_gdi_ctx_class_t *ctx, lList **answer_list, bool do_spool);
70
reporting_trigger_handler(sge_gdi_ctx_class_t *ctx, te_event_t anEvent, monitoring_t *monitor);
73
reporting_create_new_job_record(lList **answer_list, const lListElem *job);
76
reporting_create_job_log(lList **answer_list,
81
const lListElem *job_report,
82
const lListElem *job, const lListElem *ja_task,
83
const lListElem *pe_task,
87
reporting_create_acct_record(sge_gdi_ctx_class_t *ctx,
89
lListElem *job_report,
95
reporting_create_host_record(lList **answer_list,
96
const lListElem *host,
97
u_long32 report_time);
100
reporting_create_host_consumable_record(lList **answer_list,
101
const lListElem *host,
102
const lListElem *job,
103
u_long32 report_time);
106
reporting_create_queue_record(lList **answer_list,
107
const lListElem *queue,
108
u_long32 report_time);
111
reporting_create_queue_consumable_record(lList **answer_list,
112
const lListElem *host,
113
const lListElem *queue,
114
const lListElem *job,
115
u_long32 report_time);
118
reporting_is_intermediate_acct_required(const lListElem *job,
119
const lListElem *ja_task,
120
const lListElem *pe_task);
123
reporting_create_new_ar_record(lList **answer_list,
125
u_long32 report_time);
128
reporting_create_ar_attribute_record(lList **answer_list,
130
u_long32 report_time);
133
reporting_create_ar_log_record(lList **answer_list,
135
ar_state_event_t state,
136
const char *ar_description,
137
u_long32 report_time);
140
reporting_create_ar_acct_records(lList **answer_list,
142
u_long32 report_time);
144
#endif /* _SGE_REPORTING_QMASTER_H_ */