Accessing containers from the command line

You can access running MobileFirst Server and MobileFirst Operational Analytics container instances from the command line to obtain logs and traces.

Before you begin

  • The container instance must be in a running state.

Procedure

  1. Create an interactive terminal within the container instance by running the following command: cf ic exec -it container_instance_id "bash".
  2. To locate the log files or traces, use the following command example:
    container_instance@root# cd /opt/ibm/wlp/usr/servers/worklight 
    container_instance@root# vi messages.log
  3. To copy the logs to your local workstation, use the following command example:
    my_local_workstation# cf ic exec -it container_instance_id
     "cat" " /opt/ibm/wlp/usr/servers/worklight/messages.log" > /tmp/local_messages.log