-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
logrotate
to rotate slurm logs
Signed-off-by: Jason C. Nucciarone <[email protected]>
- Loading branch information
1 parent
0be3f1f
commit ddb78c1
Showing
4 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Slurm logs (slurmctld, slurmd and slurmdbd). | ||
$SNAP_COMMON/var/log/slurm/*.log { | ||
# Rotate daemon logs every week; keep 4 weeks worth on backlog. | ||
weekly | ||
rotate 4 | ||
size=5M | ||
create 640 slurm root | ||
missingok | ||
nocopytruncate | ||
nomail | ||
notifempty | ||
noolddir | ||
sharedscripts | ||
|
||
# Compress logs - they can get quite large depending on demand. | ||
compress | ||
delaycompress | ||
compresscmd $SNAP/bin/bzip2 | ||
compressext .bz2 | ||
|
||
# Re-read log level and reopen log files using `SIGUSR2` signal. | ||
# https://slurm.schedmd.com/slurmctld.html#SECTION_SIGNALS | ||
postrotate | ||
$SNAP/usr/bin/pkill -x --signal SIGUSR2 slurmctld | ||
$SNAP/usr/bin/pkill -x --signal SIGUSR2 slurmd | ||
$SNAP/usr/bin/pkill -x --signal SIGUSR2 slurmdbd | ||
exit 0 | ||
endscript | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters