Linux Process Management
Linux Process Management
Tty(Teletype Terminal)
Linux operating system represents everything in a file system, the hardware devices
that we attach are also represented as a file. The terminal is also represented as a
file. There a command exists called tty which displays information related
to terminal. The tty command of terminal basically prints the file name of the
terminal connected to standard input. tty is short of teletype, but popularly known
as a terminal it allows you to interact with the system by passing on the data (you
input) to the system, and displaying the output produced by the system.
#tty [to know the terminal]
There are more than 50 ttys.
PID:- Process ID
USER: Process owner
PR : Priority
NI: Nice value
VIRT: The amount of virtual memory the process uses
RES : The amount of non-swapped physical memory the process uses
SHR : The amount of shared memory the process uses
S: Process state
%CPU : The percentage of the CPU
%MEM : The percentage of the RAM
TIME+ : The accumulated CPU time
COMMAND : The name of the executable file
Signals of Process:
SIGHUP 1 – sent to a process when its controlling terminal is closed.
SIGINT 2 – sent to a process by its controlling terminal when a user interrupts
the process by pressing [Ctrl+C].
SIGQUIT 3 – sent to a process if the user sends a quit signal [Ctrl+D].
SIGKILL 9 – this signal immediately terminates (kills) a process and the process
will not perform any clean-up operations.
SIGTERM 15 – this a program termination signal (kill will send this by default).
SIGTSTP 20 – sent to a process by its controlling terminal to request it to stop
(terminal stop); initiated by the user pressing [Ctrl+Z].