How Can I Create A Dump File of a Running Process in Linux?
Well the way to create a dump file is:
gcore - Generate a core file for a running process
SYNOPSIS gcore [-o filename] pid
pmap <PID>
or
strace -f -o xxx -p <PID>
might be the tools you are looking for.
pmap shows you an overview about the memory usage of the provided process. strace tracks down every action a process takes. With -f you tell strace to also consider watching over child processes and -o xxx tells strace to write the output to a file. You can also start a new process by using strace, e.g. with
strace cat /etc/passwd
If you are interested in specific information only, such as what files were opened, you can start strace accordingly:
strace -f -o xxx -e trace=open -p <PID>
Try this:
cat /proc/<pid>/smaps > mem.txt
This link might also help you.