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
2d73b36d
Commit
2d73b36d
authored
20 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Added init.d.slurm.suse file.
parent
a965c0dc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile.am
+1
-0
1 addition, 0 deletions
Makefile.am
etc/init.d.slurm.suse
+177
-0
177 additions, 0 deletions
etc/init.d.slurm.suse
with
178 additions
and
0 deletions
Makefile.am
+
1
−
0
View file @
2d73b36d
...
@@ -8,6 +8,7 @@ EXTRA_DIST = \
...
@@ -8,6 +8,7 @@ EXTRA_DIST = \
Make-rpm.mk
\
Make-rpm.mk
\
etc/slurm.conf.example
\
etc/slurm.conf.example
\
etc/init.d.slurm
\
etc/init.d.slurm
\
etc/init.d.slurm.suse
\
etc/ptrace.patch
\
etc/ptrace.patch
\
autogen.sh
\
autogen.sh
\
slurm.spec
\
slurm.spec
\
...
...
This diff is collapsed.
Click to expand it.
etc/init.d.slurm.suse
0 → 100755
+
177
−
0
View file @
2d73b36d
#!/bin/bash
#
# chkconfig: 345 90 10
# description: SLURM is a simple resource management system which \
# manages exclusive access to a set of compute \
# resources and distributes work to those resources.
#
# processname: /usr/sbin/slurmd
# pidfile: /var/run/slurmd.pid
#
# processname: /usr/sbin/slurmctld
# pidfile: /var/run/slurmctld.pid
#
# config: /etc/sysconfig/slurm
#
### BEGIN INIT INFO
# Provides: slurm
# Required-Start: $local_fs $syslog $network $named munge
# Required-Stop: $local_fs $syslog $network $named munge
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: slurm daemon management
# Description: Start slurm to provide resource management
### END INIT INFO
BINDIR
=
/usr/bin
CONFDIR
=
/etc/slurm
LIBDIR
=
/usr/lib
SBINDIR
=
/usr/sbin
# Source function library.
[
-f
/etc/rc.status
]
||
exit
0
.
/etc/rc.status
# Reset status of this service
rc_reset
# Source slurm specific configuration
if
[
-f
/etc/sysconfig/slurm
]
;
then
.
/etc/sysconfig/slurm
else
SLURMCTLD_OPTIONS
=
""
SLURMD_OPTIONS
=
""
fi
[
-f
$CONFDIR
/slurm.conf
]
||
exit
1
# setup library paths for slurm and munge support
export
LD_LIBRARY_PATH
=
"
$LIBDIR
:
$LD_LIBRARY_PATH
"
start
()
{
echo
-n
"starting
$1
: "
unset
HOME MAIL USER USERNAME
startproc
$SBINDIR
/
$1
$2
rc_status
-v
echo
touch
/var/lock/subsys/slurm
}
stop
()
{
echo
-n
"stopping
$1
: "
killproc
$1
-TERM
rc_status
-v
echo
rm
-f
/var/lock/subsys/slurm
}
startall
()
{
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
optvar
=
`
echo
${
prog
}
_OPTIONS |
tr
"a-z"
"A-Z"
`
start
$prog
${
!optvar
}
done
}
# status() with slight modifications to take into account
# instantiations of job manager slurmd's, which should not be
# counted as "running"
#
slurmstatus
()
{
local
base
=
${
1
##*/
}
local
pid
local
rpid
local
pidfile
pidfile
=
`
grep
-i
${
base
}
pid
$CONFDIR
/slurm.conf |
grep
-v
'^ *#'
`
if
[
$?
=
0
]
;
then
pidfile
=
${
pidfile
##*=
}
pidfile
=
${
pidfile
%#*
}
else
pidfile
=
/var/run/
${
base
}
.pid
fi
pid
=
`
pidof
-o
$$
-o
$$
PPID
-o
%PPID
-x
$1
||
\
pidof
-o
$$
-o
$$
PPID
-o
%PPID
-x
${
base
}
`
if
[
-f
$pidfile
]
;
then
read
rpid <
$pidfile
if
[
"
$rpid
"
!=
""
-a
"
$pid
"
!=
""
]
;
then
for
i
in
$pid
;
do
if
[
"
$i
"
=
"
$rpid
"
]
;
then
echo
$"
${
base
}
(pid
$pid
) is running..."
return
0
fi
done
elif
[
"
$rpid
"
!=
""
-a
"
$pid
"
=
""
]
;
then
echo
$"
${
base
}
dead but pid file exists"
return
1
fi
fi
if
[
"
$base
"
=
"slurmctld"
-a
"
$pid
"
!=
""
]
;
then
echo
$"
${
base
}
(pid
$pid
) is running..."
return
0
fi
echo
$"
${
base
}
is stopped"
return
3
}
#
# The pathname substitution in daemon command assumes prefix and
# exec_prefix are same. This is the default, unless the user requests
# otherwise.
#
# Any node can be a slurm controller and/or server.
#
case
"
$1
"
in
start
)
startall
;;
startclean
)
SLURMCTLD_OPTIONS
=
"-c
$SLURMCTLD_OPTIONS
"
SLURMD_OPTIONS
=
"-c
$SLURMD_OPTIONS
"
startall
;;
stop
)
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
stop
$prog
done
;;
status
)
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
slurmstatus
$prog
done
;;
restart
)
$0
stop
$0
start
;;
condrestart
)
if
[
-f
/var/lock/subsys/slurm
]
;
then
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
stop
$prog
start
$prog
done
fi
;;
reconfig
)
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
killproc
$prog
-HUP
done
;;
test
)
for
prog
in
`
$BINDIR
/scontrol show daemons
`
;
do
echo
"
$prog
runs here"
done
;;
*
)
echo
"Usage:
$0
{start|startclean|stop|status|restart|reconfig|condrestart|test}"
exit
1
;;
esac
rc_exit
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