z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the jobs command

z/OS UNIX System Services User's Guide
SA23-2279-00

The jobs command reports the status of background processes that are currently running, based on the job identifier; it also reports on the status of stopped processes and completed processes. If you use the -l option, you can display both the job identifier and the PID for the process.

Say you entered a command that involves more than one process, for example:
myprog | grep write
If you want to check the status of that command, use the jobs -l command. The status message displays the job identifier, the PID number for each process in the job, the status of the command, and the command that is being run. In this case the status message shown in the z/OS® shell is:
 [1] 720902 + Stopped (SIGTSTP)  myprog|grep write
   720902        alive           -sh
   458759        alive           -sh
In this case:
  • The job identifier is 1 (from [1]).
  • The PIDs of the processes are 720902 and 458759.
  • The PGID is 720902 (the PID of the first process in the process group).
The status message for the tcsh shell is similar to that in the previous example.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014