1.待定
dump脚本
#!/bin/bash time=`date +%Y%m%d%H%M` dump_path=/home/ewei/dump save_path=/home/ewei/dump/${time}-`hostname` dump_oss_path="/home/ewei/oss/ewei-testenv/dump_file_prod" if [ ! -d "$save_path" ]; then mkdir -p $save_path fi dockerid=`docker ps -a -q` for d_id in ${dockerid[*]} do docker exec -it $d_id jstat -gc 1 > $save_path/fullgc-before.txt docker exec -it $d_id jmap -dump:format=b,file=$save_path/before-oom-dump.hprof 1 docker exec -it $d_id jmap -histo:live 1 > $save_path/histo.txt docker exec -it $d_id jstat -gc 1 > $save_path/fullgc-after.txt docker exec -it $d_id jmap -dump:format=b,file=$save_path/after-oom-dump.hprof 1 done cd $dump_path tar -zcf ${time}-`hostname`.tar.gz ${time}-`hostname` mv ${time}-`hostname`.tar.gz $dump_oss_path rm ${time}-`hostname` -rf