Tuesday, November 22, 2011

UNIX: Find the running processes

Finding out Jobs that runs in your UNIX system is a simple task. The command, jobs, helps you to list the jobs which are either stopped or moved to background for process.


Below code automatically moves the vi process to the background
bash-3.00$ vi &
[1] 27467

On entering hte "jobs" command it listed the jobs that are stopped in the background.

bash-3.00$ jobs
[1]+  Stopped                 vi
bash-3.00$
Alternative to find the processes running in your UNIX system:
The command ps is another one alternative to find the jobs running in your UNIX system. This is a little complex. The command ps stands for processor status and it lists out the processor status of the entire computer.


bash-3.00$ ps
   PID TTY         TIME CMD
 27467 pts/15      0:00 vi
 27469 pts/15      0:00 ps
  3784 pts/15      0:01 bash
  3780 pts/15      0:00 sh

No comments:

Post a Comment