Skip to content
Snippets Groups Projects
Commit 1027de07 authored by Morris Jette's avatar Morris Jette
Browse files

Add uptime to "slurmd -C" output

parent cd6dff5f
No related branches found
No related tags found
No related merge requests found
.TH SLURMD "8" "March 2010" "slurmd 2.2" "Slurm components"
.TH SLURMD "8" "March 2012" "slurmd 2.4" "Slurm components"
.SH "NAME"
slurmd \- The compute node daemon for SLURM.
......@@ -20,7 +20,7 @@ abnormally.
.TP
\fB\-C\fR
Print actual hardware configuration and exit. The format of output is the same
as used in \fBslurm.conf\fR to describe a node's configuration.
as used in \fBslurm.conf\fR to describe a node's configuration plus it's uptime.
.TP
\fB\-d <file>\fR
......
......@@ -1068,6 +1068,7 @@ _destroy_conf(void)
static void
_print_config(void)
{
int days, hours, mins, secs;
char name[128];
gethostname_short(name, sizeof(name));
......@@ -1086,8 +1087,15 @@ _print_config(void)
get_memory(&conf->real_memory_size);
get_tmp_disk(&conf->tmp_disk_space, "/tmp");
printf("RealMemory=%u TmpDisk=%u\n",
printf("RealMemory=%u TmpDisk=%u ",
conf->real_memory_size, conf->tmp_disk_space);
get_up_time(&conf->up_time);
secs = conf->up_time % 60;
mins = (conf->up_time / 60) % 60;
hours = (conf->up_time / 3600) % 24;
days = (conf->up_time / 86400);
printf("UpTime=%u-%2.2u:%2.2u:%2.2u\n", days, hours, mins, secs);
}
static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment