Created
September 12, 2017 06:23
-
-
Save ansig/bd87a5760b6a966a6ab0ca59199bd560 to your computer and use it in GitHub Desktop.
A few utility commands to extract information about a running Unix process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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