For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Accessing containers from the command line
We can access running MobileFirst Server and MobileFirst 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
- Create an interactive terminal within the container instance by running the following command: cf ic exec -it container_instance_id "bash".
- To locate the log files or traces, use the following command example:
container_instance@root# cd /opt/ibm/wlp/usr/servers/mfp container_instance@root# vi messages.log
- To copy the logs to our local workstation, use the following command example:
my_local_workstation# cf ic exec -it container_instance_id "cat" " /opt/ibm/wlp/usr/servers/mfp/messages.log" > /tmp/local_messages.log
Parent topic: Accessing log files