How to check heap size inside docker container

  docker, docker-swarm, heap, jvm

We are using docker swarm on the server. using openjdk8. If do :

docker service ls

see the result :

ID                  NAME                               MODE                REPLICAS            IMAGE                                                                PORTS
7l89205dje61        integration_api                          replicated          1/1       

I am trying to update jvm heap size for this service so I tried :

docker service update --env-add JAVA_OPTS="-Xms3G -Xmx3G -XX:MaxPermSize=1024m" integration_api

Saw this result:

overall progress: 1 out of 1 tasks 
1/1: running   [==================================================>]

Now I am trying to see the heap size and not finding a way. Any suggestion?

Source: Docker Questions