Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
859cc230
Commit
859cc230
authored
21 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Scontrol ping command reads configuration file directly rather than
getting the configuration form slurmctld (which could be down).
parent
d136c2e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scontrol/scontrol.c
+23
-7
23 additions, 7 deletions
src/scontrol/scontrol.c
with
23 additions
and
7 deletions
src/scontrol/scontrol.c
+
23
−
7
View file @
859cc230
...
...
@@ -84,12 +84,13 @@ static void _ping_slurmctld(slurm_ctl_conf_info_msg_t *slurm_ctl_conf_ptr);
static
void
_print_completing
(
void
);
static
void
_print_completing_job
(
job_info_t
*
job_ptr
,
node_info_msg_t
*
node_info_msg
);
static
void
_print_config
(
char
*
config_param
,
bool
ping_only
);
static
void
_print_config
(
char
*
config_param
);
static
void
_print_daemons
(
void
);
static
void
_print_job
(
char
*
job_id_str
);
static
void
_print_node
(
char
*
node_name
,
node_info_msg_t
*
node_info_ptr
);
static
void
_print_node_list
(
char
*
node_list
);
static
void
_print_part
(
char
*
partition_name
);
static
void
_print_ping
(
void
);
static
void
_print_step
(
char
*
job_step_id_str
);
static
void
_print_version
(
void
);
static
int
_process_command
(
int
argc
,
char
*
argv
[]);
...
...
@@ -479,10 +480,9 @@ _print_completing_job(job_info_t *job_ptr, node_info_msg_t *node_info_msg)
/*
* _print_config - print the specified configuration parameter and value
* IN config_param - NULL to print all parameters and values
* IN ping_only - just ping slurmctld daemons
*/
static
void
_print_config
(
char
*
config_param
,
bool
ping_only
)
_print_config
(
char
*
config_param
)
{
int
error_code
;
static
slurm_ctl_conf_info_msg_t
*
old_slurm_ctl_conf_ptr
=
NULL
;
...
...
@@ -514,7 +514,7 @@ _print_config (char *config_param, bool ping_only)
old_slurm_ctl_conf_ptr
=
slurm_ctl_conf_ptr
;
if
(
(
error_code
==
SLURM_SUCCESS
)
&&
!
ping_only
)
{
if
(
error_code
==
SLURM_SUCCESS
)
{
slurm_print_ctl_conf
(
stdout
,
slurm_ctl_conf_ptr
)
;
fprintf
(
stdout
,
"
\n
"
);
}
...
...
@@ -522,6 +522,22 @@ _print_config (char *config_param, bool ping_only)
_ping_slurmctld
(
slurm_ctl_conf_ptr
);
}
/* Print state of controllers only */
static
void
_print_ping
(
void
)
{
static
slurm_ctl_conf_info_msg_t
*
slurm_conf_ptr
=
NULL
;
if
(
slurm_conf_ptr
==
NULL
)
{
slurm_conf_ptr
=
xmalloc
(
sizeof
(
slurm_ctl_conf_info_msg_t
));
init_slurm_conf
(
slurm_conf_ptr
);
read_slurm_conf_ctl
(
slurm_conf_ptr
);
validate_config
(
slurm_conf_ptr
);
}
_ping_slurmctld
(
slurm_conf_ptr
);
}
/* Report if slurmctld daemons are responding */
static
void
_ping_slurmctld
(
slurm_ctl_conf_info_msg_t
*
slurm_ctl_conf_ptr
)
...
...
@@ -1065,7 +1081,7 @@ _process_command (int argc, char *argv[])
"too many arguments for keyword:%s
\n
"
,
argv
[
0
]);
}
_print_
config
(
NULL
,
true
);
_print_
ping
(
);
}
else
if
(
strncasecmp
(
argv
[
0
],
"quiet"
,
4
)
==
0
)
{
if
(
argc
>
1
)
{
...
...
@@ -1114,9 +1130,9 @@ _process_command (int argc, char *argv[])
}
else
if
(
strncasecmp
(
argv
[
1
],
"config"
,
3
)
==
0
)
{
if
(
argc
>
2
)
_print_config
(
argv
[
2
]
,
false
);
_print_config
(
argv
[
2
]);
else
_print_config
(
NULL
,
false
);
_print_config
(
NULL
);
}
else
if
(
strncasecmp
(
argv
[
1
],
"daemons"
,
3
)
==
0
)
{
if
(
argc
>
2
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment