Hello to everyone . Is there a way that I can check for each container that i have create , cpu utilization and all this stuff from the command line ? Something like the top command maybe ?
Short answer not really
Long answer you can get there or there abouts but its work (hopefully someone has some nifty script)
Isn’t there something like top command ? I found lxc-top but it shows nothing despite i have create a container. In fact i create the container through lxd , so i guess it is normal that lxc-top gives me zero output
Yeah if you wanna see the process, go on the host install
f5 (tree) then
yourContainerName it will show you all the processes
lxc info mycontainer, which gives you some information.
Each Linux container is essentially a process tree that is separated from the rest of the host’s processes through cgroups. What you need, is software that understands
cgroups and groups together the load of each process tree (a.k.a. Linux container).
See, for example,
Alternatively, there are tools like
netdata that you install on the host and can give you instant insight into the containers.
Thanks a lot both of you for your answers.