[slurm-users] slurmctld.log over 500 MB

740 views
Skip to first unread message

Felix

unread,
Jul 27, 2021, 8:33:33 AM7/27/21
to Slurm User Community List
Hello

my slurmctld.log is 600 MB.

I am looking for a functional method to have log rotate system for slurmctld.log. There is none for slurm now on my system. I have slurm 20.02 on my system.

Is there any possibility?

Thank you

Felix

--
Dr. Eng. Farcas Felix
National Institute of Research and Development of Isotopic and Molecular Technology,
IT - Department - Cluj-Napoca, Romania
Mobile: +40742195323


Sean Crosby

unread,
Jul 27, 2021, 8:56:14 AM7/27/21
to Slurm User Community List
Hi Felix,

From one of the recent Slurm user group meetings, the recommended way to logrotate the Slurm logs is to send SIGUSR2.

My logrotate entry is

/var/log/slurm/slurmctld.log {
  compress
  missingok
  nocopytruncate
  nocreate
  delaycompress
  nomail
  notifempty
  noolddir
  rotate 5
  sharedscripts
  size 5M
  create 640 slurm root
  postrotate
    pkill -x --signal SIGUSR2 slurmctld
    exit 0
  endscript
}

And that seems to work fine for us

[root@spartan-ctl1 ~]# ls -la /var/log/slurm/
total 7165648
drwxr-x---   2 slurm slurm        243 Jul 26 16:27 .
drwxr-xr-x. 15 root  root        4096 Jul 27 03:07 ..
-rw-r--r--   1 slurm slurm 7251773874 Jul 27 22:40 joblog
-rw-r-----   1 slurm slurm   12189295 Jul 27 22:54 slurmctld.log
-rw-r-----   1 slurm slurm    2309659 Jul 22 03:37 slurmctld.log-20210722.gz
-rw-r-----   1 slurm slurm    2163985 Jul 23 03:49 slurmctld.log-20210723.gz
-rw-r-----   1 slurm slurm    2773294 Jul 24 03:31 slurmctld.log-20210724.gz
-rw-r-----   1 slurm slurm    1605171 Jul 25 03:32 slurmctld.log-20210725.gz
-rw-r-----   1 slurm slurm   10004202 Jul 26 03:43 slurmctld.log-20210726
-rw-------   1 slurm slurm          0 Feb 25  2019 slurmsched.log

Sean

From: slurm-users <slurm-use...@lists.schedmd.com> on behalf of Felix <fe...@itim-cj.ro>
Sent: Tuesday, 27 July 2021 22:33
To: Slurm User Community List <slurm...@lists.schedmd.com>
Subject: [EXT] [slurm-users] slurmctld.log over 500 MB
 
External email: Please exercise caution

Felix

unread,
Jul 29, 2021, 5:54:07 AM7/29/21
to slurm...@lists.schedmd.com

Hello

I have two logs, one in /var/log/slurm/log

and another in /var/log/slurmctld.log

For the second I had to enter the restart in the lines you gave me.

For /var/log/slurm/log do i have to write the same lines?

Thank you

Felix

On 7/27/2021 3:55 PM, Sean Crosby wrote:
/var/log/slurm/slurmctld.log {
  compress
  missingok
  nocopytruncate
  nocreate
  delaycompress
  nomail
  notifempty
  noolddir
  rotate 5
  sharedscripts
  size 5M
  create 640 slurm root
  postrotate
    pkill -x --signal SIGUSR2 slurmctld
    exit 0
  endscript
}
-- 
Dr. Eng. Farcas Felix
National Institute of Research and Development of Isotopic and Molecular Technology, 
IT - Department - Cluj-Napoca, Romania
Mobile: +40742195323
Reply all
Reply to author
Forward
0 new messages