~ubuntu-branches/ubuntu/saucy/slurm-llnl/saucy

« back to all changes in this revision

Viewing changes to src/plugins/accounting_storage/none/accounting_storage_none.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2008-05-30 13:11:30 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080530131130-l6ko6aie7xhrlmxe
Tags: 1.3.3-1
* New upstream release
* Removed patches to src/slurmctd/controller.c src/slurmdbd/slurmdbd.c
  doc/man/man1/sacctmgr.1 included to upstream
* Edited watch file to seek for 1.3 releases
* doc/man/man1/salloc.1 doc/man/man1/sbatch.1 doc/man/man5/slurm.conf.5
  patched to improve formatting and avoid manual warnings 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************\
 
2
 *  accounting_storage_none.c - account interface to none.
 
3
 *
 
4
 *  $Id: accounting_storage_none.c 13061 2008-01-22 21:23:56Z da $
 
5
 *****************************************************************************
 
6
 *  Copyright (C) 2004-2007 The Regents of the University of California.
 
7
 *  Copyright (C) 2008 Lawrence Livermore National Security.
 
8
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
 
9
 *  Written by Danny Auble <da@llnl.gov>
 
10
 *  
 
11
 *  This file is part of SLURM, a resource management program.
 
12
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
13
 *  
 
14
 *  SLURM is free software; you can redistribute it and/or modify it under
 
15
 *  the terms of the GNU General Public License as published by the Free
 
16
 *  Software Foundation; either version 2 of the License, or (at your option)
 
17
 *  any later version.
 
18
 *
 
19
 *  In addition, as a special exception, the copyright holders give permission 
 
20
 *  to link the code of portions of this program with the OpenSSL library under
 
21
 *  certain conditions as described in each individual source file, and 
 
22
 *  distribute linked combinations including the two. You must obey the GNU 
 
23
 *  General Public License in all respects for all of the code used other than 
 
24
 *  OpenSSL. If you modify file(s) with this exception, you may extend this 
 
25
 *  exception to your version of the file(s), but you are not obligated to do 
 
26
 *  so. If you do not wish to do so, delete this exception statement from your
 
27
 *  version.  If you delete this exception statement from all source files in 
 
28
 *  the program, then also delete it here.
 
29
 *  
 
30
 *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
 
31
 *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
32
 *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
 
33
 *  details.
 
34
 *  
 
35
 *  You should have received a copy of the GNU General Public License along
 
36
 *  with SLURM; if not, write to the Free Software Foundation, Inc.,
 
37
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA.
 
38
\*****************************************************************************/
 
39
 
 
40
#include "src/common/slurm_accounting_storage.h"
 
41
 
 
42
/*
 
43
 * These variables are required by the generic plugin interface.  If they
 
44
 * are not found in the plugin, the plugin loader will ignore it.
 
45
 *
 
46
 * plugin_name - a string giving a human-readable description of the
 
47
 * plugin.  There is no maximum length, but the symbol must refer to
 
48
 * a valid string.
 
49
 *
 
50
 * plugin_type - a string suggesting the type of the plugin or its
 
51
 * applicability to a particular form of data or method of data handling.
 
52
 * If the low-level plugin API is used, the contents of this string are
 
53
 * unimportant and may be anything.  SLURM uses the higher-level plugin
 
54
 * interface which requires this string to be of the form
 
55
 *
 
56
 *      <application>/<method>
 
57
 *
 
58
 * where <application> is a description of the intended application of
 
59
 * the plugin (e.g., "jobacct" for SLURM job completion logging) and <method>
 
60
 * is a description of how this plugin satisfies that application.  SLURM will
 
61
 * only load job completion logging plugins if the plugin_type string has a 
 
62
 * prefix of "jobacct/".
 
63
 *
 
64
 * plugin_version - an unsigned 32-bit integer giving the version number
 
65
 * of the plugin.  If major and minor revisions are desired, the major
 
66
 * version number may be multiplied by a suitable magnitude constant such
 
67
 * as 100 or 1000.  Various SLURM versions will likely require a certain
 
68
 * minimum versions for their plugins as the job accounting API 
 
69
 * matures.
 
70
 */
 
71
const char plugin_name[] = "Accounting storage NOT INVOKED plugin";
 
72
const char plugin_type[] = "accounting_storage/none";
 
73
const uint32_t plugin_version = 100;
 
74
 
 
75
/*
 
76
 * init() is called when the plugin is loaded, before any other functions
 
77
 * are called.  Put global initialization here.
 
78
 */
 
79
extern int init ( void )
 
80
{
 
81
        verbose("%s loaded", plugin_name);
 
82
        return SLURM_SUCCESS;
 
83
}
 
84
 
 
85
extern int fini ( void )
 
