~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to src/api/config_info.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *  config_info.c - get/print the system configuration information of slurm
3
3
 *****************************************************************************
4
4
 *  Copyright (C) 2002-2007 The Regents of the University of California.
5
 
 *  Copyright (C) 2008 Lawrence Livermore National Security.
 
5
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
6
6
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
7
7
 *  Written by Morris Jette <jette1@llnl.gov> and Kevin Tew <tew1@llnl.gov>.
8
 
 *  LLNL-CODE-402394.
 
8
 *  CODE-OCEC-09-009. All rights reserved.
9
9
 *  
10
10
 *  This file is part of SLURM, a resource management program.
11
 
 *  For details, see <http://www.llnl.gov/linux/slurm/>.
 
11
 *  For details, see <https://computing.llnl.gov/linux/slurm/>.
 
12
 *  Please also read the included file: DISCLAIMER.
12
13
 *  
13
14
 *  SLURM is free software; you can redistribute it and/or modify it under
14
15
 *  the terms of the GNU General Public License as published by the Free
47
48
 
48
49
#include "src/api/job_info.h"
49
50
#include "src/common/parse_time.h"
 
51
#include "src/common/read_config.h"
50
52
#include "src/common/slurm_auth.h"
51
53
#include "src/common/slurm_protocol_api.h"
 
54
#include "src/common/slurm_resource_info.h"
 
55
#include "src/common/xmalloc.h"
 
56
#include "src/common/xstring.h"
 
57
#include "src/common/list.h"
52
58
 
