Skip to content

Instantly share code, notes, and snippets.

@ansig
Created September 12, 2017 06:23
Show Gist options
  • Save ansig/bd87a5760b6a966a6ab0ca59199bd560 to your computer and use it in GitHub Desktop.
Save ansig/bd87a5760b6a966a6ab0ca59199bd560 to your computer and use it in GitHub Desktop.
A few utility commands to extract information about a running Unix process
#!/usr/bin/env bash
# Show all processes with trees
ps axf | less
# Show all available information for a process
ls -la /proc/[PID]
# Show all open files for a process
/usr/sbin/lsof -p [PID]
# Further reading: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment