Docker Container (C50) - Container command for Log Files
search cancel

Docker Container (C50) - Container command for Log Files


Article ID: 246033


Updated On:




While troubleshooting issues with an AppNeta Container Monitoring Point (CMP), you may need to acquire log files to investigate the issue.  Use the following commands to review the log files details.


You can acquire log files from the container itself.  Issue docker ps -a to view the running containers

ubuntu@ip-10-0-0-14:~$ sudo docker ps -a
CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS                    PORTS                                                                                                                                                                                                  NAMES
12e45c7cffcb   "/sbin/"   20 hours ago        Up 15 minutes (healthy)


The following command is issued.  The exec command allows us to run a command inside the container, which will get us to a bash prompt to run commands from the container itself.  Do note that some of the commands of your linux distribution may not be available in the container.

$ sudo docker exec -it <container id> /bin/bash
root@support-lab-cmp-01:/# cd var/log/pathview
root@support-lab-cmp-01:/var/log/pathview# less Sequencer.log


Logs can be queried by the standard APM or Docker channels, and they can also be fetched via the in-container script that dumps a log tarball to stdout:

docker exec <pathview-cmp> /sbin/ > /tmp/logs.tar.gz
tar tzvf logs.tar.gz
drwxr-xr-x root/root         0 2019-12-12 13:23 debugOutput/
drwxr-xr-x root/root         0 2019-12-12 13:23 debugOutput/mnt/
drwxr-xr-x root/root         0 2019-12-12 13:23 debugOutput/mnt/data/
-rw-r--r-- root/root        36 2019-12-12 13:23 debugOutput/mnt/data/guid.txt

Additional Information

For additional resources, you'll find useful Docker commands here: