Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
69b607b4
Commit
69b607b4
authored
7 years ago
by
Jafar Lie
Browse files
Options
Downloads
Patches
Plain Diff
updated slurm epilog for X clean up
Former-commit-id:
1cd81921
parent
34fa0bf0
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
roles/slurm-common/templates/slurm.epilog.j2
+18
-0
18 additions, 0 deletions
roles/slurm-common/templates/slurm.epilog.j2
with
18 additions
and
0 deletions
roles/slurm-common/templates/slurm.epilog.j2
+
18
−
0
View file @
69b607b4
...
...
@@ -6,6 +6,24 @@ find /tmp -user ${SLURM_JOB_USER} -name ".esd-*" | xargs rm -rf
find /tmp
-user
${
SLURM_JOB_USER
}
-name
".X*-lock"
| xargs
rm
-rf
find /tmp/.X11-unix
-user
${
SLURM_JOB_USER
}
-name
"X*"
| xargs
rm
-rf
# NOTE: 20180316 The jobs above clean up the VNC session
# further clean up for Strudel Session
# X lock files are owned by root, so we need to find the right files to delete
# New Strudel session will create a file under user's home folder called xorg-jobid
# This file contains the display number that is assigned to xterm when it starts
# Assigning variable and trimming the : from the display number
XSESSION
=
`
cat
/home/
${
SLURM_JOB_USER
}
/.vnc/xorg-
${
SLURM_JOB_ID
}
|
tr
-d
:
`
# Formatting the filenames for the two files that we need to clean: /tmp/.X*-lock and /tmp/.X11/X*
XLOCKFILENAME
=
".X"
$XSESSION
"-lock"
XUNIXFILENAME
=
"X"
$XSESSION
# Find the files and delete them
find /tmp/
-name
$XLOCKFILENAME
-exec
rm
-rf
{}
\;
find /tmp/.X11-unix
-name
$XUNIXFILENAME
-exec
rm
-rf
{}
\;
# echo 1 to drop page cache
/bin/sync
...
...
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