86
{
 
87
        return SLURM_SUCCESS;
 
88
}
 
89
 
 
90
extern void * acct_storage_p_get_connection(bool make_agent, bool rollback)
 
91
{
 
92
        return NULL;
 
93
}
 
94
 
 
95
extern int acct_storage_p_close_connection(void **db_conn)
 
96
{
 
97
        return SLURM_SUCCESS;
 
98
}
 
99
 
 
100
extern int acct_storage_p_commit(void *db_conn, bool commit)
 
101
{
 
102
        return SLURM_SUCCESS;
 
103
}
 
104
 
 
105
extern int acct_storage_p_add_users(void *db_conn, uint32_t uid,
 
106
                                    List user_list)
 
107
{
 
108
        return SLURM_SUCCESS;
 
109
}
 
110
 
 
111
extern int acct_storage_p_add_coord(void *db_conn, uint32_t uid,
 
112
                                    char *acct, acct_user_cond_t *user_q)
 
113
{
 
114
        return SLURM_SUCCESS;
 
115
}
 
116
 
 
117
extern int acct_storage_p_add_accts(void *db_conn, uint32_t uid,
 
118
                                    List acct_list)
 
119
{
 
120
        return SLURM_SUCCESS;
 
121
}
 
122
 
 
123
extern int acct_storage_p_add_clusters(void *db_conn, uint32_t uid,
 
124
                                       List cluster_list)
 
125
{
 
126
        return SLURM_SUCCESS;
 
127
}
 
128
 
 
129
extern int acct_storage_p_add_associations(void *db_conn, uint32_t uid,
 
130
                                           List association_list)
 
131
{
 
132
        return SLURM_SUCCESS;
 
133
}
 
134
 
 
135
extern List acct_storage_p_modify_users(void *db_conn, uint32_t uid,
 
136
                                       acct_user_cond_t *user_q,
 
137
                                       acct_user_rec_t *user)
 
138
{
 
139
        return SLURM_SUCCESS;
 
140
}
 
141
 
 
142
extern List acct_storage_p_modify_accts(void *db_conn, uint32_t uid,
 
143
                                       acct_account_cond_t *acct_q,
 
144
                                       acct_account_rec_t *acct)
 
145
{
 
146
        return SLURM_SUCCESS;
 
147
}
 
148
 
 
149
extern List acct_storage_p_modify_clusters(void *db_conn, uint32_t uid,
 
150
                                          acct_cluster_cond_t *cluster_q,
 
151
                                          acct_cluster_rec_t *cluster)
 
152
{
 
153
        return SLURM_SUCCESS;
 
154
}
 
155
 
 
156
extern List acct_storage_p_modify_associations(void *db_conn, uint32_t uid,
 
157
                                              acct_association_cond_t *assoc_q,
 
158
                                              acct_association_rec_t *assoc)
 
159
{
 
160
        return SLURM_SUCCESS;
 
161
}
 
162
 
 
163
extern List acct_storage_p_remove_users(void *db_conn, uint32_t uid,
 
164
                                       acct_user_cond_t *user_q)
 
165
{
 
166
        return SLURM_SUCCESS;
 
167
}
 
168
 
 
169
extern List acct_storage_p_remove_coord(void *db_conn, uint32_t uid,
 
170
                                       char *acct, acct_user_cond_t *user_q)
 
171
{
 
172
        return SLURM_SUCCESS;
 
173
}
 
174
 
 
175
extern List acct_storage_p_remove_accts(void *db_conn, uint32_t uid,
 
176
                                       acct_account_cond_t *acct_q)
 
177
{
 
178
        return SLURM_SUCCESS;
 
179
}
 
180
 
 
181
extern List acct_storage_p_remove_clusters(void *db_conn, uint32_t uid,
 
182
                                          acct_account_cond_t *cluster_q)
 
183
{
 
184
        return SLURM_SUCCESS;
 
185
}
 
186
 
 
187
extern List acct_storage_p_remove_associations(void *db_conn, uint32_t uid,
 
188
                                              acct_association_cond_t *assoc_q)
 
189
{
 
190
        return SLURM_SUCCESS;
 
191
}
 
192
 
 
193
extern List acct_storage_p_get_users(void *db_conn,
 
194
                                     acct_user_cond_t *user_q)
 
195
{
 
196
        return NULL;
 
197
}
 
198
 
 
199
extern List acct_storage_p_get_accts(void *db_conn,
 
200
                                     acct_account_cond_t *acct_q)
 
201
{
 
202
        return NULL;
 
203
}
 
204
 
 
205
extern List acct_storage_p_get_clusters(void *db_conn,
 
206
                                        acct_account_cond_t *cluster_q)
 
207
{
 
208
        return NULL;
 
209
}
 