53
59
/*
54
60
 * slurm_api_version - Return a single number reflecting the SLURM API's 
87
93
        }
88
94
}
89
95
 
90
 
static char *_task_plugin_param(uint16_t task_plugin_param)
 
96
static char *
 
97
_reset_period_str(uint16_t reset_period)
91
98
{
92
 
        switch(task_plugin_param) {
93
 
                case TASK_PARAM_NONE:
94
 
                        return "none";
95
 
                case TASK_PARAM_CPUSETS:
96
 
                        return "cpusets";
97
 
                case TASK_PARAM_SCHED:
98
 
                        return "sched";
 
99
        switch (reset_period) {
 
100
                case PRIORITY_RESET_NONE:
 
101
                        return "NONE";
 
102
                case PRIORITY_RESET_NOW:
 
103
                        return "NOW";
 
104
                case PRIORITY_RESET_DAILY:
 
105
                        return "DAILY";
 
106
                case PRIORITY_RESET_WEEKLY:
 
107
                        return "WEEKLY";
 
108
                case PRIORITY_RESET_MONTHLY:
 
109
                        return "MONTHLY";
 
110
                case PRIORITY_RESET_QUARTERLY:
 
111
                        return "QUARTERLY";
 
112
                case PRIORITY_RESET_YEARLY:
 
113
                        return "YEARLY";
99
114
                default:
100
 
                        return "unknown";
 
115
                        return "UNKNOWN";
101
116
        }
102
117
}
103
118
 
110
125
void slurm_print_ctl_conf ( FILE* out, 
111
126
                            slurm_ctl_conf_info_msg_t * slurm_ctl_conf_ptr )
112
127
{
113
 
        char time_str[32], tmp_str[128];
114
 
 
 
128
        char time_str[32], tmp_str[128], *xbuf;
 
129
        char *select_title = "";
 
130
#ifdef HAVE_BGL
 
131
        select_title = "Bluegene/L configuration";
 
132
#endif
 
133
#ifdef HAVE_BGP
 
134
        select_title = "Bluegene/P configuration";
 
135
#endif
 
136
#ifdef HAVE_BGQ
 
137
        select_title = "Bluegene/Q configuration";
 
138
#endif
115
139
        if ( slurm_ctl_conf_ptr == NULL )
116
140
                return ;
117
141
 
118
142
        slurm_make_time_str ((time_t *)&slurm_ctl_conf_ptr->last_update, 
119
143
                             time_str, sizeof(time_str));
120
144
        fprintf(out, "Configuration data as of %s\n", time_str);
121
 
        fprintf(out, "AccountingStorageEnforce = %u\n",
122
 
                slurm_ctl_conf_ptr->accounting_storage_enforce);
 
145
        fprintf(out, "AccountingStorageBackupHost = %s\n", 
 
146
                slurm_ctl_conf_ptr->accounting_storage_backup_host);
 
147
        accounting_enforce_string(
 
148
                slurm_ctl_conf_ptr->accounting_storage_enforce,
 
149
                tmp_str, sizeof(tmp_str));
 
150
        fprintf(out, "AccountingStorageEnforce = %s\n", tmp_str);
123
151
        fprintf(out, "AccountingStorageHost   = %s\n", 
124
152
                slurm_ctl_conf_ptr->accounting_storage_host);
125
153
        fprintf(out, "AccountingStorageLoc    = %s\n", 
138
166
                slurm_ctl_conf_ptr->backup_addr);
139
167
        fprintf(out, "BackupController        = %s\n", 
140
168
                slurm_ctl_conf_ptr->backup_controller);
 
169
        fprintf(out, "BatchStartTimeout       = %u sec\n", 
 
170
                slurm_ctl_conf_ptr->batch_start_timeout);
141
171
        slurm_make_time_str ((time_t *)&slurm_ctl_conf_ptr->boot_time,
142
172
                             time_str, sizeof(time_str));
143
173
        fprintf(out, "BOOT_TIME               = %s\n",
148
178
                slurm_ctl_conf_ptr->checkpoint_type);
149
179
        fprintf(out, "ClusterName             = %s\n",
150
180
                slurm_ctl_conf_ptr->cluster_name);
 
181
        fprintf(out, "CompleteWait            = %u sec\n", 
 
182
                slurm_ctl_conf_ptr->complete_wait);
151
183
        fprintf(out, "ControlAddr             = %s\n", 
152
184
                slurm_ctl_conf_ptr->control_addr);
153
185
        fprintf(out, "ControlMachine          = %s\n", 
154
186
                slurm_ctl_conf_ptr->control_machine);
155
187
        fprintf(out, "CryptoType              = %s\n",
156
188
                slurm_ctl_conf_ptr->crypto_type);
 
189
 
 
190
        xbuf = debug_flags2str(slurm_ctl_conf_ptr->debug_flags);
 
191
        fprintf(out, "DebugFlags              = %s\n", xbuf);
 
192
        xfree(xbuf);
 
193
 
157
194
        if (slurm_ctl_conf_ptr->def_mem_per_task & MEM_PER_CPU) {
158
 
                fprintf(out, "DefMemPerCPU            = %u\n",
 
195
                fprintf(out, "DefMemPerCPU            = %u MB\n",
159
196
                        slurm_ctl_conf_ptr->def_mem_per_task &
160
197
                        (~MEM_PER_CPU));
161
198
        } else if (slurm_ctl_conf_ptr->def_mem_per_task) {
162
 
                fprintf(out, "DefMemPerNode           = %u\n",
 
199
                fprintf(out, "DefMemPerNode           = %u MB\n",
163
200
                        slurm_ctl_conf_ptr->def_mem_per_task);
164
201
        } else
165
202
                fprintf(out, "DefMemPerCPU            = UNLIMITED\n");
 
203
 
166
204
        if (slurm_ctl_conf_ptr->disable_root_jobs)
167
205
                fprintf(out, "DisableRootJobs         = YES\n");
168
206
        else
169
207
                fprintf(out, "DisableRootJobs         = NO\n");
170
 
#if 0
171
 
/* Add in Slurm v1.4 */
 
208
 
172
209
        if (slurm_ctl_conf_ptr->enforce_part_limits)
173
210
                fprintf(out, "EnforcePartLimits       = YES\n");
174
211
        else
175
212
                fprintf(out, "EnforcePartLimits       = NO\n");
176
 
#endif
177
213
        fprintf(out, "Epilog                  = %s\n",
178
214
                slurm_ctl_conf_ptr->epilog);
