How to enable CSAPI debug logging in Protection Engine on Linux
search cancel

How to enable CSAPI debug logging in Protection Engine on Linux

book

Article ID: 164895

calendar_today

Updated On:

Products

Protection Engine for Cloud Services Protection for SharePoint Servers Protection Engine for NAS

Issue/Introduction

CSAPI logging is intended for debugging, therefore it should be utilized only in case of necessity by request of a Broadcom Support Engineer.

Resolution

CSAPI Debug Settings

Below is an explanation of each of the CSAPI Debug settings as well as if the setting is required and the default value.

Setting Description Required Default Value
CSAPI_DEBUG_LOG The path and file name of the debug log.  I.e. /var/log/csapi.log Yes None
CSAPI_DEBUG_LEVEL The level the log should be set to (0 - None, 1 - Fatal, 2 - Error, 3 - Warning, 4 - Notice, 5 - Verbose) Yes None
CSAPI_DEBUG_FILE_SIZE_LIMIT The maximum size of each log file. The value of this setting is in bytes and has a minimum value of 1 and a maximum value of 1048576000 (1GB). No 1048576000 
CSAPI_DEBUG_MAX_LOG_FILES The number of additional logs to keep after reaching the CSAPI_DEBUG_FILE_SIZE_LIMIT.  This setting has a minimum value of 3 and a maximum value of 20.  (Note: Each restart the SPE service will cause an additional 1 + CSAPI_DEBUG_MAX_LOG_FILES files to be created) No 3

 

Enabling CSAPI debug logging

  1. Stop the SPE service.
    /etc/init.d/symcscan stop
     
  2. Take a backup of the current symcscan.sh script.
    cd /opt/SYMCScan/bin
    cp -p symcscan.sh symcscan.sh.bak
     
  3. To enable CSAPI debug logging, insert the following lines right after comment in symcscan.sh.
    CSAPI_DEBUG_LOG=/var/log/csapi.log
    CSAPI_DEBUG_LEVEL=5
    CSAPI_DEBUG_FILE_SIZE_LIMIT=104857600
    CSAPI_DEBUG_MAX_LOG_FILES=3 export CSAPI_DEBUG_LOG export CSAPI_DEBUG_LEVEL export CSAPI_DEBUG_FILE_SIZE_LIMIT
    export CSAPI_DEBUG_MAX_LOG_FILES
     
  4. If you are running SPE 8.x and want to enable Stargate logging, at the end of the variable section in symcscan.sh, type:
    export STARGATE_DEBUG_LEVEL=5
  5. If you are running SPE 9.0 and later:
    1. Take a backup of the current controller.sh script.
      cd /opt/SYMCScan/bin
      cp -p controller.sh controller.sh.bak

    2. Edit the controller.sh script and add the following line before the PATH variable:
      export STARGATE_DEBUG_LEVEL=5

  6. Restart symcscan.
     /etc/init.d/symcscan start
     
  7. Verify CSAPI logs are being created and log messages are yielded. Gather the log file specified for CSAPI_DEBUG_LOG, above example is /var/log/csapi.log, as well as all files in /opt/SYMCScan/bin/definitions/Stargate/logs/


Disabling CSAPI debug logging 

  1. Stop the SPE Service
     /etc/init.d/symcscan stop
     
  2. Comment out the lines inserted in steps 3 and 4/5 above or replace with the original scripts.
  3. Restart symcscan
     /etc/init.d/symcscan start

Additional Information

Wrong platform?

For collecting SPE VERBOSE logs, CSAPI debug logs, and Stargate VERBOSE logs on Windows, see:

https://knowledge.broadcom.com/external/article/211023