Monday, August 15, 2016

PROCESS MANAGEMENT

PROCESS MANAGEMENT

  •       System Defined Process
  •        User Defined Process
System defined process is called as daemon. It is a program running for the service. It will start when booting the operating system, we can also start manually.
             
           User defined process is called executing commands.

Init is the parent process for all the processes. Process id is 0 always.
$ ps     -           it will display the process status correct terminal

ps Command Output

pts/0   -           sudo terminal

         The sudo Terminal command can be used by administrators to execute commands as a different user (for example, as root). When executing this command, you will be prompted to enter the password for the administrator account you are currently logged in as.
 
tty/1    -           virtual terminal

ps command options 
                                        ps –a (a = all the processes)
                                    ps –f    - full description of the process
                                    ps –af
                                    ps –u  - for user processes
                                    ps –x   - system processes
                                    ps –aux            - all terminals system processes



To see the background running processes
$ jobs  -           to see background processes
$ fg

$ top -           it will display dynamic running processes correct time, system up time and number of users logged in, CPU load memory and processes.

enter to the top by enter the top command 

when your in top press SHIFT+F to see all the available top options 

top options


Killing the processes:

     When you want to kill the process you should have privileges to kill the process. Find process its related PID's using ps command.
 
# kill -9 <PID>         - kill the process using Process ID
# kill –a <name>     - kill the process using process name

No comments:

Post a Comment