Enable debug logging for Storage Profile Service (SPS) in vCenter Appliance
search cancel

Enable debug logging for Storage Profile Service (SPS) in vCenter Appliance

book

Article ID: 323196

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

While troubleshooting issues with the SPS service, it may be necessary to enable debug logging for the SPS service.
The additional logging will provide more information regarding vSAN, CNS, vVOLs, and other components.

Environment

VMware vCenter Server Appliance 8.x
VMware vCenter Server Appliance 7.x
VMware vCenter Server Appliance 6.7.x

Resolution

To enable SPS debug logging, perform the following steps:

For vCenter version < 7.0U3 ONLY

1.  Take a backup of the existing log configuration file:

cp /usr/lib/vmware-vpx/sps/conf/log4j.properties /usr/lib/vmware-vpx/sps/conf/log4j.properties.old

2.  Edit the file:

vi /usr/lib/vmware-vpx/sps/conf/log4j.properties

3.  Uncomment the following lines: 

#log4j.logger.com.vmware.vim.storage.common=DEBUG
#log4j.logger.com.vmware.pbm=DEBUG
#log4j.logger.com.vmware.spbm=DEBUG
#log4j.logger.com.vmware.sps=DEBUG
#log4j.logger.com.vmware.vim.sms=DEBUG
#log4j.logger.com.vmware.vslm=DEBUG

4. Change the log4j.appender.file.Threshold from INFO to DEBUG

log4j.appender.file.Threshold=INFO -> log4j.appender.file.Threshold=DEBUG

5. Restart the SPS service:

vmon-cli -r sps


For vCenter version >=7.0U3 ONLY

1. Run the following command to take a backup of the existing configuration file and change the logging levels:

sed -i.bak '/logger\.\(vmware\|storagecommon\|pbm\|sps\|spbm\|sms\|vslm\)\.level/s/INFO/DEBUG/g' /usr/lib/vmware-vpx/sps/conf/log4j2.properties

This will create the file "log4j2.properties.bak" which is a backup of the configuration file "log4j2.properties"

2. Restart the SPS service:

service-control --restart vmware-sps

3. Perform the troubleshooting step(s).

4. Roll the file back to "info" logging level.

mv /usr/lib/vmware-vpx/sps/conf/log4j2.properties.bak /usr/lib/vmware-vpx/sps/conf/log4j2.properties

5. Restart the SPS service

vmon-cli -r sps