Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views8 pages

Red Hat Certified System Administrator: Managing Individual Processes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views8 pages

Red Hat Certified System Administrator: Managing Individual Processes

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Red Hat Certified

System
Administrator

Managing Individual
Processes
Process listing
The top command will output a
continually updating list of process
commands, IDs, and other
information.
There are hundreds of different
ways to sort or filter the displayed
output – the top man page is very
thorough.
Using the ps command
ps is a tool that simply reports a
snapshot of the current processes.

By default, ps only lists the invoking


user’s processes which are
attached to the current terminal.
This behavior can be changed by
using flags. Those flags that are
commonly used are:
a lists all users’ processes which are
attached to a terminal.
u display in user format
x lists all the invoking user’s
processes.
pgrep
pgrep is simply a tool that combines
grep and the ps tool to give relevant
output.
Common flags:
-l Show the process name in
addition to the PID
-u Limit the matches to the user
-v Invert the results
Kill Signals
Kill signals are inter process
communications that are sent to
programs to make them do specific
things. While there are 64 different
kill signals, you’re not expected to
memorize all of them.
SIGTERM – Ask the process to exit
cleanly.
SIGKILL – Stop the process
immediately – prevents cleanup
SIGHUP – Signal Hangup. Stops
processes in a shell environment,
can make some services re-read
configuration files
SIGINT – Same thing as Ctrl+C
Kill Signals (cont.)
SIGSTOP – Pause a process so it can
be started later.
SIGCONT – Start a process that was
paused with SIGSTOP or SIGTSTP
SIGTSTP – (Terminal Stop) Ask the
process to stop. This is similar to
Ctrl+Z
Niceness
The priority a given process is
assigned is it’s “Nice Level”. That
level can be adjusted either at the
launch of the process (using the
nice command) or during the
runtime (using the renice
command).
Load average
The top, w, and uptime commands
all display something labeled “Load
Average”. These numbers display an
average over time of threads that
are running or waiting on resources
(whether those resources are disk,
network, CPU, or anything else). The
numbers are given in 1, 5, and 15
minute interval calculations.

You might also like