~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/daemons/qmaster/sge_reporting_qmaster.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _SGE_REPORTING_QMASTER_H_
 
2
#define _SGE_REPORTING_QMASTER_H_
 
3
/*___INFO__MARK_BEGIN__*/
 
4
/*************************************************************************
 
5
 * 
 
6
 *  The Contents of this file are made available subject to the terms of
 
7
 *  the Sun Industry Standards Source License Version 1.2
 
8
 * 
 
9
 *  Sun Microsystems Inc., March, 2001
 
10
 * 
 
11
 * 
 
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
 
18
 * 
 
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.
 
25
 * 
 
26
 *   The Initial Developer of the Original Code is: Sun Microsystems, Inc.
 
27
 * 
 
28
 *   Copyright: 2001 by Sun Microsystems, Inc.
 
29
 * 
 
30
 *   All Rights Reserved.
 
31
 * 
 
32
 ************************************************************************/
 
33
/*___INFO__MARK_END__*/
 
34
 
 
35
#include "cull.h"
 
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"
 
42
 
 
43
typedef enum {
 
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 */
 
59
 
 
60
   JL_ALL
 
61
} job_log_t;
 
62
 
 
63
bool
 
64
reporting_initialize(lList **answer_list);
 
65
 
 
66
bool
 
67
reporting_shutdown(sge_gdi_ctx_class_t *ctx, lList **answer_list, bool do_spool);
 
68
 
 
69
void
 
70
reporting_trigger_handler(sge_gdi_ctx_class_t *ctx, te_event_t anEvent, monitoring_t *monitor);
 
71
 
 
72
bool
 
73
reporting_create_new_job_record(lList **answer_list, const lListElem *job);
 
74
 
 
75
bool 
 
76
reporting_create_job_log(lList **answer_list,
 
77
                         u_long32 event_time,
 
78
                         const job_log_t,
 
79
                         const char *user,
 
80
                         const char *host,
 
81
                         const lListElem *job_report,
 
82
                         const lListElem *job, const lListElem *ja_task,
 
83
                         const lListElem *pe_task,
 
84
                         const char *message);
 
85
 
 
86
bool
 
87
reporting_create_acct_record(sge_gdi_ctx_class_t *ctx,
 
88
                             lList **answer_list, 
 
89
                             lListElem *job_report, 
 
90
                             lListElem *job, 
 
91
                             lListElem *ja_task, 
 
92
                             bool intermediate);
 
93
 
 
94
bool
 
95
reporting_create_host_record(lList **answer_list,
 
96
                             const lListElem *host,
 
97
                             u_long32 report_time);
 
98
 
 
99
bool
 
100
reporting_create_host_consumable_record(lList **answer_list,
 
101
                                        const lListElem *host,
 
102
                                        const lListElem *job,
 
103
                                        u_long32 report_time);
 
104
 
 
105
bool
 
106
reporting_create_queue_record(lList **answer_list,
 
107
                              const lListElem *queue,
 
108
                              u_long32 report_time);
 
109
 
 
110
bool
 
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);
 
116
 
 
117
bool
 
118
reporting_is_intermediate_acct_required(const lListElem *job, 
 
119
                                        const lListElem *ja_task, 
 
120
                                        const lListElem *pe_task);
 
121
 
 
122
bool
 
123
reporting_create_new_ar_record(lList **answer_list, 
 
124
                               const lListElem *ar,
 
125
                               u_long32 report_time);
 
126
 
 
127
bool
 
128
reporting_create_ar_attribute_record(lList **answer_list,
 
129
                                     const lListElem *ar,
 
130
                                     u_long32 report_time);
 
131
 
 
132
bool
 
133
reporting_create_ar_log_record(lList **answer_list,
 
134
                               const lListElem *ar,
 
135
                               ar_state_event_t state,
 
136
                               const char *ar_description,
 
137
                               u_long32 report_time);
 
138
 
 
139
bool
 
140
reporting_create_ar_acct_records(lList **answer_list,
 
141
                                const lListElem *ar,
 
142
                                u_long32 report_time);
 
143
 
 
144
#endif /* _SGE_REPORTING_QMASTER_H_ */
 
145