Created
December 12, 2013 17:37
-
-
Save pythonicrubyist/7932065 to your computer and use it in GitHub Desktop.
Linux Command for Process Management and Network Monitoring
This file contains 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
# List all processes dynamically, q to close top, k to kill a process | |
top | |
# Displays processes in tree format | |
pstree | |
# Display all running processes owned by the current user | |
# ps aux | |
# Find a process | |
ps aux | grep process | |
# Terminate a process with PID | |
# The -9 will violently ensure "execution". | |
kill -9 pid | |
# Terminate all process with a particular name | |
killall -9 process | |
# Change the nice value of an already running process. | |
# The nice value determines what priority the process runs with. | |
# A value of -19 is very high priority, while a value of 19 is very low priority. | |
# A value of 0 is the default priority. | |
renice 19 pid | |
# Monitor network packets | |
tcpdump -A -i eth0 tcp # capture at tcp level | |
tcpdump -n -i eth0 # capture at tcp level | |
tcpdump -n -i eth0 # capture at tcp level | |
tcpdump -i eth0 src 192.168.0.2 # from source ip | |
tcpdump -i eth0 dst 50.116.66.139 # from destination ip | |
# Who is logged on and what they are doing | |
w | |
# List open files | |
Lsof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment