Lesson 3 - Managing Software and Processes - Part 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Lesson 3: Managing Software and

Processes

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 1


Objectives covered

o 102.5 Use RPM and YUM package management (weight: 3)


o 102.4 Manage Debian package management (weight: 3)
o 102.3 Manage shared libraries (weight: 1)
o 103.5 Create, monitor, and kill process (weight: 4)
o 103.6 Modify process execution priorities (weight: 2)

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 2


Manage shared libraries

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 3


Library types

Shared library naming convention: libLIBRARYNAME.so.VERSION

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 4


Library files location

$LD_LIBRARY_PATH

$PATH

/etc/ld.so.conf.d/

/etc/ld.so.conf

/lib*/ & /usr/lib*/

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 5


Dynamic linker/loader (ld-linux.so or ld.so)

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 6


Working with Library cache (/etc/ld.so.cache)

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 7


Library dependencies

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 8


Create, monitor
and kill process

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 9


Viewing processes

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 10


Viewing processes

ps [option]

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 11


Viewing processes

top

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 12


Employing muliple screen

screen & tmux

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 13


Background and Foreground processes

Foreground process

background process

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 14


Manage background processes

jobs [option] [job-id]

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 15


Bring jobs to foreground and vice versa
Bring jobs to foreground

Send running program to background

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 16


Process signals

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 17


Sending signals to process

kill [option] process

Default signal is TERM


This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 18
Sending signals to process

killall, pkill & pgrep

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 19


Keep job running after log-out

nohup program/script &

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 20


Modify process execution
priorities

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 21


Manage process priorities

nice –n VALUE Command

nice value in scale of -20 à 19 (with higher priority on the left)

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 22


Manage process priorities

renice [–n] VALUE [PID] [-u Users] [-g Groups]

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 23


Question...!

This document is created by Nguyen Hoang Chi Chi.Nguyen.e4w@gmail.com Page 24

You might also like