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

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

2 10 2.5 Process Cmds

Uploaded by

Tanisha Waichal
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 views9 pages

2 10 2.5 Process Cmds

Uploaded by

Tanisha Waichal
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/ 9

Operating System(OSY-315319)

Unit II
Process Management
Mrs. Anjali S. Khandagale

1
2
Process command:-ps() (process status)
• This command is used to display information about individual processes that
are exeuting on the system.
• Suntax:- ps [options] [tty]
• Example:-
• Result contains four columns of information.
Where,
PID – the unique process ID
TTY – terminal type that the user is logged into
TIME – amount of CPU in minutes and seconds that the process has
been running
CMD – name of the command that launched the process.
View all the running processes use either of the following option with ps
–[root@rhel7 ~]# ps -A
[root@rhel7 ~]# ps -e
3
Wait() command

• wait is a built-in command of Linux that waits for completing any


running process. wait command is used with a particular process id or
job id.
• Example:- wait

4
Sleep() command
Sleep command is used to delay for a fixed amount of time during the
execution of any script. When the coder needs to pause the execution of
any command for the particular purpose then this command is used with
the particular time value.
Example:-
$ sleep 2
echo "Task Completed“
• Output:- the string “Task completed” will print after waiting for 2
seconds.

5
Exit() command
• exit command in linux is used to exit the shell where it is
currently running.
Options for exit command –
•exit: Exit Without Parameter

After pressing enter, the terminal will simply close.


•exit [n] : Exit With Parameter

6
Kill () command
The kill command terminates a process.
Syntax:- kill [signal number] pid
Signal number
1-hangup signal
2-Interrupt signal
3- Quit signal
9-Kill signal
15-Software termination signal
Example:- $kill 779
Terminates a process with pid 779
7
Thank You

8
Thank You

You might also like