2017-01-21 18:01发布
目前在做一个系统性能监控的工具,因为要依赖的东西比较多,所以准备迁移到Docker上以便于向下部署(跑到主机上又apt又crond又logrotate的太麻烦了)。
目前已经搞定cpu了,知道只要能读到宿主机的/proc/sysstat即可;内存也是,/proc/memstat。这两个只要只读卷挂载就OK。
还差个分区信息(df -h)和进程信息(ps auxf),这两个在宿主机上直接运行就ok,但是到了容器内就不行了。
有什么办法能从容器内读到宿主机的这两个信息?
2.In docker container,run command as following:
NOTE:You can add docker ssh file id_rsa.pub in dockerhost, so you do not have to input password every time when excuting the command.
1.In docker container, you can add dockerhost in /etc/hosts:
最多设置5个标签!
付费偷看金额在0.1-10元之间
2.In docker container,run command as following:
NOTE:You can add docker ssh file id_rsa.pub in dockerhost, so you do not have to input password every time when excuting the command.
1.In docker container, you can add dockerhost in /etc/hosts:
一周热门 更多>