docker top需要指定容器,且不是动态显示容器资源使用情况
docker stats 动态打印所有容器资源使用情况
[root@localhost ~]# docker top --help Usage: docker top CONTAINER [ps OPTIONS] Display the running processes of a container Aliases: docker container top, docker top [root@localhost ~]# [root@localhost ~]# [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES cf5c43b1e361 mysql:5.7 "docker-entrypoint.s…" 5 days ago Up 5 days 33060/tcp, 0.0.0.0:8306->3306/tcp, :::8306->3306/tcp jira_mysql a6c6157c89eb registry.cn-hangzhou.aliyuncs.com/yangmingquan/jira:8.1.0 "/docker-entrypoint.…" 5 days ago Up 5 days 0.0.0.0:2800->8080/tcp, :::2800->8080/tcp jira [root@localhost ~]# [root@localhost ~]# docker top jira UID PID PPID C STIME TTY TIME CMD root 28543 28508 0 6月28 ? 00:54:49 /usr/lib/jvm/java-1.8-openjdk/bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms384m -Xmx2048m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djira.home=/var/atlassian/jira -Datlassian.plugins.startup.options=-fg -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xloggc:/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCCause -javaagent:/opt/atlassian/jira/atlassian-agent.jar -Dignore.endorsed.dirs= -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap start [root@localhost ~]#
[root@localhost ~]# docker stats CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS cf5c43b1e361 jira_mysql 0.07% 575.2MiB / 15.51GiB 3.62% 364MB / 826MB 0B / 82.3GB 49 a6c6157c89eb jira 0.15% 5.321GiB / 15.51GiB 34.30% 2.13GB / 743MB 0B / 66MB 215
标签:jira,opt,stats,top,atlassian,XX,docker,root,Docker From: https://www.cnblogs.com/daizichuan/p/18283154