Skip to content

Instantly share code, notes, and snippets.

@mgrzaslewicz
Last active June 17, 2020 18:18
Show Gist options
  • Select an option

  • Save mgrzaslewicz/b7c137ba43ea8917ae01a6e23f1e678e to your computer and use it in GitHub Desktop.

Select an option

Save mgrzaslewicz/b7c137ba43ea8917ae01a6e23f1e678e to your computer and use it in GitHub Desktop.
List resources used by a process (open sockets, open files, memory)
# all open descriptors
ls -l /proc/{pid}/fd
lsof -a -p {pid}
# memory
# socket connections
# open files
# distinct ports
# JVM heap dump
jmap -dump:live,format=b,file=/tmp/dump.hprof {jvmPid}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment