search cancel

how to enable/disable CSAPI debug logging on RHEL 7.*

book

Article ID: 173622

calendar_today

Updated On:

Products

Protection Engine for Cloud Services Protection Engine for NAS

Issue/Introduction

RHEL 7 introduced systemd for service management.
We hereby demonstrate procedure how to enable and disable CSAPI logging for SPE under systemd.

Resolution

enable CSAPI logging

1. stop SPE service

# systemctl stop symcscan

2. create an override file for SPE.

# systemctl edit symcscan

It will start editor and will be saved as "override.conf" under "/etc/systemd/system/symcscan.service.d" directory.

3. add environment variables to enable CSAPI logging in override file.

e.g.)

[Service]
Environment="CSAPI_DEBUG_LOG=/var/log/csapi.log"
Environment="CSAPI_DEBUG_LEVEL=5"
Environment="CSAPI_DEBUG_FILE_SIZE_LIMIT=104857600"
Environment="CSAPI_DEBUG_SECTION=32767"

4. restart SPE service. Please be noted that restarting service with init.d script will not take change into effect.

# systemctl start symcscan

5. make certain that symcscan daemon's environment variables are set and log file is being opened.

e.g.)

# strings /proc/`pidof -s symcscan`/environ|grep -i ^csapi
CSAPI_DEBUG_LOG=/var/log/csapi.log
CSAPI_DEBUG_SECTION=32767
CSAPI_DEBUG_FILE_SIZE_LIMIT=104857600
CSAPI_DEBUG_LEVEL=5

# ls -l /proc/`pidof -s symcscan`/fd|grep csapi
lrwx------ 1 root root 64 Feb 12 14:47 23 -> /var/log/csapi.log

disable CSAPI logging

1. stop SPE service

2. comment out "Environment" lines in override file with "#".

3. so as to reflect change in override file, execute reload.

# systemctl daemon-reload

4. restart SPE service