Pivotal Knowledge Base

Follow

How to enable debug mode for traffic controller?

Environment

Product Version
Pivotal Cloud Foundry® (PCF) 1.6.x, 1.7.x

Purpose

This article discusses how to enable debug mode for doppler.

Procedure

  • 'bosh ssh' to the traffic controller VMs.
  • Edit /var/vcap/jobs/loggregator_trafficcontroller/bin/loggregator_trafficcontroller_ctl.
  • Change the following line:
 chpst -u vcap:vcap /var/vcap/packages/loggregator_trafficcontroller/trafficcontroller \ 
--config /var/vcap/jobs/loggregator_trafficcontroller/config/loggregator_trafficcontroller.json &

to

chpst -u vcap:vcap /var/vcap/packages/loggregator_trafficcontroller/trafficcontroller --debug \ 
--config /var/vcap/jobs/loggregator_trafficcontroller/config/loggregator_trafficcontroller.json &
  • Run sudo monit restart loggregator_trafficcontroller. Run watch monit summary and wait for the process to restart.
  • You should see log debug entries that looks like this.
{"timestamp":1463691855.062584877,"process_id":32436,"source":"loggregator trafficcontroller","log_level":"debug","message":"Received create/update event: 1","data":null,"file":"/var/vcap/data/compile/loggregator_trafficcontroller/loggregator/src/github.com/cloudfoundry/dropsonde/logging/logging.go","line":13,"method":"github.com/cloudfoundry/dropsonde/logging.Debugf"}


where the "log_level" is "debug".

Impact/Risks

Enabling debug mode will impact the system performance and may also fill up the ephemeral disk, so we strongly recommend to use it only for development/troubleshooting purpose.

Comments

Powered by Zendesk