|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am simultaneously running many processes with the same commands and I want to monitor each process. Using “top” or “ps –ef | grep command_name” to distinguish individual processes is difficult when there are many processes with the same commands. So I want to know what commands are needed for the process to display the PID it has been assigned when it gets executed.
Any help will be appreciated. Steve |
|
#2
|
|||
|
|||
|
The program I'm using is korn shell. I found out that I can display the PPID (Parent PID) by "echo $$" and I tried "echo $" but it didn't display the PID. I searched the net but can't find anyting yet.
Any help will be appreciated. Steve |
|
#3
|
|||
|
|||
|
Here is a code snippet from our version -
Code:
ksh
$BSE/bin/ba6.2 -- -nodebug -set TARG_COMP=$COMPANY -set EXCH_COMP=015 ttaad5203m
000 2>${BSE_LOG}/lmsjob_${BSH_JOB}.${ZDATE} &
BAPROCID=$!
echo $BAPROCID
wait $BAPROCID
echo "JOBID="$BSH_JOB "PROCESS ID = "$BAPROCID
$! - PID of last background process. |
|
#4
|
|||
|
|||
|
Quote:
ps –ef you are on a SVR4 sys, so read ps man pages pay attention to the -o option, you can tell ps to make exactly the output you need
__________________
working on Solaris[5-9], preferred languages french and C. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Process ID |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|