SYS: Identify CPU/memory intensive processes, adjust process priority with renice, and kill processes.

Share this link

Note: This is an RHCSA 7 exam objective.

System Activities

To get an instantaneous image of a server activity (use ‘virt-top‘ on a KVM hypervisor), type:

# top

To get details about processes, type:

# ps -edf

Process Priority

To start a process (here with a low priority, type:

# nice -n 10 ./

To change the priority (here +5) of an already running process, get its PID (Process ID) through top or ps (here 789) and type:

# renice +5 789


# renice +5 `pgrep`

Process Deletion

To kill the process, get its PID through top or ps (here 789) and type:

# kill -9 789


# pkill

System Reporting

To display details about IO activities, type:

# iostat

To show network card activities, type:

# netstat -i

To display socket activities, type:

# netstat -a

To get details about virtual memory activities (memory, swap, run queue, cpu usage, etc) every 5 second, type:

# vmstat 5

To get a full report of a server activity, type:

# sar -A

Additional Resources

You can also watch a video by Sander van Vugt about Understanding Linux Memory Usage (4min/2016).

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

Leave a Reply

Please Login to comment
2 Comment threads
3 Thread replies
Most reacted comment
Hottest comment thread
4 Comment authors
robsGjorgiCertDepotval Recent comment authors
newest oldest
Notify of

Just a comment about `kill -9` This is not the default behavior and rarely used on for well written programs. `kill` sends SIGTERM as default to a process so the process needs time for a clean up of open files, FD’s etc.


I guess PackageKit isn’t a well written program, since I have to put up a fight with it first via several kill -9 on it before being able to use yum install to install stuff on my virtual CentOS installation.


Long time Solaris / Linux newbie. A note on sar that is probably apparent to most but I had to do a look up on it: it is a part of the sysstat tool set that did not get installed on my minimum distro.
yum install sysstat
Great site, using it for RHCSA at the moment and feeling pretty well prepared after a week of intense studying!

RHCSA7: Task of the day

Allowed time: 10 minutes.
Create an EXT4 file system mounted under /vol based on a logical volume of 100MB.
Reduce the size to 60MB.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a default secure MariaDB database called maria with a user named muser with all privileges.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...