210
 
 
211
extern List acct_storage_p_get_associations(void *db_conn,
 
212
                                            acct_association_cond_t *assoc_q)
 
213
{
 
214
        return NULL;
 
215
}
 
216
 
 
217
extern int acct_storage_p_get_usage(void *db_conn,
 
218
                                    acct_association_rec_t *acct_assoc,
 
219
                                    time_t start, time_t end)
 
220
{
 
221
        int rc = SLURM_SUCCESS;
 
222
 
 
223
        return rc;
 
224
}
 
225
 
 
226
extern int acct_storage_p_roll_usage(void *db_conn, 
 
227
                                     time_t sent_start)
 
228
{
 
229
        int rc = SLURM_SUCCESS;
 
230
 
 
231
        return rc;
 
232
}
 
233
 
 
234
extern int clusteracct_storage_p_node_down(void *db_conn,
 
235
                                           char *cluster,
 
236
                                           struct node_record *node_ptr,
 
237
                                           time_t event_time, char *reason)
 
238
{
 
239
        return SLURM_SUCCESS;
 
240
}
 
241
extern int clusteracct_storage_p_node_up(void *db_conn,
 
242
                                         char *cluster,
 
243
                                         struct node_record *node_ptr,
 
244
                                         time_t event_time)
 
245
{
 
246
        return SLURM_SUCCESS;
 
247
}
 
248
 
 
249
extern int clusteracct_storage_p_register_ctld(char *cluster,
 
250
                                               uint16_t port)
 
251
{
 
252
        return SLURM_SUCCESS;
 
253
}
 
254
 
 
255
extern int clusteracct_storage_p_cluster_procs(void *db_conn,
 
256
                                               char *cluster,
 
257
                                               uint32_t procs,
 
258
                                               time_t event_time)
 
259
{
 
260
        return SLURM_SUCCESS;
 
261
}
 
262
 
 
263
extern int clusteracct_storage_p_get_usage(
 
264
        void *db_conn,
 
265
        acct_cluster_rec_t *cluster_rec, time_t start, time_t end)
 
266
{
 
267
 
 
268
        return SLURM_SUCCESS;
 
269
}
 
270
 
 
271
/* 
 
272
 * load into the storage the start of a job
 
273
 */
 
274
extern int jobacct_storage_p_job_start(void *db_conn,
 
275
                                       struct job_record *job_ptr)
 
276
{
 
277
        return SLURM_SUCCESS;
 
278
}
 
279
 
 
280
/* 
 
281
 * load into the storage the end of a job
 
282
 */
 
283
extern int jobacct_storage_p_job_complete(void *db_conn,
 
284
                                          struct job_record *job_ptr)
 
285
{
 
286
        return SLURM_SUCCESS;
 
287
}
 
288
 
 
289
/* 
 
290
 * load into the storage the start of a job step
 
291
 */
 
292
extern int jobacct_storage_p_step_start(void *db_conn,
 
293
                                        struct step_record *step_ptr)
 
294
{
 
295
        return SLURM_SUCCESS;
 
296
}
 
297
 
 
298
/* 
 
299
 * load into the storage the end of a job step
 
300
 */
 
301
extern int jobacct_storage_p_step_complete(void *db_conn,
 
302
                                           struct step_record *step_ptr)
 
303
{
 
304
        return SLURM_SUCCESS;
 
305
}
 
306
 
 
307
/* 
 
308
 * load into the storage a suspention of a job
 
309
 */
 
310
extern int jobacct_storage_p_suspend(void *db_conn,
 
311
                                     struct job_record *job_ptr)
 
312
{
 
313
        return SLURM_SUCCESS;
 
314
}
 
315
 
 
316
/* 
 
317
 * get info from the storage 
 
318
 * returns List of job_rec_t *
 
319
 * note List needs to be freed when called
 
320
 */
 
321
extern List jobacct_storage_p_get_jobs(void *db_conn,
 
322
                                       List selected_steps,
 
323
                                       List selected_parts,
 
324
                                       void *params)
 
325
{
 
326
        return NULL;
 
327
}
 
328
 
 
329
/* 
 
330
 * expire old info from the storage 
 
331
 */
 
332
extern void jobacct_storage_p_archive(void *db_conn,
 
333
                                      List selected_parts,
 
334
                                      void *params)
 
335
{
 
336
        return;
 
337
}
 
338
 
 
339
extern int acct_storage_p_update_shares_used(void *db_conn,
 
340
                                             List shares_used)
 
341
{
 
342
        return SLURM_SUCCESS;
 
343
}
 
344
 
 
345
extern int acct_storage_p_flush_jobs_on_cluster(
 
346
        void *db_conn, char *cluster, time_t event_time)
 
347
{
 
348
        return SLURM_SUCCESS;
 
349
}