How to view logs of docker cluster container

Release: 2020-04-03 15:03:26
Original
3582 people have browsed it

How to view logs of docker cluster container

How to view logs of docker cluster containers?

To view cluster logs, you can log in to your container cloud Web console. After selecting the cluster, click "View Logs" in the pop-up window to obtain log information about cluster operations.

From the container list, you can get the container and its corresponding node information; from the cluster node list, click on the specified node to get the corresponding node monitoring information.

View the log of container restart in the docker swarm cluster, which can be found in the linux system log. For centos, you can view it through the following command

cat /var/log/messages | grep "dockerd.*exceeded"
Copy after login

Docker container logs are generally stored in /var/lib/ Under docker, you can use the following command to view the file size of each log

ls -lh $(find /var/lib/docker/containers/ -name *-json.log)
Copy after login

To view the logs of the container, you can use the docker logs command

sudo docker logs -f -t --tail 行数 容器名
Copy after login

For more related tutorials, please pay attention to the PHP Chinese websitedocker tutorial column.

The above is the detailed content of How to view logs of docker cluster container. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!