PID Flashcards
ps
display all running processes on the system for any user
ps -a
ps
display user info for displayed processes
ps -u
ps
display processes with an associated tty (terminal)
ps -x
ps
will show all running processes by any user displaying the process owner and including processes not tied to a terminal
ps aux
ps
will show all running processes by any user displaying the process owner and including processes not tied to a terminal
ps -ef
pstree
display the tree using ASCII characters
ps -A
pstree
display the processes including any parameters used
ps -s
pstree
show PIDs
ps -p
free
displays memory in bytes
free -b
free –bytes
free
displays memory in kilobytes by default
free -k
free –kilo
free
displays memory in megabytes
free -m
free –mega
free
displays memory in gigabytes
free -g
free –giga
free
displays memory if a more human readable format
free -h
free –human
free
the number of times to display the output and must be used with -s option
free -c
free –count
free
how many seconds between each display output used with -c
free -s
free –seconds
free
display a line showing each columns totals
free -t
free –total
free
display low and high memory stats
free -l
free –lohi
signal 1
shutdown and restart the process hangup
SIGHUP
signal 2
interrupts a process CTL-C
SIGINT
signal 9
kill the process (cannot be ignored or caught)
SIGKILL
signal 15
terminate the process and can ignore or catch
SIGTERM
signal 19
stop cannot be ignored or caught
SIGSTOP
signal 20
terminal stop
CTL-Z
SIGTSTP
kill
attempts to kill process with indicated signal
kill - [signal #]
kill
special reference to ask a process to restart in order to reread a config file or implement a change
kill -1 (-HUP)
kill
kill/stop/end/dump ring now - most often will kill off even zombie or hung processes
kill -9 (-KILL)
pkill
send the signal number to the matched process
pkill -signal
pkil –signal [#]
pkill
match the indicated terminal/tty
pkill -t [terminal]
pkill
match user ID
pkill -U
pkill –uid [user]
pgrep
will display any httpd process owned by root OR apache
pgrep -u root, apache httpd
pgrep
will display only processes owned by root AND apache
pgrep -u root apache