179
 
        fprintf(out, "EpilogMsgTime           = %u\n",
 
215
        fprintf(out, "EpilogMsgTime           = %u usec\n",
180
216
                slurm_ctl_conf_ptr->epilog_msg_time);
 
217
        fprintf(out, "EpilogSlurmctld         = %s\n", 
 
218
                slurm_ctl_conf_ptr->epilog_slurmctld);
181
219
        fprintf(out, "FastSchedule            = %u\n",
182
220
                slurm_ctl_conf_ptr->fast_schedule);
183
221
        fprintf(out, "FirstJobId              = %u\n",
184
222
                slurm_ctl_conf_ptr->first_job_id);
185
 
        fprintf(out, "GetEnvTimeout           = %u\n",
 
223
        fprintf(out, "GetEnvTimeout           = %u sec\n",
186
224
                slurm_ctl_conf_ptr->get_env_timeout);
187
 
        fprintf(out, "HealthCheckInterval     = %u\n",
 
225
        fprintf(out, "HealthCheckInterval     = %u sec\n",
188
226
                slurm_ctl_conf_ptr->health_check_interval);
189
227
        fprintf(out, "HealthCheckProgram      = %s\n",
190
228
                slurm_ctl_conf_ptr->health_check_program);
191
229
#ifdef HAVE_XCPU
192
230
        fprintf(out, "HAVE_XCPU               = %d\n", HAVE_XCPU);
193
231
#endif
194
 
        fprintf(out, "InactiveLimit           = %u\n",
 
232
        fprintf(out, "InactiveLimit           = %u sec\n",
195
233
                slurm_ctl_conf_ptr->inactive_limit);
196
 
        fprintf(out, "JobAcctGatherFrequency  = %u\n",
 
234
        fprintf(out, "JobAcctGatherFrequency  = %u sec\n",
197
235
                slurm_ctl_conf_ptr->job_acct_gather_freq);
198
236
        fprintf(out, "JobAcctGatherType       = %s\n",
199
237
                slurm_ctl_conf_ptr->job_acct_gather_type);
 
238
        fprintf(out, "JobCheckpointDir        = %s\n",
 
239
                slurm_ctl_conf_ptr->job_ckpt_dir);
200
240
        fprintf(out, "JobCompHost             = %s\n",
201
241
                slurm_ctl_conf_ptr->job_comp_host);
202
242
        fprintf(out, "JobCompLoc              = %s\n",
217
257
                slurm_ctl_conf_ptr->job_file_append);
218
258
        fprintf(out, "JobRequeue              = %u\n",
219
259
                slurm_ctl_conf_ptr->job_requeue);
220
 
        fprintf(out, "KillWait                = %u\n", 
 
260
        fprintf(out, "KillOnBadExit           = %u\n", 
 
261
                slurm_ctl_conf_ptr->kill_on_bad_exit);
 
262
        fprintf(out, "KillWait                = %u sec\n", 
221
263
                slurm_ctl_conf_ptr->kill_wait);
222
264
        fprintf(out, "Licenses                = %s\n",
223
265
                slurm_ctl_conf_ptr->licenses);
226
268
        fprintf(out, "MaxJobCount             = %u\n", 
227
269
                slurm_ctl_conf_ptr->max_job_cnt);
228
270
        if (slurm_ctl_conf_ptr->max_mem_per_task & MEM_PER_CPU) {
229
 
                fprintf(out, "MaxMemPerCPU            = %u\n",
 
271
                fprintf(out, "MaxMemPerCPU            = %u MB\n",
230
272
                        slurm_ctl_conf_ptr->max_mem_per_task &
231
273
                        (~MEM_PER_CPU));
232
274
        } else if (slurm_ctl_conf_ptr->max_mem_per_task) {
233
 
                fprintf(out, "MaxMemPerNode           = %u\n",
 
275
                fprintf(out, "MaxMemPerNode           = %u MB\n",
234
276
                        slurm_ctl_conf_ptr->max_mem_per_task);
235
277
        } else
236
278
                fprintf(out, "MaxMemPerCPU            = UNLIMITED\n");
237
 
        fprintf(out, "MessageTimeout          = %u\n",
 
279
        fprintf(out, "MessageTimeout          = %u sec\n",
238
280
                slurm_ctl_conf_ptr->msg_timeout);
239
 
        fprintf(out, "MinJobAge               = %u\n", 
 
281
        fprintf(out, "MinJobAge               = %u sec\n", 
240
282
                slurm_ctl_conf_ptr->min_job_age);
241
283
        fprintf(out, "MpiDefault              = %s\n",
242
284
                slurm_ctl_conf_ptr->mpi_default);
 
285
        fprintf(out, "MpiParams               = %s\n",
 
286
                slurm_ctl_conf_ptr->mpi_params);
243
287
#ifdef MULTIPLE_SLURMD
244
288
        fprintf(out, "MULTIPLE_SLURMD         = %d\n", MULTIPLE_SLURMD);
245
289
#endif
246
290
        fprintf(out, "NEXT_JOB_ID             = %u\n",
247
291
                slurm_ctl_conf_ptr->next_job_id);
 
292
        if (slurm_ctl_conf_ptr->over_time_limit == (uint16_t) INFINITE)
 
293
                fprintf(out, "OverTimeLimit           = UNLIMITED\n");
 
294
        else {
 
295
                fprintf(out, "OverTimeLimit           = %u min\n",
 
296
                        slurm_ctl_conf_ptr->over_time_limit);
 
297
        }
248
298
        fprintf(out, "PluginDir               = %s\n", 
249
299
                slurm_ctl_conf_ptr->plugindir);
250
300
        fprintf(out, "PlugStackConfig         = %s\n",
251
301
                slurm_ctl_conf_ptr->plugstack);
 
302
 
 
303
        if (strcmp(slurm_ctl_conf_ptr->priority_type, "priority/basic") == 0) {
 
304
                fprintf(out, "PriorityType            = %s\n",
 
305
                        slurm_ctl_conf_ptr->priority_type);
 
306
        } else {
 
307
                secs2time_str((time_t) slurm_ctl_conf_ptr->priority_decay_hl,
 
308
                              tmp_str, sizeof(tmp_str));
 
309
                fprintf(out, "PriorityDecayHalfLife   = %s\n", tmp_str);
 
310
                fprintf(out, "PriorityFavorSmall      = %u\n",
 
311
                        slurm_ctl_conf_ptr->priority_favor_small);
 
312
                secs2time_str((time_t) slurm_ctl_conf_ptr->priority_max_age,
 
313
                              tmp_str, sizeof(tmp_str));
 
314
                fprintf(out, "PriorityMaxAge          = %s\n", tmp_str);
 
315
                fprintf(out, "PriorityUsageResetPeriod = %s\n", 
 
316
                        _reset_period_str(slurm_ctl_conf_ptr->
 
317
                                          priority_reset_period));
 
318
                fprintf(out, "PriorityType            = %s\n",
 
319
                        slurm_ctl_conf_ptr->priority_type);
 
320
                fprintf(out, "PriorityWeightAge       = %u\n",
 
321
                        slurm_ctl_conf_ptr->priority_weight_age);
 
322
                fprintf(out, "PriorityWeightFairShare = %u\n",
 
323
                        slurm_ctl_conf_ptr->priority_weight_fs);
 
324
                fprintf(out, "PriorityWeightJobSize   = %u\n",
 
325
                        slurm_ctl_conf_ptr->priority_weight_js);
 
326
                fprintf(out, "PriorityWeightPartition = %u\n",
 
327
                        slurm_ctl_conf_ptr->priority_weight_part);
 
328
                fprintf(out, "PriorityWeightQOS       = %u\n",
 
329
                        slurm_ctl_conf_ptr->priority_weight_qos);
 
330
        }
 
331
 
252
332
        private_data_string(slurm_ctl_conf_ptr->private_data,
253
333
                            tmp_str, sizeof(tmp_str));
254
334
        fprintf(out, "PrivateData             = %s\n", tmp_str);
256
336
                slurm_ctl_conf_ptr->proctrack_type);
257
337
        fprintf(out, "Prolog                  = %s\n", 
258
338
                slurm_ctl_conf_ptr->prolog);
 
339
        fprintf(out, "PrologSlurmctld         = %s\n", 
 
340
                slurm_ctl_conf_ptr->prolog_slurmctld);
259
341
        fprintf(out, "PropagatePrioProcess    = %u\n",
260
342
                slurm_ctl_conf_ptr->propagate_prio_process);
261
343
        fprintf(out, "PropagateResourceLimits = %s\n",
264
346
                slurm_ctl_conf_ptr->propagate_rlimits_except);
265
347
        fprintf(out, "ResumeProgram           = %s\n", 
266
348
                slurm_ctl_conf_ptr->resume_program);
267
 
        fprintf(out, "ResumeRate              = %u\n", 
 
349
        fprintf(out, "ResumeRate              = %u nodes/min\n", 
268
350
                slurm_ctl_conf_ptr->resume_rate);
 
351
        fprintf(out, "ResumeTimeout           = %u sec\n", 
 
352
                slurm_ctl_conf_ptr->resume_timeout);
 
353
        if (slurm_ctl_conf_ptr->resv_over_run == (uint16_t) INFINITE)
 
354
                fprintf(out, "ResvOverRun             = UNLIMITED\n");
 
355
        else {
 
356
                fprintf(out, "ResvOverRun             = %u min\n",
 
357
                        slurm_ctl_conf_ptr->resv_over_run);
 
358
        }
269
359
        fprintf(out, "ReturnToService         = %u\n", 
270
360
                slurm_ctl_conf_ptr->ret2service);
 
361
        if (slurm_ctl_conf_ptr->salloc_default_command) {
 
362
                fprintf(out, "SallocDefaultCommand    = \"%s\"\n",
 
363
                        slurm_ctl_conf_ptr->salloc_default_command);
 
364
        } else {
 
365
                fprintf(out, "SallocDefaultCommand    = %s\n",
 
366
                        slurm_ctl_conf_ptr->salloc_default_command);
 
367
        }
271
368
        fprintf(out, "SchedulerParameters     = %s\n",
272
369
                slurm_ctl_conf_ptr->sched_params);
273
370
        fprintf(out, "SchedulerPort           = %u\n",
274
371
                slurm_ctl_conf_ptr->schedport);
275
372
        fprintf(out, "SchedulerRootFilter     = %u\n",
276
373
                slurm_ctl_conf_ptr->schedrootfltr);
277
 
        fprintf(out, "SchedulerTimeSlice      = %u\n",
 
374
        fprintf(out, "SchedulerTimeSlice      = %u sec\n",
278
375
                slurm_ctl_conf_ptr->sched_time_slice);
279
376
        fprintf(out, "SchedulerType           = %s\n",
280
377
                slurm_ctl_conf_ptr->schedtype);
296
393
                slurm_ctl_conf_ptr->slurmctld_pidfile);
297
394
        fprintf(out, "SlurmctldPort           = %u\n", 
298
395
                slurm_ctl_conf_ptr->slurmctld_port);
299
 
        fprintf(out, "SlurmctldTimeout        = %u\n", 
 
396
        fprintf(out, "SlurmctldTimeout        = %u sec\n", 
300
397
                slurm_ctl_conf_ptr->slurmctld_timeout);
301
398
        fprintf(out, "SlurmdDebug             = %u\n", 
302
399
                slurm_ctl_conf_ptr->slurmd_debug);
310
407
#endif
311
408
        fprintf(out, "SlurmdSpoolDir          = %s\n", 
312
409
                slurm_ctl_conf_ptr->slurmd_spooldir);
313
 
        fprintf(out, "SlurmdTimeout           = %u\n", 
 
410
        fprintf(out, "SlurmdTimeout           = %u sec\n", 
314
411
                slurm_ctl_conf_ptr->slurmd_timeout);
315
 
        fprintf(out, "SLURM_CONFIG_FILE       = %s\n", 
 
412
        fprintf(out, "SlurmdUser              = %s(%u)\n", 
 
413
                slurm_ctl_conf_ptr->slurmd_user_name,
 
414
                slurm_ctl_conf_ptr->slurmd_user_id);
 
415
        fprintf(out, "SLURM_CONF              = %s\n", 
316
416
                slurm_ctl_conf_ptr->slurm_conf);
317
417
        fprintf(out, "SLURM_VERSION           = %s\n", SLURM_VERSION);
318
418
        fprintf(out, "SrunEpilog              = %s\n",
319
419
                slurm_ctl_conf_ptr->srun_epilog);
 
420
        fprintf(out, "SrunIOTimeout           = %u sec\n", 
 
421
                slurm_ctl_conf_ptr->srun_io_timeout);
320
422
        fprintf(out, "SrunProlog              = %s\n",
321
423
                slurm_ctl_conf_ptr->srun_prolog);
322
424
        fprintf(out, "StateSaveLocation       = %s\n", 
327
429
                slurm_ctl_conf_ptr->suspend_exc_parts);
328
430
        fprintf(out, "SuspendProgram          = %s\n", 
329
431
                slurm_ctl_conf_ptr->suspend_program);
330
 
        fprintf(out, "SuspendRate             = %u\n", 
 
432
        fprintf(out, "SuspendRate             = %u nodes/min\n", 
331
433
                slurm_ctl_conf_ptr->suspend_rate);
332
 
        fprintf(out, "SuspendTime             = %d\n", 
333
 
                ((int)slurm_ctl_conf_ptr->suspend_time - 1));
 
434
        if (slurm_ctl_conf_ptr->suspend_time == 0) {
 
435
                fprintf(out, "SuspendTime             = NONE\n");
 
436
        } else {
 
437
                fprintf(out, "SuspendTime             = %d sec\n", 
 
438
                        ((int)slurm_ctl_conf_ptr->suspend_time - 1));
 
439
        }
 
440
        fprintf(out, "SuspendTimeout          = %u sec\n", 
 
441
                slurm_ctl_conf_ptr->suspend_timeout);
334
442
        fprintf(out, "SwitchType              = %s\n",
335
443
                slurm_ctl_conf_ptr->switch_type);
336
444
        fprintf(out, "TaskEpilog              = %s\n",
337
445
                slurm_ctl_conf_ptr->task_epilog);
338
446
        fprintf(out, "TaskPlugin              = %s\n",
339
447
                 slurm_ctl_conf_ptr->task_plugin);
340
 
        fprintf(out, "TaskPluginParam         = %s\n",
341
 
                _task_plugin_param(slurm_ctl_conf_ptr->task_plugin_param));
 
448
        slurm_sprint_cpu_bind_type(tmp_str, 
 
449
                                   slurm_ctl_conf_ptr->task_plugin_param);
 
450
        fprintf(out, "TaskPluginParam         = %s\n", tmp_str);
342
451
        fprintf(out, "TaskProlog              = %s\n",
343
452
                slurm_ctl_conf_ptr->task_prolog);
344
453
        fprintf(out, "TmpFS                   = %s\n", 
345
454
                slurm_ctl_conf_ptr->tmp_fs);
 
455
        fprintf(out, "TopologyPlugin          = %s\n",
 
456
                 slurm_ctl_conf_ptr->topology_plugin);
 
457
        fprintf(out, "TrackWCKey              = %u\n",
 
458
                slurm_ctl_conf_ptr->track_wckey);
346
459
        fprintf(out, "TreeWidth               = %u\n",
347
460
                slurm_ctl_conf_ptr->tree_width);
348
461
        fprintf(out, "UsePam                  = %u\n",
349
462
                slurm_ctl_conf_ptr->use_pam);
350
463
        fprintf(out, "UnkillableStepProgram   = %s\n",
351
464
                slurm_ctl_conf_ptr->unkillable_program);
352
 
        fprintf(out, "UnkillableStepTimeout   = %u\n",
 
465
        fprintf(out, "UnkillableStepTimeout   = %u sec\n",
353
466
                slurm_ctl_conf_ptr->unkillable_timeout);
354
 
        fprintf(out, "WaitTime                = %u\n", 
 
467
        fprintf(out, "WaitTime                = %u sec\n", 
355
468
                slurm_ctl_conf_ptr->wait_time);
 
469
 
 
470
        slurm_print_key_pairs(out, slurm_ctl_conf_ptr->select_conf_key_pairs,
 
471
                              select_title);
356
472
}
357
473
 
358
474
/*
412
528
        int rc;
413
529
        slurm_msg_t req_msg;
414
530
        slurm_msg_t resp_msg;
415
 
        
 
531
        char this_host[256], *this_addr;
 
532
 
416
533
        slurm_msg_t_init(&req_msg);
417
534
        slurm_msg_t_init(&resp_msg);
418
535
 
419
536
        /*
420
537
         *  Set request message address to slurmd on localhost
421
538
         */
 
539
        gethostname_short(this_host, sizeof(this_host));
 
540
        this_addr = slurm_conf_get_nodeaddr(this_host);
 
541
        if (this_addr == NULL)
 
542
                this_addr = xstrdup("localhost");
422
543
        slurm_set_addr(&req_msg.address, (uint16_t)slurm_get_slurmd_port(), 
423
 
                       "localhost");
 
544
                       this_addr);
 
545
        xfree(this_addr);
424
546
 
425
547
        req_msg.msg_type = REQUEST_DAEMON_STATUS;
426
548
        req_msg.data     = NULL;
509
631
                slurmd_status_ptr->version);
510
632
        return;
511
633
}
 
634
 
 
635
extern void slurm_print_key_pairs(FILE* out, void *key_pairs, char *title)
 
636
{
 
637
        List config_list = (List)key_pairs;
 
638
        ListIterator iter = NULL;
 
639
        config_key_pair_t *key_pair;
 
640
 
 
641
        if (!config_list)
 
642
                return;
 
643
        
 
644
        fprintf(out, "\n%s:\n", title);
 
645
        iter = list_iterator_create(config_list);
 
646
        while((key_pair = list_next(iter))) {
 
647
                fprintf(out, "%-23s = %s\n", key_pair->name, key_pair->value);
 
648
        }
 
649
        list_iterator_destroy(iter);
 
650
}