From dbe7dfff5e1c775925a67e1377b3a7e5dd72aa12 Mon Sep 17 00:00:00 2001 From: Daniel Gruber Date: Mon, 9 Dec 2024 10:50:06 +0100 Subject: [PATCH 1/2] BF: CS-848 logchecker.sh should rotate new accounting file --- source/dist/util/logchecker.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/dist/util/logchecker.sh b/source/dist/util/logchecker.sh index 6e413b783..d2a5f20a8 100644 --- a/source/dist/util/logchecker.sh +++ b/source/dist/util/logchecker.sh @@ -31,6 +31,8 @@ # # All Rights Reserved. # +# Portions of this software are Copyright (c) 2023-2024 HPC-Gridware GmbH +# ########################################################################## #___INFO__MARK_END__ # @@ -41,8 +43,8 @@ # # $SGE_ROOT/default/common # -# directory. This will make sure that new releases or patches of Sun Grid -# Engine don't override your local changes. +# directory. This will make sure that new releases or patches of Cluster +# Scheduler don't override your local changes. # # # After customization this script can be installed as a cron job. If your @@ -259,10 +261,13 @@ fi if [ $ACTION_ON = 1 -o $ACTION_ON = 4 ]; then sge_logcheck 1 $qma_spool_dir - sge_logcheck 1 $qma_spool_dir/schedd + + if [ -f $SGE_ROOT/$SGE_CELL/common/schedd_runlog ]; then + sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/schedd_runlog + fi if [ $ACCT = yes ]; then - sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/accounting + sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/accounting.jsonl fi fi From 8a0d21e954edd31c3ac4326611a98cbb46dc60c5 Mon Sep 17 00:00:00 2001 From: Daniel Gruber Date: Mon, 9 Dec 2024 11:20:56 +0100 Subject: [PATCH 2/2] BF: CS-848 logchecker.sh to support old and new accounting format --- source/dist/util/logchecker.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/dist/util/logchecker.sh b/source/dist/util/logchecker.sh index d2a5f20a8..a42e7fee3 100644 --- a/source/dist/util/logchecker.sh +++ b/source/dist/util/logchecker.sh @@ -267,7 +267,12 @@ if [ $ACTION_ON = 1 -o $ACTION_ON = 4 ]; then fi if [ $ACCT = yes ]; then - sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/accounting.jsonl + if [ -f $SGE_ROOT/$SGE_CELL/common/accounting.jsonl ]; then + sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/accounting.jsonl + fi + if [ -f $SGE_ROOT/$SGE_CELL/common/accounting ]; then + sge_logcheck 2 $SGE_ROOT/$SGE_CELL/common/accounting + fi fi fi