From 1ce1b17a8546dcb9850e68fdb086cf3939c683c7 Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Wed, 17 Aug 2016 17:46:44 +0900 Subject: [PATCH] Specify facility used by mcklogd via option 1. You can specify facility through -f option of mcreboot.sh. Example: mcreboot.sh -k 1 -f LOG_LOCAL6 Note that you need to specify "-k 1" or "-k 2" to start mcklogd. 2. Kill mcklogd if needed in mcreboot.sh and mcstop+release.sh. --- arch/x86/tools/mcreboot-smp-x86.sh.in | 9 +++++++-- arch/x86/tools/mcstop+release-smp-x86.sh.in | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/tools/mcreboot-smp-x86.sh.in b/arch/x86/tools/mcreboot-smp-x86.sh.in index 4f2da749..30002a12 100644 --- a/arch/x86/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86/tools/mcreboot-smp-x86.sh.in @@ -24,11 +24,14 @@ cpus="" INTERVAL=1 LOGMODE=0 +facility="LOG_LOCAL6" chown_option=`logname` -while getopts :i:k:c:m:o: OPT +while getopts :i:k:c:m:o:f: OPT do case ${OPT} in + f) facility=${OPTARG} + ;; o) chown_option=${OPTARG} ;; i) INTERVAL=${OPTARG} @@ -203,5 +206,7 @@ if [ "$enable_mcoverlay" == "yes" ]; then fi if [ ${LOGMODE} -ne 0 ] then - SBINDIR=${SBINDIR} ${SBINDIR}/mcklogd -i ${INTERVAL} +# mcklogd survives when McKernel isn't shut down by mcstop+release.sh + pkill mcklogd + SBINDIR=${SBINDIR} ${SBINDIR}/mcklogd -i ${INTERVAL} -f ${facility} fi diff --git a/arch/x86/tools/mcstop+release-smp-x86.sh.in b/arch/x86/tools/mcstop+release-smp-x86.sh.in index 2079510e..e612f6d1 100644 --- a/arch/x86/tools/mcstop+release-smp-x86.sh.in +++ b/arch/x86/tools/mcstop+release-smp-x86.sh.in @@ -49,3 +49,5 @@ if [ "`lsmod | grep -E 'ihk\s' | awk '{print $1}'`" != "" ]; then if ! rmmod ihk; then echo "error: removing ihk" >&2; exit 1; fi fi +# Stop mcklogd +pkill mcklogd