Docker Community Forums

Share and learn in the Docker community.

Command "docker stats" via ssh

(Fbertin) #1


On my Linux system, I try

ssh root@ 'docker stats --no-stream ’

and it works. Then I try

ssh root@ 'docker stats --no-stream --format “{{.Container}}” ’

and I receive the message “unknown flag: --format”

I also try with " but it’s not succesfull.

Does anyone already try this ?

Thank you for your help

(Think) #2

does it work on for you?
For me it works. It often happens that some systems convert the -- to something else :slight_smile:

(Fbertin) #3

Thx to try to respond.
However I do not succeed to use these commands in "play-with-docker"
When I try
ssh root@ ‘ls’ => it works
ssh root@ ‘docker stats’ => bash:docker: command not found

but docker is of course available on !!! Don’t understand

For my problem “–no-stream” is Ok, so I don’t think that the problem come from "–"
I have tried different thing with caracter " or ’ or the same with \ but no hope…

(Fbertin) #4


Problem resolved. The targeted machine had an old docker release and “–format” was not available…