怎样通过pprof监控docker
来源:互联网 发布:网络火的歌曲有哪些 编辑:程序博客网 时间:2024/05/21 22:57
debug模式启动docker
$ /usr/bin/docker daemon -D -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
通过socat端口转发
$ socat -d -d TCP-LISTEN:8080,fork,bind=192.168.1.137 UNIX:/var/run/docker.sock
测试
[root@reg pprof]# curl -s http://10.39.0.102:8080/debug/vars | jq .{ "cmdline": [ "/usr/bin/dockerd", "-D" ], "memstats": { "Alloc": 13847856, "TotalAlloc": 71577968, "Sys": 27052344, "Lookups": 7829, "Mallocs": 891300, "Frees": 772846, "HeapAlloc": 13847856, "HeapSys": 18743296, "HeapIdle": 1941504, "HeapInuse": 16801792, "HeapReleased": 1810432, "HeapObjects": 118454, "StackInuse": 1179648, "StackSys": 1179648, "MSpanInuse": 225280, "MSpanSys": 262144, "MCacheInuse": 4800, "MCacheSys": 16384, "BuckHashSys": 1460436, "GCSys": 1374208, "OtherSys": 4016228, "NextGC": 25872553, "LastGC": 1512984476111075800, "PauseTotalNs": 29246607, "PauseNs": [ 317474, 1159328, 271770, ...
获取命令行
$ curl -s http://10.39.0.102:8080/debug/pprof/cmdline/usr/bin/dockerd-D
通过客户端获取
$ go tool pprof http://10.39.0.102:8080/debug/pprof/profileFetching profile from http://10.39.0.102:8080/debug/pprof/profilePlease wait... (30s)Saved profile in /root/pprof/pprof.dockerd.10.39.0.102:8080.samples.cpu.001.pb.gzEntering interactive mode
生成文件转成pdf
$ go tool pprof --pdf pprof.dockerd.10.39.0.102\:8080.samples.cpu.001.pb >call.pdf
get symbol
$ curl -s http://10.39.0.102:8080/debug/pprof/symbol num_symbols: 1
如果你感兴趣,其它的信息都可以获取到
$ culr -s http://10.39.0.102:8080/debug/pprof/block$ curl -s http://10.39.0.102:8080/debug/pprof/heap$ curl -s http://10.39.0.102:8080/debug/pprof/goroutine$ curl -s http://10.39.0.102:8080/debug/pprof/threadcreate
阅读全文
0 0
- 怎样通过pprof监控docker
- 怎样设置 Docker 监控
- [经验总结]怎样通过JMeter监控Tomcat性能
- Docker 监控实战
- Docker应用的监控
- Docker 简单监控
- 使用zabbix监控docker
- Docker——监控
- zabbix上监控docker
- go pprof
- Golang、pprof
- 怎样使用Docker帮助
- 一个Ip2long函数,通过调用go tool pprof分析,竟发现内存分配了3G
- 【Docker】通过Docker-Machine安装Docker
- Docker运维必备:监控宝Docker监控试用手记
- Docker 监控之 SaaS 解决方案
- Docker 监控的一点想法
- Docker 监控之 SaaS 解决方案
- 普及练习场 简单的模拟 笨小猴
- java中文件上传大文件时间长,报错
- centos6.5-oracle数据库中数据的导入和导出
- 日常mark
- 《kubernetes-1.8.0》17-examples-Running ZooKeeper
- 怎样通过pprof监控docker
- poj3321——Apple Tree
- ClassNotFoundException: org.springframework.web.context.ContextLoaderListener解决办法
- 设计模式学习--抽象工厂模式
- 2017/12/11
- Jquery获取Select选中控件的值
- 配置struts2以及struts2需要的包
- Freemarker2.3.23使用
- Retrofit之多文件多参数上传