Guest User

Untitled

a guest
Oct 27th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. # Set pid of nginx master process here
  2. pid=8192
  3.  
  4. # generate gdb commands from the process's memory mappings using awk
  5. cat /proc/$pid/maps | awk '$6 !~ "^/" {split ($1,addrs,"-"); print "dump memory mem_" addrs[1] " 0x" addrs[1] " 0x" addrs[2] ;}END{print "quit"}' > gdb-commands
  6.  
  7. # use gdb with the -x option to dump these memory regions to mem_* files
  8. gdb -p $pid -x gdb-commands
  9.  
  10. # look for some (any) nginx.conf text
  11. grep worker_connections mem_*
  12. grep server_name mem_*
Add Comment
Please, Sign In to add comment